Skip to content

Commit 4aafb6c

Browse files
committed
(feat) Remove most of the Grunt functionality and put it in webpack
1 parent aa07768 commit 4aafb6c

File tree

5 files changed

+4
-57
lines changed

5 files changed

+4
-57
lines changed

Gruntfile.js

+2-37
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,6 @@ module.exports = function(grunt) {
22
grunt.initConfig({
33
pkg: grunt.file.readJSON('package.json'),
44

5-
concat: {
6-
options: {
7-
seperator: ';'
8-
},
9-
dist: {
10-
src: [
11-
'client/**/*.js'
12-
],
13-
dest: 'build/production.js'
14-
}
15-
},
16-
17-
uglify: {
18-
my_target: {
19-
files: {
20-
'build/production.min.js': ['public/production.js']
21-
}
22-
}
23-
},
24-
25-
sass: {
26-
dist: {
27-
files: {
28-
// destination: source
29-
'client/styles/styles.css': 'client/styles/styles.scss'
30-
}
31-
}
32-
},
33-
34-
cssmin: {
35-
my_target: {
36-
files: {
37-
'build/styles.min.css': 'client/styles/styles.css'
38-
}
39-
}
40-
},
41-
425
mochaTest: {
436
test: {
447
options: {
@@ -53,6 +16,7 @@ module.exports = function(grunt) {
5316

5417
});
5518

19+
grunt.loadNpmTasks('grunt-babel');
5620
grunt.loadNpmTasks('grunt-contrib-concat');
5721
grunt.loadNpmTasks('grunt-contrib-uglify');
5822
grunt.loadNpmTasks('grunt-contrib-sass');
@@ -61,6 +25,7 @@ module.exports = function(grunt) {
6125
grunt.loadNpmTasks('grunt-istanbul');
6226

6327
grunt.registerTask('build', [
28+
'babel',
6429
'concat',
6530
'uglify',
6631
'sass',

client/styles/styles.css

-7
This file was deleted.

client/styles/styles.css.map

-7
This file was deleted.

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
"sass-loader": "^4.0.0",
4343
"sinon": "^1.17.5",
4444
"sinon-as-promised": "^4.0.2",
45-
"style-loader": "^0.13.1",
4645
"supertest": "^2.0.0",
4746
"webpack": "^1.13.1",
4847
"webpack-dev-server": "^1.14.1"

webpack.config.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,10 @@ module.exports = {
2828
},
2929
{
3030
test: /\.scss$/,
31-
loaders: ['style', 'css', 'sass']
31+
loaders: "css-loader!sass-loader
3232
}
3333
]
34-
},
35-
sassLoader: {
36-
includePaths: [path.resolve(__dirname, "./client/styles")]
37-
},
34+
}
3835
devServer: {
3936
contentBase: './build'
4037
}

0 commit comments

Comments
 (0)