Toolkit for rapid development of React and Angular 2 apps.
- Create the app folder
mkdir app_name
cd app_name
-
Optionally set app options in the
.frontendrc
file -
Install frontend-cli locally
npm install frontend-cli
frontend-cli will create app base file structure after installing oneself.
frontend-cli includes itself a scaffolding utility, bundler and development webserver which running by the bin/fe
executable at the root of the app directory.
Generate new code:
bin/fe generate <scaffold> <name> [..options]
Remove earlier generated code:
bin/fe destroy <scaffold> <name>
html
— index.html page templatestylelint
— stylelint config file
component
route
actions
reducer
Build an app:
bin/fe build [..options]
where the options
are:
--environment
or-e
— build for the desired enviromnent, choices are:development
,test
andproduction
. Default isdevelopment
. If omitted bundler will try to get this setting fromNODE_ENV
environment variable.--watch
or-w
— build in the watch mode.--config
or-c
— path to the Webpack config file options from which will override the internal config. If omitted bundler will try to load options fromwebpack.config
andWebpackfile
files in the root of the app directory.--options
or-o
— options object to pass to the external config if it is a function. Behaves just like the Webpack's CLI--env
option.
Run the development server which will watch your code and perform hot swapping on its changes:
bin/fe server [..options]
where the options
are:
--port
or-p
— set server port. Default is3000
.--bind
or-b
— set host bind server to. Default islocalhost
.--config
or-c
— same as in the bundler.--options
or-o
— same as in the bundler.