Skip to content

Commit ceb9287

Browse files
committed
Refacotr build script, split module in a way that makes more sence
1 parent 8a88f66 commit ceb9287

File tree

14 files changed

+13
-12
lines changed

14 files changed

+13
-12
lines changed

src/scripts/build.ts renamed to src/scripts/build/build.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
import { tsc } from "./tools/tsc";
2-
import { getProjectRoot } from "../bin/tools/getProjectRoot";
1+
import { tsc } from "../tools/tsc";
2+
import { getProjectRoot } from "../../bin/tools/getProjectRoot";
33
import { join as pathJoin } from "path";
44
import * as fs from "fs";
5-
import { getPatchedRawCssCodeForCompatWithRemixIcon, collectIcons, cssToTs } from "./cssToTs";
5+
import { getPatchedRawCssCodeForCompatWithRemixIcon, collectIcons } from "./icons";
6+
import { cssToTs } from "./cssToTs";
67
import {
78
pathOfPatchedRawCssCodeForCompatWithRemixIconRelativeToDsfrDist,
89
pathOfIconsJson
9-
} from "../bin/only-include-used-icons";
10+
} from "../../bin/only-include-used-icons";
1011
import * as child_process from "child_process";
1112
import { oppa } from "oppa";
1213
import { assert } from "tsafe/assert";
File renamed without changes.
File renamed without changes.

src/scripts/cssToTs/colorDecisions.ts renamed to src/scripts/build/cssToTs/colorDecisions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { exclude } from "tsafe/exclude";
88
import { is } from "tsafe/is";
99
import { parseColorOptionName, getThemePath as getColorOptionThemePath } from "./colorOptions";
1010
import * as crypto from "crypto";
11-
import { multiReplace } from "../tools/multiReplace";
11+
import { multiReplace } from "../../tools/multiReplace";
1212

1313
const contexts = ["background", "text", "border", "artwork"] as const;
1414

src/scripts/cssToTs/colorOptions.ts renamed to src/scripts/build/cssToTs/colorOptions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { id } from "tsafe/id";
33
import { parseCss } from "./parseCss";
44
import { assert } from "tsafe/assert";
55
import { exclude } from "tsafe/exclude";
6-
import { multiReplace } from "../tools/multiReplace";
6+
import { multiReplace } from "../../tools/multiReplace";
77
import { createGetCssVariable } from "./cssVariable";
88
import memoize from "memoizee";
99
import * as crypto from "crypto";
10-
import { cssColorRegexp } from "../tools/cssColorRegexp";
10+
import { cssColorRegexp } from "../../tools/cssColorRegexp";
1111

1212
export type ColorScheme = "light" | "dark";
1313

src/scripts/cssToTs/cssToTs.ts renamed to src/scripts/build/cssToTs/cssToTs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { generateBreakpointsTsCode } from "./breakpoints";
22
import { generateGetColorDecisionsTsCode } from "./colorDecisions";
33
import { generateGetColorOptionsTsCode } from "./colorOptions";
4-
import { getProjectRoot } from "../../bin/tools/getProjectRoot";
4+
import { getProjectRoot } from "../../../bin/tools/getProjectRoot";
55
import { generateTypographyTsCode } from "./typography";
66
import { generateSpacingTsCode } from "./spacing";
77
import { generateClassNamesTsCode } from "./classNames";
88
import * as fs from "fs";
99
import { join as pathJoin, basename as pathBasename, relative as pathRelative } from "path";
10-
import type { Icon } from "../../bin/only-include-used-icons";
10+
import type { Icon } from "../../../bin/only-include-used-icons";
1111

1212
export function cssToTs(params: {
1313
rawDsfrCssCode: string;
File renamed without changes.

src/scripts/build/cssToTs/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./cssToTs";
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)