-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
50 lines (46 loc) · 1.16 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
const webpackDevConfig = require('./webpack.config.dev.js');
const webpackProdConfig = require('./webpack.config.prod.js');
module.exports = function (grunt) {
grunt.initConfig({
sass: {
dev: {
options: {
style: 'expanded'
},
files: {
'./dist/glint.css': './src/style.scss'
}
},
prod: {
options: {
style: 'compressed'
},
files: {
'./dist/glint.min.css': './src/style.scss'
}
}
},
webpack: {
dev: webpackDevConfig,
prod: webpackProdConfig,
},
watch: {
scripts: {
files: ['**/*.ts', '**/*.scss'],
tasks: ['dev'],
options: {
spawn: false,
},
},
},
});
grunt.loadNpmTasks('grunt-webpack');
grunt.loadNpmTasks("grunt-ts");
grunt.loadNpmTasks("grunt-babel");
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-rename');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('dev', ['sass:dev', 'webpack:dev']);
grunt.registerTask('prod', ['sass:prod', 'webpack:prod']);
grunt.registerTask('default', ['dev', 'prod']);
};