|
|
|
|
@ -9,85 +9,88 @@ module.exports = function(grunt) {
@@ -9,85 +9,88 @@ module.exports = function(grunt) {
|
|
|
|
|
dest: 'dist/', |
|
|
|
|
}, |
|
|
|
|
jquery: { |
|
|
|
|
files: [ |
|
|
|
|
{ |
|
|
|
|
expand: true, |
|
|
|
|
cwd: 'bower_components/jquery/dist/', |
|
|
|
|
src: [ |
|
|
|
|
'jquery.min.js', |
|
|
|
|
'jquery.js', |
|
|
|
|
], |
|
|
|
|
dest: 'dist/js/' |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
files: [{ |
|
|
|
|
expand: true, |
|
|
|
|
cwd: 'bower_components/jquery/dist/', |
|
|
|
|
src: [ |
|
|
|
|
'jquery.min.js', |
|
|
|
|
'jquery.js', |
|
|
|
|
], |
|
|
|
|
dest: 'dist/js/' |
|
|
|
|
}, ] |
|
|
|
|
}, |
|
|
|
|
bootstrap: { |
|
|
|
|
files: [ |
|
|
|
|
{ |
|
|
|
|
expand: true, |
|
|
|
|
cwd: 'bower_components/bootstrap/dist/', |
|
|
|
|
src: [ |
|
|
|
|
'js/bootstrap.js', |
|
|
|
|
'js/bootstrap.min.js', |
|
|
|
|
'css/bootstrap.css', |
|
|
|
|
'css/bootstrap.min.css' |
|
|
|
|
], |
|
|
|
|
dest: 'dist/' |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
files: [{ |
|
|
|
|
expand: true, |
|
|
|
|
cwd: 'bower_components/bootstrap/dist/', |
|
|
|
|
src: [ |
|
|
|
|
'js/bootstrap.js', |
|
|
|
|
'js/bootstrap.min.js', |
|
|
|
|
'css/bootstrap.css', |
|
|
|
|
'css/bootstrap.min.css' |
|
|
|
|
], |
|
|
|
|
dest: 'dist/' |
|
|
|
|
}, ] |
|
|
|
|
}, |
|
|
|
|
glyphicons: { |
|
|
|
|
files: [ |
|
|
|
|
{ |
|
|
|
|
expand: true, |
|
|
|
|
cwd: 'bower_components/bootstrap/', |
|
|
|
|
src: [ |
|
|
|
|
'fonts/glyphicons-halflings-regular.eot', |
|
|
|
|
'fonts/glyphicons-halflings-regular.svg', |
|
|
|
|
'fonts/glyphicons-halflings-regular.ttf', |
|
|
|
|
'fonts/glyphicons-halflings-regular.woff', |
|
|
|
|
], |
|
|
|
|
dest: 'dist/' |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
files: [{ |
|
|
|
|
expand: true, |
|
|
|
|
cwd: 'bower_components/bootstrap/', |
|
|
|
|
src: [ |
|
|
|
|
'fonts/glyphicons-halflings-regular.eot', |
|
|
|
|
'fonts/glyphicons-halflings-regular.svg', |
|
|
|
|
'fonts/glyphicons-halflings-regular.ttf', |
|
|
|
|
'fonts/glyphicons-halflings-regular.woff', |
|
|
|
|
], |
|
|
|
|
dest: 'dist/' |
|
|
|
|
}, ] |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
less: { |
|
|
|
|
development: { |
|
|
|
|
expanded: { |
|
|
|
|
options: { |
|
|
|
|
paths: ["css"] |
|
|
|
|
}, |
|
|
|
|
files: { |
|
|
|
|
"dist/css/<%= pkg.name %>.css": "less/<%= pkg.name %>.less" |
|
|
|
|
"dist/css/<%= pkg.slug %>.css": "less/<%= pkg.slug %>.less" |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
production: { |
|
|
|
|
minified: { |
|
|
|
|
options: { |
|
|
|
|
paths: ["css"], |
|
|
|
|
cleancss: true |
|
|
|
|
}, |
|
|
|
|
files: { |
|
|
|
|
"dist/css/<%= pkg.name %>.css": "less/<%= pkg.name %>.less" |
|
|
|
|
"dist/css/<%= pkg.slug %>.min.css": "less/<%= pkg.slug %>.less" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
|
scripts: { |
|
|
|
|
files: ['js/**'], |
|
|
|
|
tasks: ['concat'], |
|
|
|
|
banner: '/*!\n' + |
|
|
|
|
' * <%= pkg.name %> v<%= pkg.version %> (<%= pkg.homepage %>)\n' + |
|
|
|
|
' * Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' + |
|
|
|
|
' * Licensed under <%= pkg.license.type %> (<%= pkg.license.url %>)\n' + |
|
|
|
|
' */\n', |
|
|
|
|
usebanner: { |
|
|
|
|
dist: { |
|
|
|
|
options: { |
|
|
|
|
spawn: false, |
|
|
|
|
position: 'top', |
|
|
|
|
banner: '<%= banner %>' |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
css: { |
|
|
|
|
files: { |
|
|
|
|
src: ['dist/css/<%= pkg.slug %>.css', 'dist/css/<%= pkg.slug %>.min.css', 'dist/js/<%= pkg.slug %>.js'] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
|
less: { |
|
|
|
|
files: ['less/*.less'], |
|
|
|
|
tasks: ['less'], |
|
|
|
|
options: { |
|
|
|
|
spawn: false, |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
html: { |
|
|
|
|
files: ['*.html', 'mail/**'], |
|
|
|
|
copy: { |
|
|
|
|
files: ['*.html', 'mail/**', 'js/**', 'img/**'], |
|
|
|
|
tasks: ['copy'], |
|
|
|
|
options: { |
|
|
|
|
spawn: false, |
|
|
|
|
@ -99,10 +102,10 @@ module.exports = function(grunt) {
@@ -99,10 +102,10 @@ module.exports = function(grunt) {
|
|
|
|
|
// Load the plugins.
|
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-copy'); |
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-less'); |
|
|
|
|
grunt.loadNpmTasks('grunt-banner'); |
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-watch'); |
|
|
|
|
|
|
|
|
|
// Default task(s).
|
|
|
|
|
grunt.registerTask('default', ['copy', 'less']); |
|
|
|
|
grunt.registerTask('less-compile', ['less']); |
|
|
|
|
grunt.registerTask('default', ['copy', 'less', 'usebanner']); |
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|