-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.js
45 lines (43 loc) · 1.29 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
module.exports = function(grunt) {
const sass = require('node-sass');
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
sass: {
options: {
implementation: sass,
sourceMap: false
},
dist: {
files: {
'src/main.css': 'src/main.scss'
}
}
},
concat: {
options: {
banner: "/*! <%= pkg.name %> v<%= pkg.version %> | <%= pkg.homepage %> | <%= pkg.license %> License */\n\n",
footer: "\n/* Author: <%= pkg.author.name %> <<%= pkg.author.email %>>\n Updated: <%= grunt.template.today('dS mmm yyyy @ h:MM:ss TT') %> */"
},
css: {
src: ["node_modules/normalize.css/normalize.css", "src/main.css"],
dest: "dist/animadio.css"
}
},
postcss: {
options: { processors: [require("autoprefixer")({overrideBrowserslist: "defaults"})] },
css: { src: "dist/animadio.css" }
},
cssmin: {
target: {
files: [
{ "dist/animadio.min.css": ["dist/animadio.css"] }
]
}
}
});
grunt.loadNpmTasks("grunt-sass");
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-postcss");
grunt.loadNpmTasks("grunt-contrib-cssmin");
grunt.registerTask("default", ["sass", "concat", "postcss", "cssmin"]);
};