-
Notifications
You must be signed in to change notification settings - Fork 1
/
GruntFile.js
75 lines (73 loc) · 2.38 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
74
75
module.exports = function(grunt) {
'use strict';
// Load grunt plugins 'just-in-time'
require('jit-grunt')(grunt);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
dirs: {
css: "assets/css",
js: "assets/js",
scss: "assets/scss"
},
watch: {
options: {
spawn: false // Makes watch run A LOT faster, and also lets you pass variables to the grunt tasks being called
},
js: {
files: ['<%= dirs.js %>/src/*.js'],
tasks: ['uglify','jshint']
},
scss: {
files: [
'<%= dirs.scss %>/*.scss'
],
tasks: ['compass','concat:css']
}
},
jshint: {
all: ['<%= dirs.js %>/src/*.js']
},
compass: {
dist: {
options: {
sassDir: '<%= dirs.scss %>',
cssDir: '<%= dirs.css %>/src',
environment: 'production',
raw: 'preferred_syntax = :scss\n', // Use `raw` since it's not directly available
outputStyle: 'compressed'
}
}
},
concat: {
css: {
options: {
separator: ''
},
src: ['<%= dirs.css %>/src/*.css'],
dest: '<%= dirs.css %>/dist/amarkal-settings.min.css'
}
},
uglify: {
main: {
options: {
sourceMap: true,
wrap: 'Amarkal'
},
files: {
'<%= dirs.js %>/dist/amarkal-settings.min.js': [
'<%= dirs.js %>/src/core.js',
'<%= dirs.js %>/src/notifier.js',
'<%= dirs.js %>/src/search.js',
'<%= dirs.js %>/src/sections.js',
'<%= dirs.js %>/src/fields.js',
'<%= dirs.js %>/src/header.js',
'<%= dirs.js %>/src/button.js',
'<%= dirs.js %>/src/form-controls.js',
'<%= dirs.js %>/src/functions.js'
]
}
}
}
});
};