Using Google maps API to display a list of office stored in SharePoint
This project was created using the techniques described in this gist.
- Install NodeJs.
npm install -g grunt-cli bower
to install Grunt and Bower.npm install
to install development dependencies.bower install
to fetch front-end components using Bower.grunt server
to start up the development server using Grunt.
Although this project was built using Yeoman it is not needed to make future changes. Grunt, however, is. Both to run the development server (which includes liveReload, and a SharePoint REST services emulation) and to compile the project for a production environment.
Once you're satisfied with your changes you can stop the development server and run grunt build
to compile the project into a production-ready form using all the magic of the Yeoman generator it's built from. The end product can now be found in the dist/
directory and is ready for deployment.
-
grunt build
to process the source files into an optimized distributabale form. -
Configure the project's Grutfile to map to the production server location. By default, OSX will map the Loop to
/Volumes/theloop.gov.bc.ca
. -
grunt copy:sp
to deploy to The Loop using the custom copy task.Caution this command will overwite files without warning, be very careful where it is pointing.
-
grunt server
Starts a local web server (port 9000), opens the site in your default web browser, watches for changes in source files and rebuilds when changes are detected1. -
grunt build
Build a production ready copy of the site. Concatenates, minifies, and version stamps assets. -
grunt copy:sp
Copies the contents ofdist/
to the production environment.
Footnotes
-
LiveReload has extensions for Chrome, Firefox and Safari. ↩