Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.exports = function (grunt) {
- var jsFiles = [
- 'public/app/services/*.js',
- 'public/app/directives/*.js',
- 'public/app/controllers/*.js'
- ];
- grunt.initConfig({
- pkg: grunt.file.readJSON('package.json'),
- uglify: {
- options: {
- banner: '/*\n <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> \n*/\n'
- },
- build: {
- files: {
- 'public/build/script.min.js': jsFiles
- }
- }
- },
- concat: {
- options: {
- separator: '\n;\n\n'
- },
- dist: {
- src: ["public/vendor/jquery/dist/jquery.min.js",
- "public/vendor/bootstrap/dist/js/bootstrap.min.js",
- "public/vendor/angular/angular.min.js",
- "public/vendor/ui-bootstrap-custom-build/ui-bootstrap-custom-tpls-1.1.1.js",
- "public/vendor/ui-bootstrap-custom-build/ui-bootstrap-custom-1.1.1.js",
- "public/vendor/angular-ui-router/release/angular-ui-router.min.js",
- "public/vendor/toastr/toastr.min.js",
- "public/vendor/ngstorage/ngStorage.min.js",
- "public/vendor/angular-ui-switch/angular-ui-switch.min.js",
- "public/vendor/underscore/underscore.js"
- ],
- dest: 'public/build/all.js'
- }
- },
- jshint: {
- beforeconcat: jsFiles,
- afterconcat: ['public/build/script.min.js']
- },
- watch: {
- scripts: {
- files: jsFiles,
- tasks: ['uglify'],
- options: {
- spawn: false,
- },
- },
- },
- cssmin: {
- options: {
- shorthandCompacting: false,
- roundingPrecision: -1
- },
- target: {
- files: {
- 'public/build/all.min.css': [
- 'public/css/bootstrap.css',
- 'public/css/bootstrap-toggle.min.css',
- 'public/css/custom.css',
- 'public/css/font-awesome.min.css',
- "public/vendor/ui-bootstrap-custom-build/ui-bootstrap-custom-1.1.1-csp.css"
- ]
- }
- }
- }
- });
- grunt.loadNpmTasks('grunt-contrib-jshint');
- grunt.loadNpmTasks("grunt-contrib-uglify");
- grunt.loadNpmTasks('grunt-contrib-concat');
- grunt.loadNpmTasks('grunt-contrib-cssmin');
- grunt.loadNpmTasks('grunt-contrib-watch');
- grunt.registerTask('default', ['jshint',/* 'uglify',*/ 'concat', 'cssmin', 'watch']);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement