This starter provides all necessary setup to quickly start an open source project, with fully automated release, tests, generate CHANGELOG.md
, version bump, publish to NPM.
Babel : Use next generation JavaScript
All
.js
files insrc/
will be compiled with Babel and added in thedist/
folder
Config : .babelrc
ESLint : A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease
config: .eslintrc
Prettier : Opinionated code formatter
config: .prettierrc
Husky : Use git hooks with ease
Here it just call lint-staged on
pre-commit
config: "husky"
in package.json
lint-staged : Run linters against staged git files
config: "lint-staged"
in package.json
Commitizen : Conventional commit messages CLI
Semantic Release : Fully automated version management and package publishing
Jest : JavaScript Testing Framework
Add your test files either in
src/
withmy-file.spec.js
format, or in the__tests__
folder at your project root directory
config : jest.config.js
- NPM account (signup on https://www.npmjs.com/)
note: this repo use Github actions, but you can use any continuous integration system you want, see semantic-release-cli documentation for or more informations.
- Fork or clone this repo
git clone https://github.com/JimmyBeldone/open-source-starter.git
- Run
yarn setup
- Configure semantic-release with semantic-release-cli :
npx semantic-release-cli setup
. - You're all set !
git add src/my-file.js
From now on when you will use git add
on a file in src/
, it will be automatically linted and prettified.
yarn commit
This script will open Commitizen to help you write conventional commit
All you need to do is merge on master branch, simple as that.
It will :
- Triggers CI
- Run your test during CI
- Run semantic-release steps :
- Analyse your commits
- Bump version
- Add release notes
- Generate
CHANGELOG.md
- Publish to NPM & Github
Contributions are welcome ! See contributing guidelines
MIT
Copyright (c) 2019 Jimmy Beldone