0.1.9 • Published 6 years ago
generator-nxkplus v0.1.9
nxkplus
A yeoman generator for buiding components for
| n Node | x Express | k Knex
projects
Setup
Install yeoman and install the nxplus generator
npm install -g yo npm install -g generator-nxkplus
Run the nxplus generator to see the cli commands
yo nxkplus
Inside the root of a node project
yo nxkplus:«scaffold-command»
Scaffold Commands
:auth
Generates scaffolding for passport authentication
yo nxkplus:auth
Installs npm application dependencies:
- passport
- passport-local
- objective
- objective-password
- cookie-session
- cookie-parser
Creates the following folders + files in
src/
models/ + User.js routers/ + authRouter.js controllers/ + authController.js helpers/ + handleDbError.js + passport-local--sessionActions.js middleware/ + auth--getUserByEmail.js + auth--saveNewUser.js + passport-local--registerLocalStrategy.js
Requires additional configuration.
:react
Generates scaffolding for react
yo nxkplus:react
Installs npm application dependencies:
- react
- react-dom
- react-router
- cookie-session
Installs npm developer dependencies for transpilation:
- webpack
- babel-core
- babel-loader
- babel-plugin-transform-class-properties
- babel-plugin-transform-es2015-modules-commonjs
- babel-preset-env
- babel-preset-react
Creates
.babelrc
andwebpack.config.js
filesCreates the following folders + files in
src/
views/ + reactApp.js client/ + js/ + App.js
Requires additional configuration.