corrade-nucleus-nucleons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 module.exports = function(grunt) {
2  
3 'use strict';
4  
5 // Project configuration.
6 grunt.initConfig({
7 pkg: grunt.file.readJSON('package.json'),
8 concat: {
9 js: {
10 src: [
11 'src/intro.js',
12 'src/intro.class.js',
13 'src/core.js',
14 'src/outro.class.js',
15 'src/outro.export.js',
16 'src/outro.js'
17 ],
18 dest: 'dist/<%= pkg.title %>.js'
19 }
20 },
21 jscs: {
22 main: {
23 src: 'dist/<%= pkg.title %>.js',
24 options: {
25 config: '.jscs.json',
26 fix: true,
27 force: true
28 }
29 }
30 },
31 jshint: {
32 all: {
33 src: [
34 'Gruntfile.js', 'dist/<%= pkg.title %>.js'
35 ],
36 options: {
37 jshintrc: true
38 }
39 },
40 dist: {
41 src: 'dist/<%= pkg.title %>.js',
42 options: {
43 jshintrc: true
44 }
45 }
46 },
47 jsbeautifier: {
48 rewrite: {
49 src: 'dist/<%= pkg.title %>.js'
50 },
51 options: {
52 js: {
53 indentSize: 2,
54 jslintHappy: true
55 }
56 }
57 },
58 uglify: {
59 options: {
60 banner: '/*! <%= pkg.name %> <%= pkg.version %> ' +
61 '<%= grunt.template.today("yyyy-mm-dd") %> */\n'
62 },
63 build: {
64 src: 'dist/<%= pkg.title %>.js',
65 dest: 'dist/<%= pkg.title %>.min.js'
66 }
67 },
68 jasmine: {
69 acceptance: {
70 src: 'dist/<%= pkg.title %>.js',
71 options: {
72 specs: ['test/acceptance/*.js'],
73 vendor: [
74 'vendor/jquery/jquery.js',
75 'vendor/jquery/jasmine-jquery.js'
76 ],
77 outfile: 'test/acceptance/SpecRunner.html',
78 keepRunner: true,
79 '--web-security': 'no'
80 }
81 },
82 unit: {
83 src: ['src/core.js'],
84 options: {
85 specs: ['test/unit/*.js'],
86 outfile: 'test/unit/SpecRunner.html',
87 keepRunner: true
88 }
89 }
90 }
91 });
92  
93 grunt.loadNpmTasks('grunt-contrib-concat');
94 grunt.loadNpmTasks('grunt-jscs');
95 grunt.loadNpmTasks('grunt-contrib-jshint');
96 grunt.loadNpmTasks('grunt-jsbeautifier');
97 grunt.loadNpmTasks('grunt-contrib-uglify');
98 grunt.loadNpmTasks('grunt-contrib-jasmine');
99  
100 // Default task(s).
101 grunt.registerTask('default',
102 ['concat', 'jshint', 'jscs', 'jsbeautifier', 'uglify', 'jasmine:acceptance', 'jasmine:unit']
103 );
104  
105 grunt.registerTask('unit',
106 ['concat', 'jshint', 'jscs', 'jsbeautifier', 'jasmine:unit']
107 );
108  
109 };