-
Presentation
- Bower - dependency mgt
- Grunt - build tasks, like Ant or Gradle
- they depend on Npm
-
Problems to solve:
- relative paths
- we import the files manually
- no compression for JS & CSS
- no support for Less
- ... other?
-
Bower
- Getting the files
- Configuration with .bowerrc
-
Grunt
clean dev
--> look intarget/dev
clean prod
--> look intarget/prod
clean connect:dev watch
--> livereload enabled- change some Less code
-
Adding a dependency: angular-translate-loader-static-files & angular-translate
-
Using
bower install --save angular-translate-loader-static-files angular-translate
-
Adding them in
build.config.js
'vendor/angular-translate/angular-translate.js', 'vendor/angular-translate-loader-static-files/angular-translate-loader-static-files.js'
-
Running
grunt clean dev
and look the page source
-
-
Improvements
- The code came initially from ng-boilerplate, no longer maintained: clutter with build.config.js. Can be simplified.
- Karma tests
- index.html template - not very nice code in the Gruntfile.js - maybe a plugin exists for this
- proper archive for the static web site (.zip), to be included in the Maven POM or in Grunt itself (Maven looks easier and there will be the benefit of having the ZIP considered as an artefact out of the box for publication)
-
Experience on a bigger project:
- as long as you stick to the directory structure, nothing to change. It works and keep on working.
- is the build reproducible on the long term? Difficult to say: many layers of dependencies (looks like Maven): node, grunt, bower & all plugins.
-
Notifications
You must be signed in to change notification settings - Fork 4
brusselsswcraft/dojo-grunt
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Code Dojo about Grunt and Bower
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published