Skip to content
This repository has been archived by the owner on Mar 9, 2019. It is now read-only.

Commit

Permalink
Feature/clear error messages invalid config (#12)
Browse files Browse the repository at this point in the history
* Update dependencies

* Cleaner error message on failure
  • Loading branch information
bartveneman authored Oct 20, 2018
1 parent 9e9ce88 commit 12d333f
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 3,876 deletions.
6 changes: 3 additions & 3 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ const configFile = readFilePromise(resolve(cli.flags.config), 'utf8')

// Read input and config
Promise.all([cssFile, configFile])
.then(([css, config]) => ({
.then(([css, configJson]) => ({
css,
config: parseJson(stripJsonComments(config))
config: parseJson(stripJsonComments(configJson), cli.flags.config)
}))

// Generate CSS stats from CSS input
Expand All @@ -99,7 +99,7 @@ Promise.all([cssFile, configFile])
process.exit(testsPassed ? TEST_SUCCESS_CODE : TEST_FAILURE_CODE)
})
.catch(error => {
console.log('\n', error)
console.log('\n', logSymbols.error, error.message)
process.exit(APPLICATION_ERROR_CODE)
})

Expand Down
Loading

0 comments on commit 12d333f

Please sign in to comment.