From f226016ddc09fd121442cc778ec47f99a5bc8dcf Mon Sep 17 00:00:00 2001 From: james foran Date: Thu, 19 Mar 2020 14:09:23 +1100 Subject: [PATCH] changes to include SaSS Source maps in DEV build --- package.json | 3 ++- src/transforms/html-min-transform.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 75d045c7..7a4f8917 100755 --- a/package.json +++ b/package.json @@ -31,9 +31,10 @@ "scripts": { "sass:tokens": "npx json-to-scss src/_data/tokens.json src/scss/_tokens.scss", "sass:process": "npm run sass:tokens && sass src/scss/global.scss src/_includes/assets/css/global.css --style=compressed", + "sass:processDEV": "npm run sass:tokens && sass src/scss/global.scss src/_includes/assets/css/global.css --source-map-urls=absolute --embed-source-map", "cms:precompile": "make-dir dist/admin && nunjucks-precompile src/_includes > dist/admin/templates.js -i \"\\.(njk|css|svg)$\"", "cms:bundle": "rollup --config", - "start": "concurrently \"npm run sass:process -- --watch\" \"npm run cms:bundle -- --watch\" \"chokidar \\\"src/_includes/**\\\" -c \\\"npm run cms:precompile\\\"\" \"npm run serve\"", + "start": "concurrently \"npm run sass:processDEV -- --watch\" \"npm run cms:bundle -- --watch\" \"chokidar \\\"src/_includes/**\\\" -c \\\"npm run cms:precompile\\\"\" \"npm run serve\"", "serve": "cross-env ELEVENTY_ENV=development npx eleventy --serve", "production": "npm run sass:process && npm run cms:precompile && npm run cms:bundle && npx eleventy" }, diff --git a/src/transforms/html-min-transform.js b/src/transforms/html-min-transform.js index 7d0c8f99..52db2382 100644 --- a/src/transforms/html-min-transform.js +++ b/src/transforms/html-min-transform.js @@ -6,7 +6,7 @@ module.exports = function htmlMinTransform(value, outputPath) { useShortDoctype: true, removeComments: true, collapseWhitespace: true, - minifyCSS: true + minifyCSS: false }); return minified; }