New Force.com Project
April 07, 2015
- Insure dependencies are configured correctly
- Sublime Text
- MavensMate
- Node
- Gulp
- Yeoman Generator w/ npm link
- Open an empty Sublime Text. Create new MavensMate Project. Give it a name like app-name. It will create the folder and structure for the project. It's only necessary to fill out the first tab. Insure your MavensMate settings are pointing you to the correct folder to store the project.
ctrl+shift+m
- Create "spa/appName" path. We create the two layer structure so when Gulp builds the resources, they are in the correct folder. "cd" to the new dir and run the "Cs Angular" Yeoman generator to create front end app.
-
Yo
- We will name the static resource appNameStatic and pick the packages we are comfortable with (Angular 1.3, jQuery 2, RESTAngular, ui-router, Bootstrap, Angular UI, less, js, and html
- Let it run. It may take a few minutes.
- go to appName folder and run Gulp Build.
- go to package.json, and remove the gulp-ng-annotate line
- run "npm install gulp-ng-annotate --save-dev" may need to be run
- Insure folder structure looks like ...
.../[app-name] |-config |-resource-bundles //Generated By Gulp Build |---appNameStatic.resource |-----assets |-------images |-----fonts |-----scripts |-----styles |-spa |---[appName] |-----bower_components |-----db |-----dist |-----e2e |-----gulp |-----node_modules |-----src |-------app |---------[main] |---------[view] |-------assets |---------images |---------less |-------components |---------[data] |---------[navbar] |---------[component] |-src |---classes |---components |---pages |---staticresources |----appName..xml //The XML file is bundled with the Resource-Bundles Zip |---triggers
- Start Development : spa/appName/src is the folder in which we will develop our SPA app.
- Run json-server on a stub to create a test REST endpoint
- Run Gulp Serve to start the web server