-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow structured tasks & targets config
* rename `tasks.json` to `task-schedules.json` in project layouts. This attempts to remove confusion between the new `tasks.js` and the former `tasks.json`. * Add default nools templating, and extraction of targets.json from javascript target config file `targets.js`.
- Loading branch information
alxndrsn
committed
Jun 1, 2018
1 parent
5352890
commit eebc469
Showing
37 changed files
with
649 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
# Changelog | ||
|
||
## v1.16.9 | ||
* Allow structured tasks & targets config | ||
|
||
## v1.16.8 | ||
* Update dependencies | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
const jshint = require('jshint').JSHINT; | ||
const minify = require('../lib/minify-js'); | ||
const templatedJs = require('../lib/templated-js'); | ||
const withLineNumbers = require('./with-line-numbers'); | ||
|
||
function lint(code) { | ||
jshint(code, { | ||
esversion: 5, | ||
eqeqeq: true, | ||
funcscope: true, | ||
latedef: 'nofunc', | ||
nonbsp: true, | ||
predef: [ 'contact', 'lineage', 'reports' ], | ||
undef: true, | ||
unused: true, | ||
}); | ||
|
||
if(jshint.errors.length) { | ||
console.log('Generated code:'); | ||
console.log(withLineNumbers(code)); | ||
jshint.errors.map(e => console.log(`line ${e.line}, col ${e.character}, ${e.reason} (${e.code})`)); | ||
throw new Error(`jshint violations found in contact-summary :¬(`); | ||
} | ||
} | ||
|
||
module.exports = projectDir => { | ||
const code = templatedJs.fromFile(projectDir, `${projectDir}/contact-summary.js`); | ||
|
||
lint(code); | ||
|
||
return minify(code); | ||
}; |
Oops, something went wrong.