ratchet/Gruntfile.js

75 строки
2.2 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-10-12 23:11:34 +04:00
srcPath: 'lib/',
distPath: 'dist/'
},
2013-09-12 01:24:02 +04:00
banner: '/*\n' +
2013-10-12 23:11:34 +04:00
' * =====================================================\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',
2013-12-15 05:21:00 +04:00
'<%= meta.srcPath %>js/toggles.js'
2013-09-12 01:58:52 +04:00
],
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: {
2013-10-12 23:11:34 +04:00
options: {
banner: '<%= banner %>',
style: 'expanded',
},
dist: {
files: {
'<%= meta.distPath %><%= pkg.name %>.css': '<%= meta.srcPath %>sass/ratchet.scss',
2013-12-15 04:24:35 +04:00
'<%= meta.distPath %><%= pkg.name %>-theme.css': '<%= meta.srcPath %>sass/theme-classic.scss',
2013-12-20 22:30:00 +04:00
'<%= meta.distPath %>ios-theme.css': '<%= meta.srcPath %>sass/theme-ios.scss',
'<%= meta.distPath %>android-theme.css': '<%= meta.srcPath %>sass/theme-android.scss'
}
2013-10-12 23:11:34 +04:00
}
},
watch: {
2013-10-12 23:11:34 +04:00
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-10-12 23:11:34 +04:00
};