-
Notifications
You must be signed in to change notification settings - Fork 4
/
Gruntfile.js
73 lines (65 loc) · 2.75 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
module.exports = function(grunt) {
'use strict';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// ファイル結合の設定
concat: {
dist: {
src: [
'app/assets/javascripts/flect.connection.js',
'app/assets/javascripts/flect.template.js',
'app/assets/javascripts/flect.messageDialog.js',
'app/scripts/intro.js' ,
'app/scripts/quizar.validator.js' ,
'app/scripts/quizar.const.js' ,
'app/scripts/quizar.common.js' ,
'app/scripts/quizar.datetime.js',
'app/scripts/quizar.pushState.js' ,
'app/scripts/quizar.pagingBar.js' ,
'app/scripts/quizar.effectDialog.js' ,
'app/scripts/quizar.context.js' ,
'app/scripts/quizar.user.js' ,
'app/scripts/quizar.home.js' ,
'app/scripts/quizar.userSetting.js' ,
'app/scripts/quizar.mypage.js' ,
'app/scripts/quizar.chat.js' ,
'app/scripts/quizar.makeRoom.js' ,
'app/scripts/quizar.questionList.js' ,
'app/scripts/quizar.makeQuestion.js' ,
'app/scripts/quizar.publishQuestion.js' ,
'app/scripts/quizar.entryEvent.js' ,
'app/scripts/quizar.editEvent.js' ,
'app/scripts/quizar.eventMembers.js' ,
'app/scripts/quizar.ranking.js' ,
'app/scripts/quizar.debug.js' ,
'app/scripts/quizar.app.js' ,
'app/scripts/outro.js'
],
dest: 'public/javascripts/<%= pkg.name %>.js'
}
},
// ファイル圧縮の設定
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: 'public/javascripts/<%= pkg.name %>.js',
dest: 'public/javascripts/<%= pkg.name %>.min.js'
}
},
watch: {
files: [
'app/assets/javascripts/*.js',
'app/scripts/*.js'
],
tasks: ['concat', 'uglify']
}
});
// プラグインのロード
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
// デフォルトタスクの設定
grunt.registerTask('default', [ 'concat', 'uglify', 'watch']);
};