Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Fixed asset management structure
Browse files Browse the repository at this point in the history
  • Loading branch information
amoshaviv committed Apr 27, 2014
1 parent c91a330 commit 14f5d06
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 33 deletions.
4 changes: 2 additions & 2 deletions config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ module.exports.getGlobbedFiles = function(globPatterns, removeRoot) {
* Get the modules JavaScript files
*/
module.exports.getJavaScriptAssets = function(includeTests) {
var output = this.getGlobbedFiles(this.assets.lib.concat(this.assets.js), 'public/');
var output = this.getGlobbedFiles(this.assets.lib.js.concat(this.assets.js), 'public/');

// To include tests
if (includeTests) {
Expand All @@ -76,6 +76,6 @@ module.exports.getJavaScriptAssets = function(includeTests) {
* Get the modules CSS files
*/
module.exports.getCSSAssets = function() {
var output = this.getGlobbedFiles(this.assets.css, 'public/');
var output = this.getGlobbedFiles(this.assets.lib.css.concat(this.assets.css), 'public/');
return output;
};
24 changes: 14 additions & 10 deletions config/env/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,23 @@ module.exports = {
sessionSecret: 'MEAN',
sessionCollection: 'sessions',
assets: {
lib: {
css: [
'public/lib/bootstrap/dist/css/bootstrap.css',
'public/lib/bootstrap/dist/css/bootstrap-theme.css',
],
js: [
'public/lib/angular/angular.js',
'public/lib/angular-resource/angular-resource.js',
'public/lib/angular-animate/angular-animate.js',
'public/lib/angular-ui-router/release/angular-ui-router.js',
'public/lib/angular-ui-utils/ui-utils.js',
'public/lib/angular-bootstrap/ui-bootstrap-tpls.js'
]
},
css: [
'public/lib/bootstrap/dist/css/bootstrap.css',
'public/lib/bootstrap/dist/css/bootstrap-theme.css',
'public/modules/**/css/*.css'
],
lib: [
'public/lib/angular/angular.js',
'public/lib/angular-resource/angular-resource.js',
'public/lib/angular-animate/angular-animate.js',
'public/lib/angular-ui-router/release/angular-ui-router.js',
'public/lib/angular-ui-utils/ui-utils.js',
'public/lib/angular-bootstrap/ui-bootstrap-tpls.js'
],
js: [
'public/config.js',
'public/application.js',
Expand Down
22 changes: 14 additions & 8 deletions config/env/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@
module.exports = {
db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://localhost/mean',
assets: {
lib: [
'public/lib/angular/angular.js',
'public/lib/angular-resource/angular-resource.js',
'public/lib/angular-animate/angular-animate.js',
'public/lib/angular-ui-router/release/angular-ui-router.js',
'public/lib/angular-ui-utils/ui-utils.js',
'public/lib/angular-bootstrap/ui-bootstrap-tpls.js'
],
lib: {
css: [
'public/lib/bootstrap/dist/css/bootstrap.min.css',
'public/lib/bootstrap/dist/css/bootstrap-theme.min.css',
],
js: [
'public/lib/angular/angular.min.js',
'public/lib/angular-resource/angular-resource.min.js',
'public/lib/angular-animate/angular-animate.min.js',
'public/lib/angular-ui-router/release/angular-ui-router.min.js',
'public/lib/angular-ui-utils/ui-utils.min.js',
'public/lib/angular-bootstrap/ui-bootstrap-tpls.min.js'
]
},
css: 'public/dist/application.min.css',
js: 'public/dist/application.min.js'
},
Expand Down
1 change: 0 additions & 1 deletion config/policies.js

This file was deleted.

3 changes: 0 additions & 3 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,6 @@ module.exports = function(grunt) {
// Build task(s).
grunt.registerTask('build', ['jshint', 'csslint', 'loadConfig' ,'uglify', 'cssmin']);

// Build task(s).
grunt.registerTask('heroku-deploy', ['jshint', 'csslint', 'uglify', 'cssmin']);

// Test task.
grunt.registerTask('test', ['env:test', 'mochaTest', 'karma:unit']);
};
10 changes: 1 addition & 9 deletions public/dist/application.min.css

Large diffs are not rendered by default.

0 comments on commit 14f5d06

Please sign in to comment.