BlueOak Quickstart Guide - BlueOakJS/generator-blueoak GitHub Wiki
BlueOak Quickstart Guide
1. Install/Update Prerequisites
git
NodeJS (4.2 or higher)
Use node -v to check your current version.
On a Mac, use sudo npm install -g n and then sudo n stable to upgrade your version of node. Note: You will need to do npm install again on any node projects you have on your system to reinstall native code modules compatible with the new version of node you installed.
WARNING: The newest version of NodeJS may cause issues with gulp. It is recommended to install the Long Term Support version.
npm (3.5.2)
yeoman (1.8)
gulp (3.9.0)
bower (1.5.2)
Cordova (5.4.1) -If you plan to create a hybrid Cordova app
ios-sim
ios-deploy (may need to use --unsafe-perm flag)
MFP (7.1) -If you plan to create a hybrid IBM MobileFirst Platform app
2. Download BlueOak
Clone the generator-blueoak git repository
run git clone https://github.com/PointSource/generator-blueoak
3. Install BlueOak
Navigate to the [git_repo_name]/blueoak directory
run npm link. Note: You might need sudo here.
run yo --help
Verify that everything installed. (You should see the 'blueoak' generator and its sub-generators)
4. Generate a BlueOak project
Create a new directory for the project you would like to generate
Navigate to your new directory
run yo blueoak
This will start the BlueOak project generator
Complete the subsequent prompts to customize your new project
Note: See Troubleshooting if you run into issues with this command.
5. Generate a new asset
run yo --help to see a list of blueoak sub-generators. These can be used to create a new asset for your project.
ex. yo blueoak:controller [name] will create a new AngularJS Controller in [project_name]/client/src/app/
ex. yo blueoak:service [name] will create a new AngularJS Service [project_name]/client/src/app/
Note: For more information on the BlueOak sub-generators, see the list of sub-generators
6. Build and Deploy
To build and deploy a SPA
Navigate to the [project_name]/client directory
run gulp serve-spa
To build/deploy iOS
run gulp serve-ios
IMPORTANT: You must first disable bitcode on iOS MFP projects or the builds will fail.
To do this: On the Xcode Build Settings tab, in the Build Options group, set Enable Bitcode to No