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
.frontendrcfile -
Install frontend-cli locally
npm install frontend-clifrontend-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
componentrouteactionsreducer
Build an app:
bin/fe build [..options]where the options are:
--environmentor-e— build for the desired enviromnent, choices are:development,testandproduction. Default isdevelopment. If omitted bundler will try to get this setting fromNODE_ENVenvironment variable.--watchor-w— build in the watch mode.--configor-c— path to the Webpack config file options from which will override the internal config. If omitted bundler will try to load options fromwebpack.configandWebpackfilefiles in the root of the app directory.--optionsor-o— options object to pass to the external config if it is a function. Behaves just like the Webpack's CLI--envoption.
Run the development server which will watch your code and perform hot swapping on its changes:
bin/fe server [..options]
where the options are:
--portor-p— set server port. Default is3000.--bindor-b— set host bind server to. Default islocalhost.--configor-c— same as in the bundler.--optionsor-o— same as in the bundler.