generator-enigma

5.3.0 • Public • Published

generator-enigma

A React webapp scaffolding tool with best practice enforcement, automated testing, and more.


  1. Installation
  2. Usage
  3. Testing

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-enigma

The 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 yo

back to top


Usage

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) to public/assets/bundle.js and style files (with sourcemapping) to public/assets/style.css

  • release: Compiles and minifies your application JS (without sourcemapping) to public/assets/bundle.min.js and style files (without sourcemapping) to public/assets/style.min.css - the intent is you should be able to copy the contents of public/ to a server and have it work without modification

  • start: 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 /coverage directory

  • lint: Checks your project for JS code style, according to the rules in .eslintrc

back to top


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!

back to top


This module adheres to Semantic Versioning.

Package Sidebar

Install

npm i generator-enigma

Weekly Downloads

1

Version

5.3.0

License

MIT

Last publish

Collaborators

  • probablyup