Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ryan778
GitHub Repository: Ryan778/Ryan778.github.io
Path: blob/master/emojionearea/Gruntfile.js
570 views
1
module.exports = function (grunt) {
2
"use strict";
3
4
var livereload = {
5
host: 'localhost',
6
port: 35729
7
};
8
9
grunt.initConfig({
10
pkg: grunt.file.readJSON('package.json'),
11
build: {
12
all: {
13
dest: "dist/emojionearea.js"
14
}
15
},
16
uglify: {
17
all: {
18
files: {
19
"dist/emojionearea.min.js": ["dist/emojionearea.js"]
20
},
21
options: {
22
preserveComments: false,
23
sourceMap: true,
24
ASCIIOnly: true,
25
sourceMapName: "dist/emojionearea.min.map",
26
report: "min",
27
beautify: {
28
"ascii_only": true
29
},
30
banner: "/*! EmojioneArea v<%= pkg.version %> | MIT license */",
31
compress: {
32
"hoist_funs": false,
33
loops: false,
34
unused: false
35
}
36
}
37
}
38
},
39
sass: {
40
all: {
41
options: {
42
unixNewlines: true,
43
compass: true,
44
lineNumbers: true
45
},
46
files: {
47
'dist/emojionearea.css': 'scss/emojionearea.scss'
48
}
49
},
50
},
51
cssmin: {
52
target: {
53
files: {
54
'dist/emojionearea.min.css': ['dist/emojionearea.css']
55
},
56
options: {
57
sourceMap: false
58
}
59
}
60
},
61
watch: {
62
sass: {
63
files: [
64
'scss/**/*.scss'
65
],
66
tasks: ['sass'],
67
options: {
68
livereload: livereload
69
}
70
},
71
js: {
72
files: [
73
'src/**/*.js'
74
],
75
tasks: ['build'],
76
options: {
77
livereload: livereload
78
}
79
}
80
},
81
});
82
83
grunt.loadNpmTasks('grunt-contrib-uglify');
84
grunt.loadNpmTasks('grunt-contrib-cssmin');
85
grunt.loadNpmTasks('grunt-contrib-watch');
86
grunt.loadNpmTasks('grunt-contrib-sass');
87
grunt.loadTasks("tasks");
88
89
grunt.registerTask("default", ["build", "uglify", "sass", "cssmin"]);
90
};
91
92