forked from nextgenthemes/advanced-responsive-video-embedder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
82 lines (75 loc) · 1.87 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*!
* Bootstrap's Gruntfile
* http://getbootstrap.com
* Copyright 2013-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*
*/
module.exports = function (grunt) {
'use strict';
// Force use of Unix newlines
grunt.util.linefeed = '\n';
// Project configuration.
grunt.initConfig({
sed: {
h2: {
path: 'README.txt',
pattern: /^##([^#]+)#*?\s*?\n/gm,
replacement: '==$1==\n',
recursive: true
},
del_sc: {
path: 'README.txt',
pattern: /^\[(youtube|vimeo)[^\]]+\]/gm,
replacement: '',
recursive: true
},
sc_start: {
path: 'README.txt',
pattern: /`\[\[/gm,
replacement: '`[',
recursive: true
},
sc_end: {
path: 'README.txt',
pattern: /\]\]`/gm,
replacement: ']`',
recursive: true
}
},
concat: {
options: {
separator: '\n\n',
},
readme_md: {
src: [
'readme/description.md',
'readme/description-intro.md',
'readme/description-links.md',
'readme/description-features.md',
'readme/description-supported-providers.md',
'readme/description-quick-intro.md',
'readme/description-pro-addon-demo.md',
'readme/description-hd-thumbnail.md',
'readme/description-reviews.md',
'readme/description-roadmap.md',
'readme/installation.md',
'readme/faq.md',
'readme/screenshots.md',
'CHANGELOG.md'
],
dest: 'README.md'
},
readme_txt: {
src: [
'readme/top.txt',
'README.md'
],
dest: 'README.txt'
}
}
});
require('load-grunt-tasks')(grunt, { scope: 'devDependencies' });
// Default task.
grunt.registerTask('default', ['concat', 'sed']);
};