Skip to content
This repository has been archived by the owner on Jun 18, 2020. It is now read-only.

Latest commit

 

History

History
121 lines (71 loc) · 2.78 KB

CONTRIBUTING.md

File metadata and controls

121 lines (71 loc) · 2.78 KB

Welcome!

Prerequisites

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

Development

Main scripts

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 version
  • npm 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 through npm link.

The scripts start and test are aliases for test:dev:watch.

Fork

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

Watch changes

sudo npm link

npm start ### will rebuild and test after each code change

Usage

Doing it from an other console (°), use package from local repository:

fse mkdirp

(°) Under any wished location, even the directory atao60-fse-cli above.

Pull request

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.

Publish

To publish, you must have the access rights for:

The script npm run version will push a new version in package.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