Skip to content

Create js linting, formatting, deploy using gh-pages project scaffolding

Notifications You must be signed in to change notification settings

ivan-ha/generator-ivan-js

Repository files navigation

ivan-ha/generator-ivan-js

My Yeoman generator to create project scaffolding for JS Web application build with React, Redux, Redux-Saga, Flow, Ramda, Jest.

It includes configure JS linting, formatting, deploy using gh-pages, etc.

Installation

(Recommended) Without globally installed packages

npx -p yo -p generator-ivan-js -c "yo ivan-js"

With globally installed packages

npm install -g yo
npm install -g generator-ivh-react-component
yo ivan-js

What's in the Box

Commit linting

Implement Conventional Commits via commitlint, to adhere to commit convention, and auto run on every commit.

Check out the config in .commitlintrc.json.

Code linting

Integrated ESLint as the JS linter. And added the following plugins: 'eslint-config-prettier',

Check out the config in .eslintrc.yml.

Deployment

Support deploy static to GitHub project page via gh-pages.

To deploy

yarn deploy

Note that default settings:

  1. static are built with yarn build
  2. build files are located in {projectRoot}/build

Please config the pre-deploy hook and deploy command if that's not your case.

Version bumping

yarn bump-version

Implemented via standard-version, which commit messages are required to align with Conventional Commits.

Import sorting

Implemented via import-sort, and configured to the import-sort-style-module.

Automatically run on commit hook.