Skip to content

Commit 4a6361a

Browse files
authored
Merge pull request #12 from jeff-phillips-18/split
Allow use of common modules individually, add styling for messages
2 parents bd189f2 + 102099a commit 4a6361a

File tree

6 files changed

+3974
-19
lines changed

6 files changed

+3974
-19
lines changed

Gruntfile.js

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ module.exports = function (grunt) {
1212
descriptions: {
1313
'help': 'Task list helper for your Grunt enabled projects.',
1414
'clean': 'Deletes the content of the dist directory.',
15-
'build': 'Builds the project (including documentation) into the dist directory. You can specify modules to be built as arguments (' +
16-
'grunt build:buttons:notification) otherwise all available modules are built.',
15+
'build': 'Builds the project into the dist directory.',
1716
'test': 'Executes the karma testsuite.'
1817
},
1918
groups: {
@@ -29,6 +28,14 @@ module.exports = function (grunt) {
2928
options: {
3029
separator: ';'
3130
},
31+
ui: {
32+
src: ['src/**/*UI.module.js', 'dist/scripts/templates.js', 'src/components/**/*.js', 'src/filers/**/*.js'],
33+
dest: 'dist/origin-web-common-ui.js'
34+
},
35+
services: {
36+
src: ['src/**/*Services.module.js', 'src/services/**/*.js'],
37+
dest: 'dist/origin-web-common-services.js'
38+
},
3239
dist: {
3340
src: ['src/**/*.module.js', 'dist/scripts/templates.js', 'src/**/*.js'],
3441
dest: 'dist/origin-web-common.js'
@@ -105,28 +112,11 @@ module.exports = function (grunt) {
105112

106113
// You can specify which modules to build as arguments of the build task.
107114
grunt.registerTask('build', 'Create bootstrap build files', function () {
108-
var concatSrc = [];
109-
110-
if (this.args.length) {
111-
this.args.forEach(function (file) {
112-
if (grunt.file.exists('./src/' + file)) {
113-
grunt.log.ok('Adding ' + file + ' to the build queue.');
114-
concatSrc.push('src/' + file + '/*.js');
115-
} else {
116-
grunt.fail.warn('Unable to build module \'' + file + '\'. The module doesn\'t exist.');
117-
}
118-
});
119-
120-
} else {
121-
concatSrc = ['src/**/*.module.js', 'src/**/*.js'];
122-
}
123-
124115
grunt.task.run(['clean', 'ngtemplates', 'concat', 'ngAnnotate', 'less', 'uglify:build', 'test']);
125116
});
126117

127118
// Runs all the tasks of build with the exception of tests
128119
grunt.registerTask('deploy', 'Prepares the project for deployment. Does not run unit tests', function () {
129-
var concatSrc = 'src/**/*.js';
130120
grunt.task.run(['clean', 'ngtemplates', 'concat', 'ngAnnotate', 'less', 'uglify:build']);
131121
});
132122

0 commit comments

Comments
 (0)