cs546
v2.0.1
Published
A utility to modify package.json for CS546 students
Readme
cs546
A utility package for CS 546 students that automatically adds required configurations to your package.json file for your labs.
what it does
When installed, this package automatically modifies your package.json to add:
"type": "module"- Enables ES modules syntax (npm defaults to commonjs)"start": "node app.js"- Adds the standard start script you need for labs.
before:
{
"name": "i-love-lab6",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}after:
{
"name": "i-love-lab6",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node app.js"
},
"keywords": [],
"author": "",
"license": "ISC"
}installation
npm install cs546The modifications will be applied automatically during installation.
manual usage
If needed, you can also run the modifications manually:
npx cs546-modifywhy?
In CS546, every Node.js project requires:
- ES modules syntax enabled via
"type": "module" - A start script that runs
app.js
This package saves you thirteen seconds by automatically adding these configurations whenever you start a new project.
license
MIT
