By @ThThiery
This is a simple AngularJS Seed with RequireJS. The intent is to provide a base for using the requireJS with AngularJS.
- The
README.mdfile describe the project - The
rMyApp.jsfile describe the require configuration for the example - The
GruntFile.jsfile to describe the grunt Task to compile the example - The
package.jsonfile give useful informations for the example package (author, dependencies...) - The
lib/ngMyApp.jsthe main Angular module defintion
- Must have Git installed
- Must have node.js (at least v0.8.1) installed with npm (Node Package Manager)
- Must have Grunt node package installed globally.
npm install -g grunt-cli
Enter the following commands in the terminal.
git clone https://github.com/matohawk/angular-seed-requirejs.gitcd angular-seed-requirejsnpm install
- Installation and prerequisites
- To compile the example and generate the myApp.js use
grunt - To watch js files to any changes and compile the example and optimize use
grunt watch
- To compile the example and generate the myApp.js use
- We refer in the DOM only the myApp.js who is generate by RequireJS server side
- We use only RequireJS on the server
- We use the SHIM configuration for requireJS, I consider AMD module don't feet very well with AngularJS