Skip to content
This repository
Browse code

Use new patched grunt-browserify for building client side JavaScript

  • Loading branch information...
commit 4985cb0858d4a614cb29cd8b2b56308580299727 1 parent 8e88dcf
Jacob Rask authored

Showing 1 changed file with 19 additions and 15 deletions. Show diff stats Hide diff stats

  1. +19 15 grunt.js
34 grunt.js
@@ -5,39 +5,43 @@ module.exports = function(grunt) {
5 5 // Project configuration.
6 6 grunt.initConfig({
7 7 pkg: '<json:package.json>',
8   - min: {
9   - dist: {
10   - src: [ 'dist/docs.js' ],
11   - dest: 'dist/docs.js'
12   - }
13   - },
14 8 browserify: {
  9 + 'dist/docs.js': {
  10 + entries: [ 'web/app.js' ],
  11 + aliases: [ 'jquery:jquery-browserify' ]
  12 + },
15 13 'test/lib/views.js': {
16 14 entries: [ 'test/navigation.js', 'test/previews.js' ]
17 15 }
18 16 },
  17 + jade: {
  18 + html: {
  19 + src: [ 'web/index.jade' ],
  20 + dest: 'dist/index.html',
  21 + options: { client: false, pretty: true }
  22 + }
  23 + },
19 24 concat: {
20 25 dist: {
21 26 src: [ 'web/*.css', 'web/views/*.css' ],
22 27 dest: 'dist/docs.css'
23 28 }
24 29 },
  30 + min: {
  31 + dist: {
  32 + src: [ 'dist/docs.js' ],
  33 + dest: 'dist/docs.js'
  34 + }
  35 + },
25 36 mincss: {
26 37 dist: {
27 38 files: { 'dist/docs.css': [ '<config:concat.dist.src>' ]
28 39 }
29 40 }
30 41 },
31   - jade: {
32   - html: {
33   - src: [ 'web/index.jade' ],
34   - dest: 'dist/index.html',
35   - options: { client: false, pretty: true }
36   - }
37   - },
38 42 watch: {
39 43 files: [ 'web/**', 'grunt.js' ],
40   - tasks: 'jade concat'
  44 + tasks: 'browserify concat'
41 45 },
42 46 jshint: {
43 47 options: {
@@ -59,7 +63,7 @@ module.exports = function(grunt) {
59 63
60 64 // Default task.
61 65 grunt.registerTask('default', 'jade browserify:dist/docs.js min mincss');
62   - grunt.registerTask('dev', 'concat');
  66 + grunt.registerTask('dev', 'concat browserify:dist/docs.js');
63 67 grunt.registerTask('test', 'browserify:test/lib/tests.js buster');
64 68
65 69 grunt.loadNpmTasks("grunt-contrib");

0 comments on commit 4985cb0

Please sign in to comment.
Something went wrong with that request. Please try again.