At the beginning of each cohort update package.json
:
- replace all dependent package versions with a glob (
*
). rm -r node_modules
.npm update --save
.npm update --save-dev
.npm install
grunt test
Fix errors and conflicts as necessary.
Dependencies are stored in package.json
.
Do not configure grunt
packages directly in the
Gruntfile.js
. Instead, store configurations in the
grunt
directory. You won't need a top-level key, since that's
generated by the Gruntfile.js
based on the filename of the configuration
object stored in the grunt
directory.
Developers should store JavaScript files in lib
. If an entry point is
needed, it can go in the root of the project; index.js
is the node default;
app.js
, main.js
, or server.js
might be appropriate depending on the task.
grunt server
will start nodemon
on bin/index.js
.
With this in the markdown:
<!-- start code block file="lib/example.js" -->
This gets replaced with the contents of lib/example.js
<!-- end code block -->
running:
cp README.md README.bak
bin/add-code-block.js README.bak >README.md
produces:
'use strict'
module.exports = {
sync: (value) => value,
async: (value, cb) => setTimeout(() => cb(null, value), 0),
promise: (value) => Promise.resolve(value)
}
Check the markdown source to see what happens.
Developers should run these often!
grunt nag
: runs code quality analysis tools on your code and complains.grunt test
: runs any automated tests; may depend ongrunt build
.grunt
: runs bothnag
and thentest
grunt make-standard
: reformats all your code in the standard style.
- All content is licensed under a CCBYNCSA 4.0 license.
- All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact [email protected].