|
1 | 1 | // jscs:disable requireCamelCaseOrUpperCaseIdentifiers |
2 | 2 | module.exports = function(grunt) { |
3 | | - grunt.loadNpmTasks('grunt-sass'); |
4 | | - grunt.loadNpmTasks('grunt-contrib-cssmin'); |
5 | | - grunt.loadNpmTasks('grunt-contrib-copy'); |
6 | | - grunt.loadNpmTasks('grunt-contrib-uglify'); |
7 | | - grunt.loadNpmTasks('grunt-contrib-jshint'); |
8 | | - grunt.loadNpmTasks('grunt-jscs'); |
9 | | - grunt.loadNpmTasks('grunt-contrib-watch'); |
10 | | - grunt.loadNpmTasks('grunt-protractor-runner'); |
11 | | - grunt.loadNpmTasks('grunt-contrib-connect'); |
12 | | - grunt.loadNpmTasks('grunt-protractor-webdriver'); |
| 3 | + grunt.loadNpmTasks('grunt-sass'); |
| 4 | + grunt.loadNpmTasks('grunt-contrib-cssmin'); |
| 5 | + grunt.loadNpmTasks('grunt-contrib-copy'); |
| 6 | + grunt.loadNpmTasks('grunt-contrib-uglify'); |
| 7 | + grunt.loadNpmTasks('grunt-contrib-jshint'); |
| 8 | + grunt.loadNpmTasks('grunt-jscs'); |
| 9 | + grunt.loadNpmTasks('grunt-contrib-watch'); |
| 10 | + grunt.loadNpmTasks('grunt-protractor-runner'); |
| 11 | + grunt.loadNpmTasks('grunt-contrib-connect'); |
| 12 | + grunt.loadNpmTasks('grunt-protractor-webdriver'); |
13 | 13 |
|
14 | | - grunt.initConfig({ |
15 | | - sass: { |
16 | | - options: { |
17 | | - outputStyle: 'expanded' |
18 | | - }, |
19 | | - dist: { |
20 | | - files: { |
21 | | - 'dist/gridstack.css': 'src/gridstack.scss', |
22 | | - 'dist/gridstack-extra.css': 'src/gridstack-extra.scss' |
23 | | - } |
24 | | - } |
25 | | - }, |
| 14 | + grunt.initConfig({ |
| 15 | + sass: { |
| 16 | + options: { |
| 17 | + outputStyle: 'expanded' |
| 18 | + }, |
| 19 | + dist: { |
| 20 | + files: { |
| 21 | + 'dist/gridstack.css': 'src/gridstack.scss', |
| 22 | + 'dist/gridstack-extra.css': 'src/gridstack-extra.scss' |
| 23 | + } |
| 24 | + } |
| 25 | + }, |
26 | 26 |
|
27 | | - cssmin: { |
28 | | - dist: { |
29 | | - files: { |
30 | | - 'dist/gridstack.min.css': ['dist/gridstack.css'], |
31 | | - 'dist/gridstack-extra.min.css': ['dist/gridstack-extra.css'] |
32 | | - } |
33 | | - } |
34 | | - }, |
| 27 | + cssmin: { |
| 28 | + dist: { |
| 29 | + files: { |
| 30 | + 'dist/gridstack.min.css': ['dist/gridstack.css'], |
| 31 | + 'dist/gridstack-extra.min.css': ['dist/gridstack-extra.css'] |
| 32 | + } |
| 33 | + } |
| 34 | + }, |
35 | 35 |
|
36 | | - copy: { |
37 | | - dist: { |
38 | | - files: { |
39 | | - 'dist/gridstack.js': ['src/gridstack.js'], |
40 | | - 'dist/gridstack.jQueryUI.js': ['src/gridstack.jQueryUI.js'], |
41 | | - } |
42 | | - } |
43 | | - }, |
| 36 | + copy: { |
| 37 | + dist: { |
| 38 | + files: { |
| 39 | + 'dist/gridstack.js': ['src/gridstack.js'], |
| 40 | + 'dist/gridstack.jQueryUI.js': ['src/gridstack.jQueryUI.js'], |
| 41 | + } |
| 42 | + } |
| 43 | + }, |
44 | 44 |
|
45 | | - uglify: { |
46 | | - options: { |
47 | | - sourceMap: true, |
48 | | - sourceMapName: 'dist/gridstack.min.map', |
49 | | - preserveComments: 'some' |
50 | | - }, |
51 | | - dist: { |
52 | | - files: { |
53 | | - 'dist/gridstack.min.js': ['src/gridstack.js'], |
54 | | - 'dist/gridstack.jQueryUI.min.js': ['src/gridstack.jQueryUI.js'], |
55 | | - 'dist/gridstack.all.js': ['src/gridstack.js', 'src/gridstack.jQueryUI.js'] |
56 | | - } |
57 | | - } |
58 | | - }, |
| 45 | + uglify: { |
| 46 | + options: { |
| 47 | + sourceMap: true, |
| 48 | + sourceMapName: 'dist/gridstack.min.map', |
| 49 | + preserveComments: 'some' |
| 50 | + }, |
| 51 | + dist: { |
| 52 | + files: { |
| 53 | + 'dist/gridstack.min.js': ['src/gridstack.js'], |
| 54 | + 'dist/gridstack.jQueryUI.min.js': ['src/gridstack.jQueryUI.js'], |
| 55 | + 'dist/gridstack.all.js': ['src/gridstack.js', 'src/gridstack.jQueryUI.js'] |
| 56 | + } |
| 57 | + } |
| 58 | + }, |
59 | 59 |
|
60 | | - jshint: { |
61 | | - all: ['src/*.js'] |
62 | | - }, |
| 60 | + jshint: { |
| 61 | + all: ['src/*.js'] |
| 62 | + }, |
63 | 63 |
|
64 | | - jscs: { |
65 | | - all: ['*.js', 'src/*.js', ], |
66 | | - }, |
| 64 | + jscs: { |
| 65 | + all: ['*.js', 'src/*.js', ], |
| 66 | + }, |
67 | 67 |
|
68 | | - watch: { |
69 | | - scripts: { |
70 | | - files: ['src/*.js'], |
71 | | - tasks: ['uglify', 'copy'], |
72 | | - options: { |
73 | | - }, |
74 | | - }, |
75 | | - styles: { |
76 | | - files: ['src/*.scss'], |
77 | | - tasks: ['sass', 'cssmin'], |
78 | | - options: { |
79 | | - }, |
80 | | - } |
| 68 | + watch: { |
| 69 | + scripts: { |
| 70 | + files: ['src/*.js'], |
| 71 | + tasks: ['uglify', 'copy'], |
| 72 | + options: { |
81 | 73 | }, |
82 | | - |
83 | | - protractor: { |
84 | | - options: { |
85 | | - configFile: 'protractor.conf.js', |
86 | | - }, |
87 | | - all: {} |
| 74 | + }, |
| 75 | + styles: { |
| 76 | + files: ['src/*.scss'], |
| 77 | + tasks: ['sass', 'cssmin'], |
| 78 | + options: { |
88 | 79 | }, |
| 80 | + } |
| 81 | + }, |
| 82 | + |
| 83 | + protractor: { |
| 84 | + options: { |
| 85 | + configFile: 'protractor.conf.js', |
| 86 | + }, |
| 87 | + all: {} |
| 88 | + }, |
89 | 89 |
|
90 | | - connect: { |
91 | | - all: { |
92 | | - options: { |
93 | | - port: 8080, |
94 | | - hostname: 'localhost', |
95 | | - base: '.', |
96 | | - }, |
97 | | - }, |
| 90 | + connect: { |
| 91 | + all: { |
| 92 | + options: { |
| 93 | + port: 8080, |
| 94 | + hostname: 'localhost', |
| 95 | + base: '.', |
98 | 96 | }, |
| 97 | + }, |
| 98 | + }, |
99 | 99 |
|
100 | | - protractor_webdriver: { |
101 | | - all: { |
102 | | - options: { |
103 | | - command: 'webdriver-manager start', |
104 | | - } |
105 | | - } |
| 100 | + protractor_webdriver: { |
| 101 | + all: { |
| 102 | + options: { |
| 103 | + command: 'webdriver-manager start', |
106 | 104 | } |
107 | | - }); |
| 105 | + } |
| 106 | + } |
| 107 | + }); |
108 | 108 |
|
109 | | - grunt.registerTask('lint', ['jshint', 'jscs']); |
110 | | - grunt.registerTask('default', ['sass', 'cssmin', 'jshint', 'jscs', 'copy', 'uglify']); |
111 | | - grunt.registerTask('e2e-test', ['connect', 'protractor_webdriver', 'protractor']); |
| 109 | + grunt.registerTask('lint', ['jshint', 'jscs']); |
| 110 | + grunt.registerTask('default', ['sass', 'cssmin', 'jshint', 'jscs', 'copy', 'uglify']); |
| 111 | + grunt.registerTask('e2e-test', ['connect', 'protractor_webdriver', 'protractor']); |
112 | 112 | }; |
0 commit comments