|
2 | 2 | /* global module: true */ |
3 | 3 | module.exports = function (grunt) { |
4 | 4 |
|
5 | | - 'use strict'; |
6 | | - // Project configuration. |
7 | | - grunt.initConfig({ |
8 | | - pkg: grunt.file.readJSON('package.json'), |
9 | | - sass: { |
10 | | - expanded: { |
11 | | - options: { |
12 | | - style: 'expanded' |
13 | | - }, |
14 | | - files: { |
15 | | - 'css/openwebicons.css': 'sass/openwebicons.scss', |
16 | | - 'css/openwebicons-bootstrap.css': 'sass/openwebicons-bootstrap.scss', |
17 | | - 'css/openwebicons-cdn.css': 'sass/openwebicons-cdn.scss', |
18 | | - 'styleguide/css/openwebicons-styleguide.css': 'sass/openwebicons-styleguide.scss' |
19 | | - } |
20 | | - }, |
21 | | - compressed: { |
22 | | - options: { |
23 | | - style: 'compressed' |
24 | | - }, |
25 | | - files: { |
26 | | - 'css/openwebicons.min.css': 'sass/openwebicons.scss', |
27 | | - 'css/openwebicons-bootstrap.min.css': 'sass/openwebicons-bootstrap.scss', |
28 | | - 'css/openwebicons-cdn.min.css': 'sass/openwebicons-cdn.scss' |
29 | | - } |
30 | | - }, |
31 | | - compact: { |
32 | | - options: { |
33 | | - style: 'compact' |
34 | | - }, |
35 | | - files: { |
36 | | - 'css/weloveiconfonts.css': 'sass/weloveiconfonts.scss' |
37 | | - } |
38 | | - } |
39 | | - }, |
40 | | - // generate a TTF file from the SVG file |
41 | | - svg2ttf: { |
42 | | - svg2ttf: { |
43 | | - src: 'source/*.svg', |
44 | | - dest: 'source/' |
45 | | - } |
46 | | - }, |
| 5 | + 'use strict'; |
| 6 | + // Project configuration. |
| 7 | + grunt.initConfig({ |
| 8 | + pkg: grunt.file.readJSON('package.json'), |
| 9 | + sass: { |
| 10 | + expanded: { |
| 11 | + options: { |
| 12 | + style: 'expanded', |
| 13 | + sourcemap: 'none' |
| 14 | + }, |
| 15 | + files: { |
| 16 | + 'css/openwebicons.css': 'sass/openwebicons.scss', |
| 17 | + 'css/openwebicons-bootstrap.css': 'sass/openwebicons-bootstrap.scss', |
| 18 | + 'css/openwebicons-cdn.css': 'sass/openwebicons-cdn.scss', |
| 19 | + 'styleguide/css/openwebicons-styleguide.css': 'sass/openwebicons-styleguide.scss' |
| 20 | + } |
| 21 | + }, |
| 22 | + compressed: { |
| 23 | + options: { |
| 24 | + style: 'compressed', |
| 25 | + sourcemap: 'none' |
| 26 | + }, |
| 27 | + files: { |
| 28 | + 'css/openwebicons.min.css': 'sass/openwebicons.scss', |
| 29 | + 'css/openwebicons-bootstrap.min.css': 'sass/openwebicons-bootstrap.scss', |
| 30 | + 'css/openwebicons-cdn.min.css': 'sass/openwebicons-cdn.scss' |
| 31 | + } |
| 32 | + }, |
| 33 | + compact: { |
| 34 | + options: { |
| 35 | + style: 'compact', |
| 36 | + sourcemap: 'none' |
| 37 | + }, |
| 38 | + files: { |
| 39 | + 'css/weloveiconfonts.css': 'sass/weloveiconfonts.scss' |
| 40 | + } |
| 41 | + } |
| 42 | + }, |
| 43 | + // generate a TTF file from the SVG file |
| 44 | + svg2ttf: { |
| 45 | + svg2ttf: { |
| 46 | + src: 'source/*.svg', |
| 47 | + dest: 'source/' |
| 48 | + } |
| 49 | + }, |
47 | 50 |
|
48 | | - kss: { |
49 | | - options: { |
50 | | - includeType: 'css', |
51 | | - includePath: 'styleguide/css/openwebicons-styleguide.css', |
52 | | - }, |
53 | | - dist: { |
54 | | - files: { |
55 | | - 'styleguide': ['styleguide/css'] |
56 | | - } |
57 | | - } |
58 | | - }, |
| 51 | + kss: { |
| 52 | + options: { |
| 53 | + includeType: 'css', |
| 54 | + includePath: 'styleguide/css/openwebicons-styleguide.css', |
| 55 | + }, |
| 56 | + dist: { |
| 57 | + files: { |
| 58 | + 'styleguide': ['styleguide/css'] |
| 59 | + } |
| 60 | + } |
| 61 | + }, |
59 | 62 |
|
60 | | - update_json: { |
61 | | - // update bower.json with data from package.json |
62 | | - bower: { |
63 | | - src: 'package.json', // where to read from |
64 | | - dest: 'bower.json', // where to write to |
65 | | - // the fields to update, as a String Grouping |
66 | | - fields: { |
67 | | - 'name': null, |
68 | | - 'version': null, |
69 | | - 'description': null |
70 | | - } |
71 | | - }, |
72 | | - // update component.json with data from package.json |
73 | | - // component.json fields are a named a bit differently from |
74 | | - // package.json, so let's tell update_json how to map names |
75 | | - component: { |
76 | | - src: 'package.json', |
77 | | - // reuse the task-level `src` |
78 | | - dest: 'component.json', // where to write to |
79 | | - fields: { |
80 | | - 'name': null, |
81 | | - 'author': null, |
82 | | - 'description': null, |
83 | | - 'version': null, |
84 | | - 'keywords': null, |
85 | | - 'main': null, |
86 | | - 'development': 'devDependencies', |
87 | | - 'license': null |
88 | | - } |
89 | | - }, |
90 | | - // `composer` has the same data as `package`, but has some tricky |
91 | | - // semantics |
92 | | - composer: { |
93 | | - src: 'package.json', |
94 | | - // again, reuse the task-level `src` |
95 | | - dest: 'composer.json', |
96 | | - // the fields in an Array Grouping with some embedded Object Groupings |
97 | | - fields: { |
98 | | - 'description': null, |
99 | | - 'keywords': null, |
100 | | - 'license': null |
101 | | - } |
102 | | - } |
103 | | - } |
104 | | - }); |
| 63 | + update_json: { |
| 64 | + // update bower.json with data from package.json |
| 65 | + bower: { |
| 66 | + src: 'package.json', // where to read from |
| 67 | + dest: 'bower.json', // where to write to |
| 68 | + // the fields to update, as a String Grouping |
| 69 | + fields: { |
| 70 | + 'name': null, |
| 71 | + 'version': null, |
| 72 | + 'description': null |
| 73 | + } |
| 74 | + }, |
| 75 | + // update component.json with data from package.json |
| 76 | + // component.json fields are a named a bit differently from |
| 77 | + // package.json, so let's tell update_json how to map names |
| 78 | + component: { |
| 79 | + src: 'package.json', |
| 80 | + // reuse the task-level `src` |
| 81 | + dest: 'component.json', // where to write to |
| 82 | + fields: { |
| 83 | + 'name': null, |
| 84 | + 'author': null, |
| 85 | + 'description': null, |
| 86 | + 'version': null, |
| 87 | + 'keywords': null, |
| 88 | + 'main': null, |
| 89 | + 'development': 'devDependencies', |
| 90 | + 'license': null |
| 91 | + } |
| 92 | + }, |
| 93 | + // `composer` has the same data as `package`, but has some tricky |
| 94 | + // semantics |
| 95 | + composer: { |
| 96 | + src: 'package.json', |
| 97 | + // again, reuse the task-level `src` |
| 98 | + dest: 'composer.json', |
| 99 | + // the fields in an Array Grouping with some embedded Object Groupings |
| 100 | + fields: { |
| 101 | + 'description': null, |
| 102 | + 'keywords': null, |
| 103 | + 'license': null |
| 104 | + } |
| 105 | + } |
| 106 | + } |
| 107 | + }); |
105 | 108 |
|
106 | | - // Load the plugin that provides the "uglify" task. |
107 | | - grunt.loadNpmTasks('grunt-contrib-sass'); |
108 | | - grunt.loadNpmTasks('grunt-update-json'); |
109 | | - grunt.loadNpmTasks('grunt-svg2ttf'); |
110 | | - grunt.loadNpmTasks('grunt-kss'); |
| 109 | + // Load the plugin that provides the "uglify" task. |
| 110 | + grunt.loadNpmTasks('grunt-contrib-sass'); |
| 111 | + grunt.loadNpmTasks('grunt-update-json'); |
| 112 | + grunt.loadNpmTasks('grunt-svg2ttf'); |
| 113 | + grunt.loadNpmTasks('grunt - kss'); |
111 | 114 |
|
112 | | - // generate ttf file using the svg file. |
113 | | - grunt.registerTask('font', ['svg2ttf']); |
| 115 | + // generate ttf file using the svg file. |
| 116 | + grunt.registerTask('font', ['svg2ttf']); |
114 | 117 |
|
115 | | - // generate styleguide |
116 | | - grunt.registerTask('styleguide', ['sass', 'kss']); |
| 118 | + // generate styleguide |
| 119 | + grunt.registerTask('styleguide', ['sass', 'kss']); |
117 | 120 |
|
118 | | - // Default task(s). |
119 | | - grunt.registerTask('default', ['sass', 'update_json']); |
| 121 | + // Default task(s). |
| 122 | + grunt.registerTask('default', ['sass', 'update_json']); |
120 | 123 |
|
121 | 124 | }; |
0 commit comments