Skip to content
Snippets Groups Projects
Gruntfile.js 3.11 KiB
module.exports = function (grunt) {

    // Project configuration.
    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        copy: {
            bootstrap: {
                files: [
                    {
                        cwd: 'bower_components/bootstrap/dist/css/',
                        src: [
                            'bootstrap.min.css',
                            'bootstrap-theme.min.css'
                        ],
                        dest: 'packages/bootstrap/css/',
                        filter: 'isFile',
                        expand: true,
                        flatten: true
                    },
                    {
                        cwd: 'bower_components/bootstrap/dist/js/',
                        src: [
                            'bootstrap.min.js'
                        ],
                        dest: 'packages/bootstrap/js/',
                        expand: true,
                        flatten: true
                    },
                    {
                        cwd: 'bower_components/bootstrap/dist/fonts/',
                        expand: true,
                        src: [
                            '*'
                        ],
                        dest: 'packages/bootstrap/fonts/',
                        flatten: true
                    }
                ]
            },
            jquery: {
                files: [
                    {
                        cwd: 'bower_components/jquery/dist/',
                        src: [
                            'jquery.min.js'
                        ],
                        expand: true,
                        dest: 'packages/jquery/js/',
                        flatten: true
                    }
                ]
            },
            jqwidgets: {
                files: [
                    {
                        cwd: 'bower_components/jqwidgets/jqwidgets/',
                        src: [
                            'jqx-all.js'
                        ],
                        expand: true,
                        dest: 'packages/jqwidgets/js/',
                        flatten: true
                    },
                    {
                        cwd: 'bower_components/jqwidgets/jqwidgets/styles/',
                        src: [
                            'jqx.base.css',
                            'jqx.darkblue.css'
                        ],
                        expand: true,
                        dest: 'packages/jqwidgets/css/',
                        flatten: true
                    },
                    {
                        cwd: 'bower_components/jqwidgets/jqwidgets/styles/',
                        src: [
                            'images/**'
                        ],
                        expand: true,
                        dest: 'packages/jqwidgets/css/'
                    }
                ]
            }
        }
    });

    // Load the plugin that provides the "uglify" task.
    grunt.loadNpmTasks('grunt-contrib-uglify');
    grunt.loadNpmTasks('grunt-contrib-copy');

    // Default task(s).
    grunt.registerTask('default', ['copy']);

};