forked from twbs/ratchet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
75 lines (67 loc) · 2.17 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) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Metadata.
meta: {
srcPath: 'lib/',
distPath: 'dist/',
docsPath: 'docs-assets/'
},
banner: '/*\n' +
' * =====================================================\n' +
' * Ratchet v<%= pkg.version %>\n' +
' * Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
' * Licensed under <%= _.pluck(pkg.licenses, "url").join(", ") %>\n' +
' *\n' +
' * Designed and built by @connors, @dhg, and @fat.\n' +
' * =====================================================\n' +
' */\n',
concat: {
options: {
banner: '<%= banner %>'
},
ratchet: {
src: [
'<%= meta.srcPath %>js/modals.js',
'<%= meta.srcPath %>js/popovers.js',
'<%= meta.srcPath %>js/push.js',
'<%= meta.srcPath %>js/segmented-controllers.js',
'<%= meta.srcPath %>js/sliders.js',
'<%= meta.srcPath %>js/toggles.js'
],
dest: '<%= meta.distPath %><%= pkg.name %>.js'
}
},
sass: {
options: {
banner: '<%= banner %>',
style: 'expanded',
},
dist: {
files: {
'<%= meta.distPath %><%= pkg.name %>.css': '<%= meta.srcPath %>sass/ratchet.scss',
'<%= meta.docsPath %>/css/docs.css': '<%= meta.srcPath %>sass/docs.scss',
'<%= meta.distPath %>ios-theme.css': '<%= meta.srcPath %>sass/theme-ios.scss',
'<%= meta.distPath %>android-theme.css': '<%= meta.srcPath %>sass/theme-android.scss'
}
}
},
watch: {
scripts: {
files: [
'<%= meta.srcPath %>/**/*.scss'
],
tasks: ['sass']
}
}
});
// Load the plugins
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-jekyll');
// Default task(s).
grunt.registerTask('default', ['sass', 'concat']);
grunt.registerTask('build', ['sass', 'concat']);
};