filebrowser/Gruntfile.js

82 lines
2.0 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: {
files: ['assets/css/src/sass/**/*.scss'],
tasks: ['sass', 'concat', 'cssmin']
},
js: {
files: ['assets/js/src/**/*.js'],
tasks: ['uglify']
},
2015-09-16 11:18:12 +00:00
},
sass: {
dist: {
options: {
style: 'expanded',
sourcemap: 'none'
},
files: [{
expand: true,
2015-09-16 12:02:19 +00:00
cwd: 'assets/css/src/sass',
2015-09-16 11:18:12 +00:00
src: ['**/*.scss'],
2015-09-16 12:02:19 +00:00
dest: 'assets/css/src',
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-16 12:58:36 +00:00
'assets/css/src/main.css'
2015-09-16 11:18:12 +00:00
],
2015-09-16 12:02:19 +00:00
dest: 'assets/css/src/main.css',
},
},
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-16 12:02:19 +00:00
cwd: 'assets/css/src',
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: {
target: {
files: {
2015-09-16 12:02:19 +00:00
'assets/js/app.min.js': ['node_modules/jquery/dist/jquery.js',
'node_modules/perfect-scrollbar/dist/js/perfect-scrollbar.jquery.js',
2015-09-16 11:18:12 +00:00
'node_modules/showdown/dist/showdown.js',
2015-09-16 13:19:35 +00:00
'node_modules/noty/js/noty/packaged/jquery.noty.packaged.js',
2015-09-16 12:58:36 +00:00
'assets/js/src/**/*.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
};