ratchet/Gruntfile.js

72 строки
2.0 KiB
JavaScript
Исходник Обычный вид История

2013-09-11 22:01:13 +04:00
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Metadata.
meta: {
2013-09-12 01:58:52 +04:00
srcPath: 'lib/',
distPath: 'dist/'
},
2013-09-12 01:24:02 +04:00
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',
2013-09-12 01:58:52 +04:00
concat: {
2013-09-11 22:01:13 +04:00
options: {
2013-09-13 08:44:18 +04:00
banner: '<%= banner %>'
2013-09-11 22:01:13 +04:00
},
2013-09-12 01:58:52 +04:00
ratchet: {
src: [
'<%= meta.srcPath %>js/modals.js',
'<%= meta.srcPath %>js/popovers.js',
2013-09-12 01:58:52 +04:00
'<%= 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'
2013-09-11 22:01:13 +04:00
}
2013-09-12 01:58:52 +04:00
},
2013-09-11 23:53:07 +04:00
sass: {
options: {
2013-09-12 01:24:02 +04:00
banner: '<%= banner %>',
2013-09-15 01:24:30 +04:00
style: 'expanded',
},
dist: {
files: {
2013-09-17 08:46:46 +04:00
'<%= meta.distPath %><%= pkg.name %>.css': '<%= meta.srcPath %>sass/ratchet.scss',
'<%= meta.distPath %>theme-classic.css': '<%= meta.srcPath %>sass/theme-classic.scss'
}
}
},
watch: {
scripts: {
files: [
'<%= meta.srcPath %>/**/*.scss'
],
tasks: ['sass']
}
2013-09-11 22:01:13 +04:00
}
});
2013-09-14 02:40:18 +04:00
// Load the plugins
grunt.loadNpmTasks('grunt-jekyll');
2013-09-11 23:31:57 +04:00
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
2013-09-12 01:58:52 +04:00
grunt.loadNpmTasks('grunt-contrib-concat');
2013-09-11 22:01:13 +04:00
// Default task(s).
2013-09-12 01:58:52 +04:00
grunt.registerTask('default', ['sass', 'concat']);
grunt.registerTask('build', ['sass', 'concat']);
2013-09-11 22:01:13 +04:00
};