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

Commit 30f977c

Browse files
committed
Support ngmin
1 parent 6354178 commit 30f977c

File tree

3 files changed

+469
-372
lines changed

3 files changed

+469
-372
lines changed

gruntfile.js

Lines changed: 12 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22

33
module.exports = function(grunt) {
4-
<<<<<<< HEAD
54
// Project Configuration
65
grunt.initConfig({
76
pkg: grunt.file.readJSON('package.json'),
@@ -62,7 +61,7 @@ module.exports = function(grunt) {
6261
mangle: false
6362
},
6463
files: {
65-
'public/dist/application.min.js': '<%= applicationJavaScriptFiles %>'
64+
'public/dist/application.min.js': 'public/dist/application.js'
6665
}
6766
}
6867
},
@@ -94,6 +93,13 @@ module.exports = function(grunt) {
9493
}
9594
}
9695
},
96+
ngmin: {
97+
production: {
98+
files: {
99+
'public/dist/application.js': '<%= applicationJavaScriptFiles %>'
100+
}
101+
}
102+
},
97103
concurrent: {
98104
default: ['nodemon', 'watch'],
99105
debug: ['nodemon', 'watch', 'node-inspector'],
@@ -119,118 +125,6 @@ module.exports = function(grunt) {
119125
}
120126
}
121127
});
122-
=======
123-
// Project Configuration
124-
grunt.initConfig({
125-
pkg: grunt.file.readJSON('package.json'),
126-
watch: {
127-
serverViews: {
128-
files: ['app/views/**'],
129-
options: {
130-
livereload: true,
131-
}
132-
},
133-
serverJS: {
134-
files: ['gruntfile.js', 'server.js', 'config/**/*.js', 'app/**/*.js'],
135-
tasks: ['jshint'],
136-
options: {
137-
livereload: true,
138-
}
139-
},
140-
clientViews: {
141-
files: ['public/modules/**/views/*.html'],
142-
options: {
143-
livereload: true,
144-
}
145-
},
146-
clientJS: {
147-
files: ['public/js/**/*.js', 'public/modules/**/*.js'],
148-
tasks: ['jshint'],
149-
options: {
150-
livereload: true,
151-
}
152-
},
153-
clientCSS: {
154-
files: ['public/**/css/*.css'],
155-
tasks: ['csslint'],
156-
options: {
157-
livereload: true,
158-
}
159-
}
160-
},
161-
jshint: {
162-
all: {
163-
src: ['gruntfile.js', 'server.js', 'config/**/*.js', 'app/**/*.js', 'public/js/**/*.js', 'public/modules/**/*.js'],
164-
options: {
165-
jshintrc: true
166-
}
167-
}
168-
},
169-
csslint: {
170-
options: {
171-
csslintrc: '.csslintrc',
172-
},
173-
all: {
174-
src: ['public/modules/**/css/*.css']
175-
}
176-
},
177-
ngmin: {
178-
production: {
179-
files: {
180-
'public/dist/application.js': '<%= applicationJavaScriptFiles %>'
181-
}
182-
}
183-
},
184-
uglify: {
185-
production: {
186-
options: {
187-
mangle: false
188-
},
189-
files: {
190-
'public/dist/application.min.js': 'public/dist/application.js'
191-
}
192-
}
193-
},
194-
cssmin: {
195-
combine: {
196-
files: {
197-
'public/dist/application.min.css': '<%= applicationCSSFiles %>'
198-
}
199-
}
200-
},
201-
nodemon: {
202-
dev: {
203-
script: 'server.js',
204-
options: {
205-
nodeArgs: ['--debug']
206-
}
207-
}
208-
},
209-
concurrent: {
210-
tasks: ['nodemon', 'watch'],
211-
options: {
212-
logConcurrentOutput: true
213-
}
214-
},
215-
env: {
216-
test: {
217-
NODE_ENV: 'test'
218-
}
219-
},
220-
mochaTest: {
221-
src: ['app/tests/**/*.js'],
222-
options: {
223-
reporter: 'spec',
224-
require: 'server.js'
225-
}
226-
},
227-
karma: {
228-
unit: {
229-
configFile: 'karma.conf.js'
230-
}
231-
}
232-
});
233-
>>>>>>> pr/72
234128

235129
// Load NPM tasks
236130
require('load-grunt-tasks')(grunt);
@@ -248,26 +142,17 @@ module.exports = function(grunt) {
248142
});
249143

250144
// Default task(s).
251-
grunt.registerTask('default', ['jshint', 'csslint', 'concurrent:default']);
145+
grunt.registerTask('default', ['lint', 'concurrent:default']);
252146

253147
// Debug task.
254-
grunt.registerTask('debug', ['jshint', 'csslint', 'concurrent:debug']);
148+
grunt.registerTask('debug', ['lint', 'concurrent:debug']);
255149

256-
<<<<<<< HEAD
257150
// Lint task(s).
258151
grunt.registerTask('lint', ['jshint', 'csslint']);
259152

260153
// Build task(s).
261-
grunt.registerTask('build', ['jshint', 'csslint', 'loadConfig', 'uglify', 'cssmin']);
154+
grunt.registerTask('build', ['lint', 'loadConfig', 'ngmin', 'uglify', 'cssmin']);
262155

263156
// Test task.
264157
grunt.registerTask('test', ['env:test', 'mochaTest', 'karma:unit']);
265-
};
266-
=======
267-
// Build task(s).
268-
grunt.registerTask('build', ['jshint', 'csslint', 'loadConfig', 'ngmin', 'uglify', 'cssmin']);
269-
270-
// Test task.
271-
grunt.registerTask('test', ['env:test', 'mochaTest', 'karma:unit']);
272-
};
273-
>>>>>>> pr/72
158+
};

0 commit comments

Comments
 (0)