Skip to content

Commit

Permalink
chore(tokens): fix node issue with ts-node
Browse files Browse the repository at this point in the history
  • Loading branch information
mainframev committed Dec 11, 2023
1 parent edfc88b commit e5f6599
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"scripts": {
"build-ci": "yarn size:build",
"components": "yarn workspace @kiwicom/orbit-components",
"checks": "ts-node --esm scripts/checks.mts",
"checks": "node --loader ts-node/esm scripts/checks.mts",
"check:types": "yarn checks --types",
"check:links": "yarn checks --links",
"check:css": "yarn checks --css",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { DECLARATIONS_IGNORE_PATTERN } from "./consts.mjs";
const [, __dirname] = filedirname();

export default async function generateTypeDeclarations() {
await $`ts-node --esm config/typeFiles.mts`;
await $`node --loader ts-node/esm config/typeFiles.mts`;

console.log(chalk.greenBright.bold("Generating type declarations..."));
await $`cpy "**/*.js.flow" ../lib --cwd src --parents`;
Expand Down
4 changes: 2 additions & 2 deletions packages/orbit-components/config/build/index.mts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import buildSize from "./buildSize.mjs";

logStep("Building icons");

await $`ts-node --esm config/build/buildIcons.mts`;
await $`node --loader ts-node/esm config/build/buildIcons.mts`;

if (argv.size) {
console.log(
Expand All @@ -28,7 +28,7 @@ import buildSize from "./buildSize.mjs";
}

if (!argv.size) {
await $`ts-node --esm config/createSVGFont.mts`;
await $`node --loader ts-node/esm config/createSVGFont.mts`;
await $`cd src/icons; zip -r ../../orbit-svgs.zip ./svg; cd -`;
await $`zip -j orbit-svgs.zip orbit-icons-font/orbit-icons.svg`;
await $`zip -r orbit-icons-font.zip orbit-icons-font`;
Expand Down
12 changes: 6 additions & 6 deletions packages/orbit-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@
"cy:dev": "vite cypress/integration --logLevel silent",
"cy:run": "start-server-and-test cy:dev http-get://localhost:3000 'cypress run'",
"cy:open": "start-server-and-test cy:dev http-get://localhost:3000 'cypress open'",
"build": "ts-node --esm config/build/index.mts",
"build": "node --loader ts-node/esm config/build/index.mts",
"tailwind": "cross-env NODE_ENV=test npx tailwindcss -i ./src/tailwind.css -o ./lib/tailwind.css",
"prepublishOnly": "yarn build",
"size:build": "yarn build --size",
"size": "size-limit",
"size:why": "size-limit --why",
"fetch:icons": "ts-node --esm config/fetchIcons.mts",
"check:icons": "ts-node --esm config/checkIconsCli.mts",
"fetch:icons": "node --loader ts-node/esm config/fetchIcons.mts",
"check:icons": "node --loader ts-node/esm config/checkIconsCli.mts",
"check:types": "tsc --p tsconfig.json",
"flow:ci": "flow check",
"build:iconsPng": "ts-node --esm config/generatePngIcons.mts",
"build:storybook": "ts-node --esm config/build/buildIcons.mts && storybook build -c .storybook -o .out",
"build:iconsPng": "node --loader ts-node/esm config/generatePngIcons.mts",
"build:storybook": "node --loader ts-node/esm config/build/buildIcons.mts && storybook build -c .storybook -o .out",
"eslint:check": "eslint . --report-unused-disable-directives",
"test-ct": "playwright test -c playwright-ct.config.ts",
"deploy:storybook": "yarn storybook-to-ghpages -e ./.out",
"deploy:surge": "yarn surge .out/",
"deploy:updateURL": "ts-node --esm config/deploymentUtils.mts updateLiveURL",
"deploy:updateURL": "node --loader ts-node/esm config/deploymentUtils.mts updateLiveURL",
"docs-gen": "monstra docs"
},
"storybook-deployer": {
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-design-tokens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"check:types": "tsc",
"test": "jest",
"build": "yarn clean && yarn build:dictionary && tsup && yarn generate:flow && yarn eslint --fix src/js/*.ts",
"build:dictionary": "ts-node --esm ./src/dictionary/build.ts",
"build:dictionary": "node --loader ts-node/esm ./src/dictionary/build.ts",
"generate:flow": "npx flowgen --output-file ./dist/index.js.flow ./dist/index.d.ts --add-flow-header",
"prepublishOnly": "yarn build",
"clean": "del-cli dist output src/js/createTokens.* src/js/defaultFoundation.*"
Expand Down

0 comments on commit e5f6599

Please sign in to comment.