Skip to content

Commit

Permalink
fix CSS files in NOde package (#3286)
Browse files Browse the repository at this point in the history
* (fix) run Node build CSS files thru CSS processor

* changelog

* non-css should be only images, etc
  • Loading branch information
joshgoebel committed Jul 26, 2021
1 parent ba8735f commit bd548da
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
@@ -1,11 +1,16 @@
## Version 11.2.0 (pending)

Build:

- fix: run Node build CSS files thru CSS processor also (#3284) [Josh Goebel][]

Parser:

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

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


## Version 11.1.0

Grammars:
Expand Down
11 changes: 8 additions & 3 deletions tools/build_node.js
Expand Up @@ -3,7 +3,7 @@ const fss = require("fs");
const config = require("./build_config");
const glob = require("glob-promise");
const { getLanguages } = require("./lib/language");
const { install, mkdir } = require("./lib/makestuff");
const { install, mkdir, installCleanCSS } = require("./lib/makestuff");
const { filter } = require("./lib/dependencies");
const { rollupWrite } = require("./lib/bundling.js");
const log = (...args) => console.log(...args);
Expand Down Expand Up @@ -163,8 +163,13 @@ async function buildNode(options) {
const stat = fss.statSync(`./src/styles/${file}`);
if (stat.isDirectory()) return;

install(`./src/styles/${file}`, `styles/${file}`);
install(`./src/styles/${file}`, `scss/${file.replace(".css", ".scss")}`);
if (file.endsWith(".css")) {
installCleanCSS(`./src/styles/${file}`, `styles/${file}`);
installCleanCSS(`./src/styles/${file}`, `scss/${file.replace(".css", ".scss")}`);
} else {
// images, etc.
install(`./src/styles/${file}`, `styles/${file}`);
}
});

let languages = await getLanguages();
Expand Down

0 comments on commit bd548da

Please sign in to comment.