Skip to content

Commit

Permalink
fix(infrastructure): fix source mappings under dist directory (#682)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Goo committed Feb 19, 2019
1 parent be8790e commit 9f93ef3
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions scripts/release/cp-pkgs.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,14 @@ function cpAsset(asset) {

let basename = path.basename(asset);
const extname = path.extname(asset);
const isMap = extname === '.map';
const isJs = extname === '.js';
const isEs = basename.includes('.es');
const isCss = basename.includes('.css');
if (!isEs && !isCss && (isJs || isMap )) {
if (isMap) {
basename = 'index.js.map';
if (!isEs && !isCss && isJs) {
if (basename.includes('.min')) {
basename = 'index.min.js';
} else {
if (basename.includes('.min')) {
basename = 'index.min.js';
} else {
basename = 'index.js';
}
basename = 'index.js';
}
}

Expand Down

0 comments on commit 9f93ef3

Please sign in to comment.