generator-nxko
v0.2.13
Published
yeoman generator for node, knex, objective, react, passport project
Downloads
25
Readme
nxko
A yeoman generator for buiding components for
| n Node | x Express | k Knex | o Objection
projects
Setup
- Install yeoman and install the nxplus generator
npm install -g yo
npm install -g generator-nxko
- Run the nxplus generator to see the cli commands
yo nxko
- Inside the root of a node project
yo nxko:«scaffold-command»
Scaffold Commands
:auth
Generates scaffolding for passport authentication
yo nxkplus:auth
Installs npm application dependencies:
- passport
- passport-local
- objective
- cookie-session
- cookie-parser
- bcryptjs
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.