filebrowser/Gruntfile.js

95 lines
2.7 KiB
JavaScript
Raw Normal View History

2015-09-16 11:18:12 +00:00
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.initConfig({
watch: {
2015-09-16 12:58:36 +00:00
sass: {
2015-09-19 13:25:35 +00:00
files: ['assets/src/sass/**/*.scss'],
2015-09-16 12:58:36 +00:00
tasks: ['sass', 'concat', 'cssmin']
},
js: {
2015-09-19 13:25:35 +00:00
files: ['assets/src/js/**/*.js'],
tasks: ['uglify:main']
2015-09-16 12:58:36 +00:00
},
2015-09-16 11:18:12 +00:00
},
sass: {
dist: {
options: {
style: 'expanded',
sourcemap: 'none'
},
files: [{
expand: true,
2015-09-19 13:25:35 +00:00
cwd: 'assets/src/sass',
2015-09-16 11:18:12 +00:00
src: ['**/*.scss'],
2015-09-19 13:25:35 +00:00
dest: 'temp/css',
2015-09-16 11:18:12 +00:00
ext: '.css'
}]
}
},
concat: {
css: {
src: ['node_modules/normalize.css/normalize.css',
'node_modules/font-awesome/css/font-awesome.css',
2015-09-16 18:34:53 +00:00
'node_modules/animate.css/animate.min.css',
2015-09-18 08:47:02 +00:00
'node_modules/codemirror/lib/codemirror.css',
2015-09-18 20:46:25 +00:00
'node_modules/codemirror/theme/mdn-like.css',
2015-09-19 13:25:35 +00:00
'temp/css/**/*.css'
2015-09-16 11:18:12 +00:00
],
2015-09-19 13:25:35 +00:00
dest: 'temp/css/main.css',
2015-09-16 12:02:19 +00:00
},
},
copy: {
main: {
files: [{
expand: true,
flatten: true,
src: ['node_modules/font-awesome/fonts/**'],
dest: 'assets/fonts'
}],
2015-09-16 11:18:12 +00:00
},
},
cssmin: {
target: {
files: [{
expand: true,
2015-09-19 13:25:35 +00:00
cwd: 'temp/css/',
2015-09-16 11:18:12 +00:00
src: ['*.css', '!*.min.css'],
2015-09-16 12:02:19 +00:00
dest: 'assets/css/',
2015-09-16 11:18:12 +00:00
ext: '.min.css'
}]
}
},
uglify: {
2015-09-19 13:25:35 +00:00
plugins: {
2015-09-16 11:18:12 +00:00
files: {
2015-09-19 13:25:35 +00:00
'assets/js/plugins.min.js': ['node_modules/jquery/dist/jquery.min.js',
2015-09-17 10:32:27 +00:00
'node_modules/perfect-scrollbar/dist/js/min/perfect-scrollbar.jquery.min.js',
'node_modules/showdown/dist/showdown.min.js',
'node_modules/noty/js/noty/packaged/jquery.noty.packaged.min.js',
2015-09-16 20:48:08 +00:00
'node_modules/jquery-pjax/jquery.pjax.js',
2015-09-17 10:32:27 +00:00
'node_modules/jquery-serializejson/jquery.serializejson.min.js',
2015-09-18 08:47:02 +00:00
'node_modules/codemirror/lib/codemirror.js',
2015-09-19 13:47:59 +00:00
'node_modules/codemirror/mode/css/css.js',
'node_modules/codemirror/mode/javascript/javascript.js',
'node_modules/codemirror/mode/markdown/markdown.js',
'node_modules/codemirror/mode/sass/sass.js',
'node_modules/codemirror/mode/htmlmixed/htmlmixed.js'
2015-09-16 11:18:12 +00:00
]
}
2015-09-19 13:25:35 +00:00
},
main: {
files: {
'assets/js/app.min.js': ['assets/src/js/**/*.js']
}
2015-09-16 11:18:12 +00:00
}
}
});
2015-09-16 12:02:19 +00:00
grunt.registerTask('default', ['copy', 'sass', 'concat', 'cssmin', 'uglify']);
2015-09-16 11:18:12 +00:00
};