Skip to content

Commit 561b0fb

Browse files
committed
Adding the beautifying html plugin & a config file
This commit contain : - Adding the beautifying html plugin. - Adding the config file.
1 parent 1fecdf7 commit 561b0fb

File tree

4 files changed

+195
-0
lines changed

4 files changed

+195
-0
lines changed

.prettifyrc

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"indent": 2,
3+
"indent_char": " ",
4+
"indent_inner_html": true,
5+
"indent_scripts": "keep",
6+
"indent_size": 2,
7+
"brace_style": "collapse",
8+
"max_preserve_newlines": 0,
9+
"preserve_newlines": true,
10+
"wrap_line_length": 0,
11+
"unformatted": [
12+
"a",
13+
"abbr",
14+
"acronym",
15+
"address",
16+
"b",
17+
"bdo",
18+
"big",
19+
"cite",
20+
"code",
21+
"del",
22+
"dfn",
23+
"dt",
24+
"em",
25+
"font",
26+
"h1",
27+
"h2",
28+
"h3",
29+
"h4",
30+
"h5",
31+
"h6",
32+
"i",
33+
"ins",
34+
"kbd",
35+
"pre",
36+
"q",
37+
"s",
38+
"samp",
39+
"small",
40+
"span",
41+
"strike",
42+
"strong",
43+
"sub",
44+
"sup",
45+
"tt",
46+
"u",
47+
"var"
48+
]
49+
}

Gruntfile.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ module.exports = function(grunt) {
3333
}
3434
},
3535
/**
36+
* @module prettify
37+
* Prettify HTML
38+
**/
39+
prettify: {
40+
options: {
41+
config: '.prettifyrc'
42+
},
43+
files: {
44+
expand: true,
45+
cwd: 'dist/',
46+
ext: '.html',
47+
src: ['*.html'],
48+
dest: 'dist/'
49+
}
50+
},
51+
/**
3652
* @module sass
3753
* Compile SCSS to CSS
3854
**/
@@ -90,6 +106,7 @@ module.exports = function(grunt) {
90106
**/
91107
grunt.registerTask('default', [
92108
'jade',
109+
'prettify',
93110
'sass',
94111
'csscomb',
95112
'cssmin',

package-lock.json

Lines changed: 128 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"grunt-contrib-jade": "^1.0.0",
1616
"grunt-contrib-sass": "^1.0.0",
1717
"grunt-csscomb": "^3.1.1",
18+
"grunt-prettify": "^0.4.0",
1819
"load-grunt-tasks": "^3.5.2"
1920
},
2021
"dependencies": {}

0 commit comments

Comments
 (0)