Welcome!
and possibly:
The shell used here is Bash under Linux. However it should be straightforward to work under any other usual OS as Windows or Mac OS X.
Check prerequisites' status:
npm doctor # will show information about git, node, npm...
git --version
npm list -g --depth 0 2>&1 | grep create-project # (°)
(°) replace
2>&1 | grep ...
by its counterpart under Windows or Mac OS X
The main available npm scripts are:
npm run build
- create a production ready build,npm version <new version>
- check as much as possible before pushing with the new versionnpm run clean
- remove temporary folders as dist, .build, ...npm run refresh
- remove node modules, package-lock.json, dist, ... and re-installs upgraded dependencies,npm run lint
- check of code,npm run test:dev:watch
- rerun build and test after any code changes and made them available throughnpm link
.
The scripts start
and test
are aliases for test:dev:watch
.
npm uninstall -g @atao60/fse-cli ### if needed; required to avoid any issue with `npm link`, see below
git clone https://github.com/atao-web/fse-cli.git atao60-fse-cli
cd atao60-fse-cli
npm install
# npm outdated
# npm audit
# npx depcheck
sudo npm link
npm start ### will rebuild and test after each code change
Doing it from an other console (°), use package from local repository:
fse mkdirp
(°) Under any wished location, even the directory
atao60-fse-cli
above.
pwd ### checking if in the forked project folder
# <path to>/atao60-fse-cli
git checkout -b my-branch
### do here the wanted changes
git add --all
git commit -m "closing pull request message"
git push origin my-branch
Lastly open a pull request on Github.
To publish, you must have the access rights for:
- the package on the npm public registry, ie @atao60/fse-cli,
- the repository on Github, ie atao-web/fse-cli.
The script
npm run version
will push a new version inpackage.json
and a new tag with this version as label.
git checkout my-branch
npm version patch ### if wished, use 'minor' or 'major' in place of 'patch'
npm publish
### check that everything is fine:
cd <any suitable folder>
npx @atao60/fse-cli