Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
thani-sh committed Apr 8, 2016
1 parent d721732 commit 97b1aab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/builder/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if (program.staticDir) {
const staticPath = path.resolve(program.staticDir);
if (fs.existsSync(staticPath)) {
logger.log(`=> Copying static files from: ${program.staticDir}`);
shelljs.cp('-r', staticPath + '/', outputDirPath);
shelljs.cp('-r', `${staticPath}/`, outputDirPath);
} else {
logger.error(`Error: no such directory to load static files: ${staticPath}`);
process.exit(-1);
Expand Down Expand Up @@ -97,7 +97,7 @@ fs.writeFileSync(path.resolve(outputDirPath, 'iframe.html'), getIframeHtml());
// TODO this section of the code needs to be verified
// by running with a few different scenarios.
webpack(finalConfig).compile(function (err, stats) {
for (var filename in stats.assets) {
for (let filename in stats.assets) {
if (!stats.assets.hasOwnProperty(filename)) {
continue;
}
Expand All @@ -106,13 +106,13 @@ webpack(finalConfig).compile(function (err, stats) {
if (asset.children && asset.children.length) {
// TODO learn more about "RawSource"
const source = asset.children[0]._value;
const dstPath = path.resolve(outputDirPath, 'static/' + filename);
const dstPath = path.resolve(outputDirPath, `static/${filename}`);
fs.writeFileSync(dstPath, source);
continue;
}

const source = asset._value;
const dstPath = path.resolve(outputDirPath, 'static/' + filename);
const dstPath = path.resolve(outputDirPath, `static/${filename}`);
fs.writeFileSync(dstPath, source);
}
});

0 comments on commit 97b1aab

Please sign in to comment.