An example of Angular application usign redux.
node --version
The version should be at or above 6.10
If you don't have Node.js installed go to nodejs and install the appropiate version or use nvm (Recommended).
yarn --version
The version should be at or above 0.21
If you don't have yarn installed go to yarn and install the appropiate version.
# cd to your project folder
yarn
NODE_ENV="development"
. Environment for server.
To change any of this variables:
export NODE_ENV="production"
# cd to your project folder
yarn start
# After this, a message indicate the url to run the application
This create a server using webpack-dev-server
to serve the application in development environment.
The browser reloads the app when any file change.
# cd to your project folder
# Set environment variable for production
export NODE_ENV='production'
# Build
yarn run build
Put all in dist
folder ready for production.
Follow this rules to update dependencies:
- Install dependencies
# To install production dependencies
# cd to your project folder
yarn add @angular/core --exact
# To install development dependencies
# cd to your project folder
yarn add eslint --exact --dev
- Uninstall dependencies
# cd to your project folder
yarn remove @angular/core
- To Upgrade any dependencies follow
Uninstall dependencies
step and install again likeInstall dependencies
.
To run eslint in console type:
# cd to your project folder
yarn run lint