forked from chartist-js/chartist
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusemin.js
More file actions
34 lines (29 loc) · 784 Bytes
/
Copy pathusemin.js
File metadata and controls
34 lines (29 loc) · 784 Bytes
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
/**
* usemin
* ======
*
* Performs rewrites based on rev and the useminPrepare configuration.
*
* Link: https://github.com/yeoman/grunt-usemin
*/
'use strict';
module.exports = function (grunt) {
return {
html: ['<%= pkg.config.public %>/{,*/}*.html'],
css: ['<%= pkg.config.public %>/styles/{,*/}*.css'],
options: {
assetsDirs: ['<%= pkg.config.public %>'],
blockReplacements: {
js: function (block) {
var asyncScripts = [
'scripts/all.js'
];
var isAsync = block.async || asyncScripts.indexOf(block.dest) > -1;
return isAsync ?
'<script async src="' + block.dest + '"><\/script>' :
'<script src="' + block.dest + '"><\/script>';
}
}
}
};
};