Skip to content

Commit 655bd48

Browse files
authored
Clean up polaris.shopify.com scripts (Shopify#6865)
1 parent a5e6560 commit 655bd48

File tree

7 files changed

+13
-267
lines changed

7 files changed

+13
-267
lines changed

.changeset/modern-experts-swim.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@shopify/polaris-tokens': patch
3+
'polaris.shopify.com': patch
4+
---
5+
6+
Remove og-image generation script, clean up other scripts, mv scripts to root

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"rollup-plugin-node-externals": "^4.0.0",
7373
"size-limit": "^5.0.3",
7474
"stylelint": "^14.1.0",
75+
"ts-node": "^10.7.0",
7576
"turbo": "^1.2.8",
7677
"typescript": "^4.6.3"
7778
},

polaris-tokens/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
"clean": "rm -rf .turbo node_modules dist *.tsbuildinfo"
2929
},
3030
"devDependencies": {
31-
"@shopify/browserslist-config": "^3.0.0",
32-
"ts-node": "^10.7.0"
31+
"@shopify/browserslist-config": "^3.0.0"
3332
},
3433
"license": "SEE LICENSE IN LICENSE.md",
3534
"author": "Shopify <[email protected]>",

polaris.shopify.com/package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@
1111
"lint:styles": "stylelint '**/*.{css,scss}'",
1212
"clean": "rm -rf .turbo node_modules .next *.tsbuildinfo",
1313
"create-component": "generact --root src/components src/components/Template/Template.tsx",
14-
"parse-components": "node src/scripts/parseComponents.mjs",
15-
"parse-guidelines": "node src/scripts/parseGuidelines.mjs",
16-
"copy-icons": "node src/scripts/copy-icons.mjs",
17-
"generate-og-images": "next build && yarn next-sitemap && node src/scripts/generate-og-images.js",
18-
"generate-og-images-skip-sitemap": "node src/scripts/generate-og-images.js",
19-
"get-props": "tsc ./src/scripts/get-props.ts --target esnext --module node16 --types \"react\" --outDir ./src/scripts/get-props && node ./src/scripts/get-props/scripts/get-props.js && rm -rf ./src/scripts/get-props"
14+
"copy-icons": "node scripts/copy-icons.mjs",
15+
"generate-sitemap": "next build && yarn next-sitemap",
16+
"get-props": "ts-node --skip-project ./scripts/get-props.ts"
2017
},
2118
"dependencies": {
2219
"@floating-ui/react-dom-interactions": "^0.6.1",

polaris.shopify.com/src/scripts/get-props.ts renamed to polaris.shopify.com/scripts/get-props.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as ts from "typescript";
22
import * as fs from "fs";
33
import path from "path";
44
import globby from "globby";
5-
import { PropsForComponent } from "../types";
5+
import { PropsForComponent } from "../src/types";
66

77
function getProps(fileNames: string[], options: ts.CompilerOptions): void {
88
let program = ts.createProgram(fileNames, options);
@@ -15,7 +15,7 @@ function getProps(fileNames: string[], options: ts.CompilerOptions): void {
1515
}
1616
}
1717

18-
const filePath = path.join(__dirname, "../../../data/props.json");
18+
const filePath = path.join(__dirname, "../src/data/props.json");
1919
fs.writeFileSync(filePath, JSON.stringify(props, undefined, 2));
2020

2121
return;

polaris.shopify.com/src/scripts/generate-og-images.js

Lines changed: 0 additions & 257 deletions
This file was deleted.

0 commit comments

Comments
 (0)