No Grunt/Gulp required!
Boilerplate for building a client-based JavaScript library in ES6 using the following components:
- Babel
- webpack
- Jasmine
- Karma
- babel-plugin-istanbul
- ESLint with eslint-config-airbnb
- PostCSS with Autoprefixer (for autoprefixing vendors), includes and CSSnext (for css custom-properties etc.) and cssnano (for CSS minification)
- JSDoc3 to auto-generate JSDoc documentation for JS that uses JSDoc comment syntax.
##SRC
./src
folder must contain one .js
file and one .css
file that have their name matching to that specified in package.json -> name
.
These two files are the ones that import content (via require("path/to/module.js")
and via @import "path/to/module.css";
) from other files located in the same folder/nested folders (if you need several files with classes)
or act as the only js/css files for the module.
npm install
installs all dependencies of the projectnpm run build:prd
generates minified build files under/dist
foldernpm run build:dev
generates build files under/dist
folder and starts watching all changes made to the project during this session, appending them to the build filesnpm test
Runs tests that have been written and put into/src/__tests__
folder. (Note: test should follow name convention:NameOfClass-test.js
which is a test forNameOfFile.js
)npm run lint
Lints your JavaScript code placed in src folder.npm run docs
generates documentation for your project .js files that use JSDoc3 comments and puls them intodocs
foldernpm run docs-commit
publishes documentation tohttp://ConfirmitASA.github.io/[RepoName]/[version]/
where[RepoName]
is name of your repository as well as name specified inpackage.json -> name
AND[version]
is the version in yourpackage.json
. Please make sure you have thenpm run docs-commit
command configured properly with the correct name of repo to be used there.