TOC
This is a seed app for AngularJs applications.
Technologies used:
- HTML5
- JADE
- ES6 (ecmascript 2015)
- FlowType
- SASS
- Gulp
- Karma/Jasmine
- Protractor
- We follow the AirBnB best practices and style guidelines for Javascript.
- Best practices and style guidelines for Angular.
- Best practices and style guidelines for SASS.
- Best practices and style guidelines for Protractor.
- We follow the Google best practices from the Material Design style guide.
There are two main builds for this project: Development and Production. Each of these builds is produced from a branch of the same name (ex. master/dev === the DEV build). Theses are the only branches that get deployed.
- Setup project (follow below steps).
- Make a new Branch named after the project and issue number.
- Example: Issue #3245 in red2678/angular_seed Main and named "Fix login button" would be: "asafe-3245-fix-login-button".
- Make Changes and include a description.
- Create a pull request and get it approved.
- Merge pull request into DEV.
- Merge pull request into MASTER.
- Open settings
- Click on
IntelliJ IDEA
from the top menu. - Click
Preferences
. - In the settings window on the left-hand menu, click
Languages and Frameworks
. - Click
Javascript
. - In the right-hand pane, from the dropdown labeled
JavaScript Language Version
selectflow
. - View Image
- Click on
Windows instructions coming soon!!
The below instructions are for Macintosh.
- Ruby comes pre-installed on most Mac distributions, use the below steps only if necessary.
- Download and run the installer for your system.
- Recommended, use the Ruby Version Manager (RVM) to manage Ruby versions on your machine.
- Working from your user root
cd ~/
. - Install Homebrew.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install NodeJs 4.x LTS and FlowType with Homebrew.
brew install node4-lts
- If the above command fails, try
brew install homebrew/versions/node4-lts
- If the above command fails, try
brew install flow
- For instructions on configuring FlowType see here.
- Install a few NodeJs global dependencies. NOTE you do not need
SUDO
here, thanks Homebrew ;)npm install -g gulp
npm install -g bower
npm install -g babel-cli
npm install -g npm-check-updates
3. Install Bundler
- Working from your user root
cd ~/
. gem install bundler
- Go to main Git website https://git-scm.com/, and download the installer, then run it.
- Note: Based on your operating system, the download link on the home page will serve up the appropriate installer.
This will determine your your project root.
Using the Git CLI
- Open a Terminal and navigate to where you wish to store the project (the below is an example, using SSH).
cd ~/workspaces
git clone https://github.com/red2678/angular_seed.git
cd angular_seed
- Link to sub page with screen shots :: needs to be done
- Working from your project root run
npm run initapp
To start developing, execute the gulp
default task.
- The
gulp
default task will do several things- Builds project from
src/main-site/
for thedev
environment tobuilds/dev/main-site
. - Runs site in web browser with gulp-connect with live reload support.
- Runs gulp watchers.
- Builds project from
- Open
http://localhost:60431
in your web browser.
See the Gulp section for more detailed information about the Gulp tasks for this project.
Third-party libraries are downloaded and managed by bower, npm and bundler. They should not be committed into the repository.
npm initapp
will automatically download any third-party libraries.- You can use
ncu
to check node dependencies andncu -m
to check bower dependencies.- WARNING If you run suggested commands, output by the above command,
ncu -u
orncu -m -u
this updates the actual bower.json or package.json with the latest version number for the packages. Only do this if you really mean it :)
- WARNING If you run suggested commands, output by the above command,
- You can use
bundle outdated
to check Ruby Gem dependencies via bundler.
We are using Jasmine/Karma for unit and Protractor for e2e.
gulp protractor
gulp jsTest
We are using gConfig as a configuration helper.
Below are the "main" or grouped tasks that you will use primarily.
gulp
- Runs the following tasks:
gulp watch
- Sets up Gulp watcher tasks for the source files, see gulpfile.babel.js
and specifically the watch
task for more information on what is being watched.
Loads the Gulp configuration from src/main-site/config/gulp.conf.js
.
Cleans the current build folder
Cleans all build folders
Compiles all *.es6
files
Takes complied JS, uglfies and concats it into main.min.js
.
Main SASS to CSS processing task.