generator-enigma
v5.3.0
Published
Generate a React application with best practice enforcement, integrated testing, and more.
Maintainers
Readme
generator-enigma
A React webapp scaffolding tool with best practice enforcement, automated testing, and more.
Scaffolding for automation of basic tooling and tasks typically required by React projects, including:
- CommonJS module bundling via Browserify
- ES2015+ (ES6+) syntax support and transpilation via Babel
- Code quality assessment & style enforcement via ESLint
- Stylus CSS preprocessing & automatic vendor prefix management via Autoprefixer
- Unit testing via the Jest framework and Jasmine2 test runner
Installation
npm i -g generator-enigmaThe build script will automatically try to install Yeoman for you if it isn't installed already. Alternatively, you can do this yourself via
npm i -g yoUsage
To set up a new app, create a folder, enter it and run yo enigma
The generator will ask a few questions and insert the prebuilt skeleton for a typical React-based webapp. Then you're rolling!
Once you've set up your app, check out the targets available in package.json. The conveniences available at npm run <target>:
build: Compiles your application JS (with sourcemapping -- good for debugging) topublic/assets/bundle.jsand style files (with sourcemapping) topublic/assets/style.cssrelease: Compiles and minifies your application JS (without sourcemapping) topublic/assets/bundle.min.jsand style files (without sourcemapping) topublic/assets/style.min.css- the intent is you should be able to copy the contents ofpublic/to a server and have it work without modificationstart: Compiles your app and boots up a livereload server -- just make changes to your files (JS, Stylus/CSS, etc.)test: Runs your unit tests. (will automatically include any file inside of folders named__tests__)coverage: Runs your unit tests and creates an LCOV coverage report in the/coveragedirectorylint: Checks your project for JS code style, according to the rules in.eslintrc
Testing
The Jasmine 2 test runner is included by default, as a part of the Jest unit testing framework.
Jest supports a broad spectrum of matchers and test-writing styles, so check out their documentation to customize things to your liking!
This module adheres to Semantic Versioning.
