Skip to content

Commit 0ad9306

Browse files
committed
Implemented paths, reorganized things
Breaks backwards compatibility with older versions of the config
1 parent 3524977 commit 0ad9306

File tree

11 files changed

+31
-58
lines changed

11 files changed

+31
-58
lines changed

config/grunt/clean.js

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,42 @@
22
module.exports = {
33
css: {
44
src: [
5-
'css/'
5+
'<%= paths.css %>'
66
]
77
},
88
dist: {
99
src: [
1010
'<%= paths.dist %>'
1111
]
1212
},
13-
docs: {
14-
src: [
15-
'<%= paths.docs %>'
16-
]
17-
},
1813
fonts: {
1914
src: [
20-
'fonts/'
15+
'<%= paths.fonts %>'
2116
]
2217
},
2318
php: {
2419
src: [
2520
'includes/vendor/'
2621
]
2722
},
28-
logs: {
29-
src: [
30-
'logs/'
31-
]
32-
},
33-
tmp: {
34-
src: [
35-
'<%= paths.tmp %>'
36-
]
37-
},
3823
js: {
3924
src: [
40-
'js/'
25+
'<%= paths.js %>'
4126
]
4227
},
4328
images: {
4429
src: [
45-
'images/'
30+
'<%= paths.images %>'
4631
]
4732
},
4833
languages: {
4934
src: [
50-
'languages/'
35+
'<%= paths.languages %>'
5136
]
5237
},
5338
style: {
5439
src: [
55-
'style*.*',
56-
'<%= paths.tmp %>style*.*'
40+
'style*.*'
5741
]
5842
},
5943
screenshot: {

config/grunt/compress.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ module.exports = {
1515
'!assets/**',
1616
'!config/**',
1717
'!dist/**',
18-
'!logs/**',
1918
'!node_modules/**',
20-
'!tmp/**',
2119
'!*.sublime*',
2220
'!.DS_Store',
2321
'!.gitattributes',
@@ -45,8 +43,6 @@ module.exports = {
4543
'!node_modules/**',
4644
'!.sass-cache/**',
4745
'!dist/**',
48-
'!logs/**',
49-
'!tmp/**',
5046
'!*.sublime*',
5147
'!.DS_Store'
5248
], // Take this...

config/grunt/cssmin.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
11
// https://github.com/gruntjs/grunt-contrib-cssmin
22
module.exports = {
3-
theme: {
4-
expand: true,
5-
cwd: '<%= paths.tmp %>',
6-
src: [
7-
'*.css',
8-
'!*.min.css'
9-
],
10-
dest: '<%= paths.tmp %>',
11-
ext: '.min.css',
12-
extDot: 'last'
3+
style: {
4+
src: 'style.css',
5+
dest: 'style.min.css'
136
},
147
vendor: {
158
expand: true,
16-
cwd: 'css/',
9+
cwd: '<%= paths.css %>',
1710
src: [
1811
'*.css',
1912
'!*.min.css'
2013
],
21-
dest: 'css/',
14+
dest: '<%= paths.css %>',
2215
ext: '.min.css',
2316
extDot: 'last'
2417
}

config/grunt/imagemin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ module.exports = {
44
files: [
55
{
66
expand: true,
7-
cwd: '<%= paths.authorAssets %>images/',
7+
cwd: '<%= paths.imagesSrc %>',
88
src: [ '**/*.{png,jpg,jpeg,gif,svg}' ],
9-
dest: '<%= paths.tmp %>images/'
9+
dest: '<%= paths.images %>'
1010
}
1111
]
1212
}

config/grunt/postcss.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ module.exports = {
4242
]
4343
},
4444
style: {
45-
src: '<%= paths.tmp %>style.css',
46-
dest: '<%= paths.tmp %>style.css'
45+
src: 'style.css',
46+
dest: 'style.css'
4747
},
4848
editorStyle: {
49-
src: '<%= paths.tmp %>editor-style.css',
50-
dest: '<%= paths.tmp %>editor-style.css'
49+
src: '<%= paths.css %>editor-style.css',
50+
dest: '<%= paths.css %>editor-style.css'
5151
}
5252
};

config/grunt/rtlcss.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
map: true
99
},
1010
style: {
11-
src: '<%= paths.tmp %>style.css',
12-
dest: '<%= paths.tmp %>style-rtl.css'
11+
src: 'style.css',
12+
dest: 'style-rtl.css'
1313
}
1414
};

config/grunt/sass.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ module.exports = {
55
outputStyle: 'expanded'
66
},
77
style: {
8-
src: '<%= paths.authorAssets %>scss/style.scss',
9-
dest: '<%= paths.tmp %>style.css'
8+
src: '<%= paths.cssSrc %>style.scss',
9+
dest: 'style.css'
1010
},
1111
editorStyle: {
12-
src: '<%= paths.authorAssets %>scss/editor-style.scss',
13-
dest: '<%= paths.tmp %>editor-style.css'
12+
src: '<%= paths.cssSrc %>editor-style.scss',
13+
dest: '<%= paths.css %>editor-style.css'
1414
}
1515
};

config/grunt/uglify.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = {
33
theme: {
44
options: {
55
sourceMap: true,
6-
sourceMapName: 'js/theme.js.map',
6+
sourceMapName: '<%= paths.js %>theme.js.map',
77
sourceMapIncludeSources: true,
88
mangle: true,
99
compress: true,
@@ -12,12 +12,12 @@ module.exports = {
1212
files: [
1313
{
1414
expand: true,
15-
cwd: 'js/',
15+
cwd: '<%= paths.js %>',
1616
src: [
1717
'*.js',
1818
'!*.min.js'
1919
],
20-
dest: 'js/',
20+
dest: '<%= paths.js %>',
2121
ext: '.min.js',
2222
extDot: 'last'
2323
}

config/grunt/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
prefix: '\\s+\\*\\s+Version:\\s+'
2525
},
2626
src: [
27-
'<%= paths.authorAssets %>scss/style.scss'
27+
'<%= paths.cssSrc %>style.scss'
2828
]
2929
}
3030
};

config/grunt/watch.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = {
1313
},
1414
images: {
1515
files: [
16-
'<%= paths.authorAssets %>images/**/*'
16+
'<%= paths.imagesSrc %>**/*'
1717
],
1818
tasks: [
1919
'build:images'
@@ -33,7 +33,7 @@ module.exports = {
3333
'sass:style',
3434
'postcss:style',
3535
'rtlcss:style',
36-
'cssmin:theme',
36+
'cssmin:style',
3737
'copy:css'
3838
]
3939
}

0 commit comments

Comments
 (0)