open-source-starter
v1.1.7
Published
Open source project starter
Downloads
7
Maintainers
Readme
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.
Content
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
Requirements
- 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.
Installation
- 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 !
Usage
Stage a file
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.
Use conventional commit
yarn commit
This script will open Commitizen to help you write conventional commit
Release / Publish
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
Contributing
Contributions are welcome ! See contributing guidelines
License
MIT
Copyright (c) 2019 Jimmy Beldone