Skip to content

Commit bd548da

Browse files
authored
fix CSS files in NOde package (#3286)
* (fix) run Node build CSS files thru CSS processor * changelog * non-css should be only images, etc
1 parent ba8735f commit bd548da

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
## Version 11.2.0 (pending)
22

3+
Build:
4+
5+
- fix: run Node build CSS files thru CSS processor also (#3284) [Josh Goebel][]
6+
37
Parser:
48

59
- fix(types) Fix some type definition issues (#3274) [Josh Goebel][]
610

711
[Josh Goebel]: https://github.com/joshgoebel
812

13+
914
## Version 11.1.0
1015

1116
Grammars:

tools/build_node.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const fss = require("fs");
33
const config = require("./build_config");
44
const glob = require("glob-promise");
55
const { getLanguages } = require("./lib/language");
6-
const { install, mkdir } = require("./lib/makestuff");
6+
const { install, mkdir, installCleanCSS } = require("./lib/makestuff");
77
const { filter } = require("./lib/dependencies");
88
const { rollupWrite } = require("./lib/bundling.js");
99
const log = (...args) => console.log(...args);
@@ -163,8 +163,13 @@ async function buildNode(options) {
163163
const stat = fss.statSync(`./src/styles/${file}`);
164164
if (stat.isDirectory()) return;
165165

166-
install(`./src/styles/${file}`, `styles/${file}`);
167-
install(`./src/styles/${file}`, `scss/${file.replace(".css", ".scss")}`);
166+
if (file.endsWith(".css")) {
167+
installCleanCSS(`./src/styles/${file}`, `styles/${file}`);
168+
installCleanCSS(`./src/styles/${file}`, `scss/${file.replace(".css", ".scss")}`);
169+
} else {
170+
// images, etc.
171+
install(`./src/styles/${file}`, `styles/${file}`);
172+
}
168173
});
169174

170175
let languages = await getLanguages();

0 commit comments

Comments
 (0)