]>
git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - Gruntfile.js
3 module
.exports = function (grunt
) {
6 jade: 'views/**/**/*.jade',
7 css: 'public/stylesheets/*.css',
8 scss: 'public/stylesheets/*.scss',
9 vendor: 'public/stylesheets/vendor',
10 js: 'public/javascripts/*.js',
12 routes: 'routes/**/*.js',
14 browserified: 'public/javascripts/bundle.js',
15 img: 'public/images/*.{png,jpg,jpeg,gif,webp,svg}',
20 require('time-grunt')(grunt
)
22 // Project Configuration
25 pkg: grunt
.file
.readJSON('package.json'),
28 src: [ paths
.js
, '!public/javascripts/bundle.js' ],
29 dest: paths
.browserified
,
31 browserifyOptions: { 'debug': true },
38 cwd: 'node_modules/bootstrap-sass/assets/',
39 src: [ 'fonts/bootstrap/*' ],
49 paths
.browserified
, 'public/stylesheets/global.css', paths
.vendor
60 node_env: 'development',
69 'public/stylesheets/global.css': paths
.scss
75 files: [ paths
.main
, paths
.routes
, paths
.src
],
76 tasks: [ 'express:dev' ],
83 files: [ paths
.jade
, paths
.css
, paths
.browserified
],
92 // Build client javascript and copy bootstrap dependencies
93 grunt
.registerTask('build', [], function () {
94 grunt
.loadNpmTasks('grunt-sass')
95 grunt
.loadNpmTasks('grunt-browserify')
96 grunt
.loadNpmTasks('grunt-contrib-copy')
97 grunt
.loadNpmTasks('grunt-newer')
99 // TODO: SASS --> newer
102 'newer:browserify:dev',
107 // Start in dev mode (reload front end files without refresh)
108 grunt
.registerTask('dev', [], function () {
109 grunt
.loadNpmTasks('grunt-sass')
110 grunt
.loadNpmTasks('grunt-browserify')
111 grunt
.loadNpmTasks('grunt-contrib-watch')
112 grunt
.loadNpmTasks('grunt-express-server')
113 grunt
.loadNpmTasks('grunt-contrib-copy')
114 grunt
.loadNpmTasks('grunt-newer')
116 // TODO: SASS --> newer
119 'newer:browserify:dev',
127 grunt
.registerTask('clean', [], function () {
128 grunt
.loadNpmTasks('grunt-contrib-clean')