mirror of
https://github.com/NovaGM/ModuleBuilder.git
synced 2024-08-15 00:23:33 +00:00
[PCTheme] SCSS support
This commit is contained in:
parent
7f267f87a6
commit
e0371211ad
3 changed files with 14 additions and 4 deletions
8
package-lock.json
generated
8
package-lock.json
generated
|
@ -12278,6 +12278,14 @@
|
|||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||
},
|
||||
"sass": {
|
||||
"version": "1.32.8",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.32.8.tgz",
|
||||
"integrity": "sha512-Sl6mIeGpzjIUZqvKnKETfMf0iDAswD9TNlv13A7aAF3XZlRPMq4VvJWBC2N2DXbp94MQVdNSFG6LfF/iOXrPHQ==",
|
||||
"requires": {
|
||||
"chokidar": ">=2.0.0 <4.0.0"
|
||||
}
|
||||
},
|
||||
"sax": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
"dependencies": {
|
||||
"axios": "^0.21.1",
|
||||
"glob": "^7.1.6",
|
||||
"parcel-bundler": "^1.12.4"
|
||||
"parcel-bundler": "^1.12.4",
|
||||
"sass": "^1.32.8"
|
||||
},
|
||||
"alias": {
|
||||
"@goosemod/patcher": "./moduleWrappers/goosemod/patcher.js",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { readFileSync, writeFileSync, mkdirSync, rmSync } from 'fs';
|
||||
import sass from 'sass';
|
||||
|
||||
export default (manifestPath, repo) => {
|
||||
const pcManifest = JSON.parse(readFileSync(manifestPath, 'utf8'));
|
||||
|
@ -11,7 +12,7 @@ export default (manifestPath, repo) => {
|
|||
description: pcManifest.description,
|
||||
|
||||
version: pcManifest.version,
|
||||
authors: [pcManifest.author],
|
||||
authors: [ pcManifest.author ]
|
||||
};
|
||||
|
||||
rmSync(manifestPath);
|
||||
|
@ -20,7 +21,7 @@ export default (manifestPath, repo) => {
|
|||
if (pcManifest.theme.split('.').pop() === 'scss') {
|
||||
const cssPath = pcManifest.theme.split('.').slice(0, -1).concat('css').join('.');
|
||||
|
||||
const compiled = sass.renderSync({ file: pcManifest.theme }).css;
|
||||
const compiled = (sass.renderSync({ file: pcManifest.theme })).css;
|
||||
writeFileSync(cssPath, compiled);
|
||||
|
||||
pcManifest.theme = cssPath;
|
||||
|
|
Loading…
Reference in a new issue