-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGruntfile.js
60 lines (55 loc) · 1.83 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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
wp_readme_to_markdown: {
target: {
files: {
'readme.md': 'readme.txt'
}
},
},
copy: {
main: {
files: [ {expand: true, cwd: 'node_modules/genericons-neue/svg-min/', src: ['**'], dest: 'genericons-neue/'}, ],
},
},
sass: { // Task
dev: { // Target
options: { // Target options
style: 'expanded'
},
files: { // Dictionary of files
'css/default.css': 'sass/default.scss' // 'destination': 'source'
}
},
dist: { // Target
options: { // Target options
style: 'compressed'
},
files: { // Dictionary of files
'css/default.min.css': 'sass/default.scss', // 'destination': 'source'
}
}
},
makepot: {
target: {
options: {
mainFile: 'iw26.php', // Main project file.
domainPath: '/languages', // Where to save the POT file.
potFilename: 'iw26.pot',
type: 'wp-theme', // Type of project (wp-plugin or wp-theme).
exclude: [
'vendor/.*'
],
updateTimestamp: false // Whether the POT-Creation-Date should be updated without other changes.
}
}
}
});
grunt.loadNpmTasks('grunt-wp-readme-to-markdown');
grunt.loadNpmTasks('grunt-wp-i18n');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-copy');
// Default task(s).
grunt.registerTask('default', ['wp_readme_to_markdown', 'makepot', 'sass', 'copy']);
};