@epublishing/grunt-epublishing 0.3.13 → 0.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/tasks/sass.js +0 -44
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epublishing/grunt-epublishing",
|
|
3
3
|
"description": "Automated front-end tasks for ePublishing Jade and client sites.",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.14",
|
|
5
5
|
"homepage": "https://www.epublishing.com",
|
|
6
6
|
"contributors": [
|
|
7
7
|
{
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"grunt-contrib-uglify": "^3.4.0",
|
|
63
63
|
"grunt-contrib-watch": "^1.1.0",
|
|
64
64
|
"grunt-postcss": "^0.9.0",
|
|
65
|
+
"grunt-sass": "^3.1.0",
|
|
65
66
|
"grunt-webpack": "^3.1.2",
|
|
66
67
|
"handlebars": "^4.0.11",
|
|
67
68
|
"handlebars-loader": "^1.6.0",
|
package/tasks/sass.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
var path = require('path');
|
|
3
|
-
var eachAsync = require('each-async');
|
|
4
|
-
var assign = require('object-assign');
|
|
5
|
-
var sass = require('sass');
|
|
6
|
-
|
|
7
|
-
module.exports = function (grunt) {
|
|
8
|
-
grunt.verbose.writeln('\n' + sass.info + '\n');
|
|
9
|
-
|
|
10
|
-
grunt.registerMultiTask('sass', 'Compile Sass to CSS', function () {
|
|
11
|
-
eachAsync(this.files, function (el, i, next) {
|
|
12
|
-
var opts = this.options({
|
|
13
|
-
precision: 10
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
var src = el.src[0];
|
|
17
|
-
|
|
18
|
-
if (!src || path.basename(src)[0] === '_') {
|
|
19
|
-
next();
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
sass.render(assign({}, opts, {
|
|
24
|
-
file: src,
|
|
25
|
-
outFile: el.dest
|
|
26
|
-
}), function (err, res) {
|
|
27
|
-
if (err) {
|
|
28
|
-
grunt.log.error(err.formatted + '\n');
|
|
29
|
-
grunt.warn('');
|
|
30
|
-
next(err);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
grunt.file.write(el.dest, res.css);
|
|
35
|
-
|
|
36
|
-
if (opts.sourceMap) {
|
|
37
|
-
grunt.file.write(this.options.sourceMap, res.map);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
next();
|
|
41
|
-
});
|
|
42
|
-
}.bind(this), this.async());
|
|
43
|
-
});
|
|
44
|
-
};
|