Skip to content

Commit

Permalink
separate managed and unmanaged scss
Browse files Browse the repository at this point in the history
  • Loading branch information
schlawg committed Mar 17, 2024
1 parent 50fde02 commit 9561e5a
Show file tree
Hide file tree
Showing 1,539 changed files with 2,325 additions and 2,319 deletions.
20 changes: 11 additions & 9 deletions ui/.build/src/clean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@ import { promises as fs } from 'fs';
import * as fg from 'fast-glob';
import { env, colors as c } from './main';

const globs = [
'**/node_modules',
'ui/*/dist',
'ui/*/tsconfig.tsbuildinfo',
'public/compiled',
'public/npm',
'public/css/*.css*',
];

const globOpts: fg.Options = {
absolute: true,
onlyFiles: false,
Expand All @@ -20,6 +11,17 @@ const globOpts: fg.Options = {

export async function clean() {
if (!env.clean) return;

const globs = [
'**/node_modules',
'ui/*/dist',
'ui/*/tsconfig.tsbuildinfo',
'public/compiled',
'public/npm',
'public/css/*.css*',
];
if (env.cleanTheme) globs.push('**/css/build/gen'); // will blow away mod.inquiry.scss

for (const glob of globs) {
env.log(`Cleaning '${c.cyan(glob)}'...`);
for await (const f of fg.stream(glob, { cwd: env.rootDir, ...globOpts })) {
Expand Down
7 changes: 5 additions & 2 deletions ui/.build/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const longArgs = [
'--split',
'--debug',
'--clean',
'--clean-theme',
'--update',
'--no-install',
];
Expand Down Expand Up @@ -48,7 +49,8 @@ export function main() {
env.prod = args.includes('--prod') || oneDashArgs.includes('p');
env.split = args.includes('--split') || oneDashArgs.includes('s');
env.debug = args.includes('--debug') || oneDashArgs.includes('d');
env.clean = args.includes('--clean') || oneDashArgs.includes('c');
env.clean = args.some(x => x.startsWith('--clean')) || oneDashArgs.includes('c');
env.cleanTheme = args.includes('--clean-theme');
env.install = !args.includes('--no-install') && !oneDashArgs.includes('n');

if (env.rebuild && !env.install) {
Expand All @@ -58,7 +60,7 @@ export function main() {

if (args.length === 1 && (args[0] === '--help' || args[0] === '-h')) {
console.log(fs.readFileSync(path.resolve(__dirname, '../readme'), 'utf8'));
} else if (args.length === 1 && (args[0] === '--clean' || args[0] === '-c')) {
} else if (args.length === 1 && (args[0].startsWith('--clean') || args[0] === '-c')) {
clean();
} else {
build(args.filter(x => !x.startsWith('-')));
Expand Down Expand Up @@ -117,6 +119,7 @@ class Env {
watch = false;
rebuild = false;
clean = false;
cleanTheme = false;
prod = false;
split = false;
debug = false;
Expand Down
9 changes: 5 additions & 4 deletions ui/.build/src/sass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,17 @@ async function buildThemedScss() {
if (!match || match.length < 3) continue;
const path = match[1];
const partial = match[2];
fs.mkdirSync(`${path}/gen`, { recursive: true });
for (const direction of ['ltr', 'rtl']) {
for (const theme of ['light', 'dark', 'transp']) {
const themed = `${path}/${partial}.${direction}.${theme}.scss`;
const themed = `${path}/gen/${partial}.${direction}.${theme}.scss`;
if (fs.existsSync(themed)) {
continue;
}
const code =
`@import '../../../common/css/dir/${direction}';\n` +
`@import '../../../common/css/theme/${theme}';\n` +
`@import '${partial}';\n`;
`@import '../../../../common/css/dir/${direction}';\n` +
`@import '../../../../common/css/theme/${theme}';\n` +
`@import '../${partial}';\n`;
try {
await fs.promises.writeFile(themed, code);
} catch (e) {
Expand Down
3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.forecast.ltr.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.forecast.ltr.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.forecast.ltr.transp.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.forecast.rtl.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.forecast.rtl.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.forecast.rtl.transp.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.free.ltr.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.free.ltr.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.free.ltr.transp.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.free.rtl.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.free.rtl.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.free.rtl.transp.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.gamebook.edit.ltr.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.gamebook.edit.ltr.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.gamebook.edit.ltr.transp.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.gamebook.edit.rtl.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.gamebook.edit.rtl.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.gamebook.edit.rtl.transp.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.gamebook.play.ltr.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.gamebook.play.ltr.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.gamebook.play.ltr.transp.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.gamebook.play.rtl.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.gamebook.play.rtl.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.gamebook.play.rtl.transp.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.keyboard.ltr.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.keyboard.ltr.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.keyboard.ltr.transp.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.keyboard.rtl.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.keyboard.rtl.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.keyboard.rtl.transp.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.practice.ltr.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.practice.ltr.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.practice.ltr.transp.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.practice.rtl.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.practice.rtl.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.practice.rtl.transp.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.relay-admin.ltr.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.relay-admin.ltr.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.relay-admin.ltr.transp.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.relay-admin.rtl.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.relay-admin.rtl.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.relay-admin.rtl.transp.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.relay.ltr.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.relay.ltr.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.relay.ltr.transp.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.relay.rtl.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.relay.rtl.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.relay.rtl.transp.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.round.ltr.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.round.ltr.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.round.ltr.transp.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.round.rtl.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.round.rtl.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.round.rtl.transp.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.study.ltr.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.study.ltr.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.study.ltr.transp.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.study.rtl.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.study.rtl.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.study.rtl.transp.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.zh.ltr.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.zh.ltr.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.zh.ltr.transp.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.zh.rtl.dark.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.zh.rtl.light.scss

This file was deleted.

3 changes: 0 additions & 3 deletions ui/analyse/css/build/analyse.zh.rtl.transp.scss

This file was deleted.

3 changes: 3 additions & 0 deletions ui/analyse/css/build/gen/analyse.forecast.ltr.dark.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import '../../../../common/css/dir/ltr';
@import '../../../../common/css/theme/dark';
@import '../analyse.forecast';
3 changes: 3 additions & 0 deletions ui/analyse/css/build/gen/analyse.forecast.ltr.light.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import '../../../../common/css/dir/ltr';
@import '../../../../common/css/theme/light';
@import '../analyse.forecast';
3 changes: 3 additions & 0 deletions ui/analyse/css/build/gen/analyse.forecast.ltr.transp.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import '../../../../common/css/dir/ltr';
@import '../../../../common/css/theme/transp';
@import '../analyse.forecast';
3 changes: 3 additions & 0 deletions ui/analyse/css/build/gen/analyse.forecast.rtl.dark.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import '../../../../common/css/dir/rtl';
@import '../../../../common/css/theme/dark';
@import '../analyse.forecast';
3 changes: 3 additions & 0 deletions ui/analyse/css/build/gen/analyse.forecast.rtl.light.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import '../../../../common/css/dir/rtl';
@import '../../../../common/css/theme/light';
@import '../analyse.forecast';
3 changes: 3 additions & 0 deletions ui/analyse/css/build/gen/analyse.forecast.rtl.transp.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import '../../../../common/css/dir/rtl';
@import '../../../../common/css/theme/transp';
@import '../analyse.forecast';
3 changes: 3 additions & 0 deletions ui/analyse/css/build/gen/analyse.free.ltr.dark.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import '../../../../common/css/dir/ltr';
@import '../../../../common/css/theme/dark';
@import '../analyse.free';
3 changes: 3 additions & 0 deletions ui/analyse/css/build/gen/analyse.free.ltr.light.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import '../../../../common/css/dir/ltr';
@import '../../../../common/css/theme/light';
@import '../analyse.free';
3 changes: 3 additions & 0 deletions ui/analyse/css/build/gen/analyse.free.ltr.transp.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import '../../../../common/css/dir/ltr';
@import '../../../../common/css/theme/transp';
@import '../analyse.free';
3 changes: 3 additions & 0 deletions ui/analyse/css/build/gen/analyse.free.rtl.dark.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import '../../../../common/css/dir/rtl';
@import '../../../../common/css/theme/dark';
@import '../analyse.free';
3 changes: 3 additions & 0 deletions ui/analyse/css/build/gen/analyse.free.rtl.light.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import '../../../../common/css/dir/rtl';
@import '../../../../common/css/theme/light';
@import '../analyse.free';
Loading

0 comments on commit 9561e5a

Please sign in to comment.