@epublishing/grunt-epublishing 0.3.17 → 0.3.18

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.
@@ -11,7 +11,6 @@ const fs = require('fs');
11
11
  const prettyjson = require('prettyjson');
12
12
  const mergeConfigs = require('./merge-configs');
13
13
  const configureWebpack = require('./configure-webpack');
14
- const configureSass = require('./configure-sass');
15
14
  const configurePostCSS = require('./configure-postcss');
16
15
 
17
16
  module.exports = function initJadeConfig(grunt, jadePath, jadeChildPath, jadeChildPaths) {
@@ -40,9 +39,6 @@ module.exports = function initJadeConfig(grunt, jadePath, jadeChildPath, jadeChi
40
39
  // Update baseConfig's Webpack settings with ePublishing defaults:
41
40
  baseConfig = configureWebpack(grunt, baseConfig);
42
41
 
43
- // Add custom functions and settings to the merged Sass config
44
- baseConfig = configureSass(baseConfig);
45
-
46
42
  if (baseConfig.postcss) {
47
43
  baseConfig = configurePostCSS(baseConfig, grunt);
48
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.17",
4
+ "version": "0.3.18",
5
5
  "homepage": "https://www.epublishing.com",
6
6
  "contributors": [
7
7
  {
package/tasks/sass.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /* eslint-disable prefer-object-spread, promise/prefer-await-to-then */
2
2
  'use strict';
3
3
  const util = require('util');
4
+ const sass = require('sass');
4
5
  const path = require('path');
5
- const {pathToFileURL} = require('url');
6
6
 
7
7
  module.exports = grunt => {
8
8
  grunt.registerMultiTask('sass', 'Compile Sass to CSS', function () {
@@ -25,19 +25,9 @@ module.exports = grunt => {
25
25
  return;
26
26
  }
27
27
 
28
- const result = await util.promisify(options.implementation.compile)(Object.assign({}, options, {
28
+ const result = await util.promisify(sass.render)(Object.assign({}, options, {
29
29
  file: src,
30
30
  outFile: item.dest,
31
- importers: [{
32
- // An importer that redirects relative URLs starting with "~" to
33
- // `node_modules`.
34
- findFileUrl(url) {
35
- console.log(url);
36
-
37
- if (!url.startsWith('~')) return null;
38
- return new URL(url.substring(1), pathToFileURL('node_modules'));
39
- }
40
- }]
41
31
  }));
42
32
 
43
33
  grunt.file.write(item.dest, result.css);
@@ -1,16 +0,0 @@
1
- /**
2
- * This function merges custom SassScript functions into the base Sass config
3
- */
4
-
5
- 'use strict';
6
-
7
- const sass = require('sass');
8
- const NODE_ENV = process.env.NODE_ENV || 'development';
9
-
10
- module.exports = function configureSass(config) {
11
-
12
- config.sass.options.implementation = sass;
13
-
14
-
15
- return config;
16
- };