63 lines
1.8 KiB
JavaScript
63 lines
1.8 KiB
JavaScript
module.exports = function(grunt) {
|
|
grunt.initConfig({
|
|
browserify: {
|
|
basic: {
|
|
src: ['app/ribica.js'],
|
|
dest: 'build/ribica.bundle.js',
|
|
options: {
|
|
browserifyOptions: {
|
|
standalone: 'RIBICA',
|
|
debug: true,
|
|
},
|
|
transform: ['reactify'],
|
|
watch: true
|
|
}
|
|
|
|
}
|
|
},
|
|
watch: {
|
|
files: ['build/ribica.bundle.js', 'app/css/*.css'],
|
|
tasks: ['concat:css', 'concat:js']
|
|
},
|
|
connect: {
|
|
server: {
|
|
options: {
|
|
port: 3001,
|
|
base: 'build'
|
|
}
|
|
}
|
|
},
|
|
uglify: {
|
|
my_target: {
|
|
files: {
|
|
'build/ribica.min.js': ['build/ribica.js']
|
|
}
|
|
}
|
|
},
|
|
concat: {
|
|
css: {
|
|
src: [
|
|
'node_modules/bootstrap/dist/css/bootstrap.min.css',
|
|
'app/css/*.css'
|
|
|
|
],
|
|
dest: 'build/ribica.css'
|
|
},
|
|
js: {
|
|
src: ['node_modules/jquery/dist/jquery.min.js', 'node_modules/bootstrap/dist/css/bootstrap.min.js', 'build/ribica.bundle.js'],
|
|
dest: 'build/ribica.js'
|
|
}
|
|
}
|
|
|
|
});
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
|
grunt.loadNpmTasks('grunt-contrib-concat');
|
|
grunt.loadNpmTasks('grunt-browserify');
|
|
grunt.loadNpmTasks('grunt-contrib-connect');
|
|
grunt.loadNpmTasks('grunt-contrib-uglify');
|
|
|
|
grunt.registerTask('default', []);
|
|
grunt.registerTask('dev', ['browserify', 'concat:css', 'concat:js', 'connect:server:keepalive']);
|
|
};
|