Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(infrastructure): fixed npm run build error for empty package directories #85

Merged
merged 2 commits into from May 31, 2018

Conversation

moog16
Copy link
Contributor

@moog16 moog16 commented May 31, 2018

fixes #82

Error occurs when an empty directory exists in /packages ie. Chips.

@@ -20,10 +20,12 @@ const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');

const isDirectory = (source) => lstatSync(source).isDirectory();
const containsJsFile = (source) => readdirSync(source).some(file => path.parse(file).ext === '.js');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can simplify path.parse(file).ext to path.extname(file)?

@codecov-io
Copy link

codecov-io commented May 31, 2018

Codecov Report

Merging #85 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master     #85   +/-   ##
======================================
  Coverage    99.2%   99.2%           
======================================
  Files          18      18           
  Lines         632     632           
  Branches       51      51           
======================================
  Hits          627     627           
  Misses          5       5

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 13fff1b...4b17fc6. Read the comment docs.

@moog16 moog16 merged commit 18666d4 into master May 31, 2018
@moog16 moog16 deleted the npm-run-build-errors branch May 31, 2018 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants