Skip to content

Commit

Permalink
Remove platform specific commands in template scripts (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
tzyl authored May 30, 2024
1 parent 7e8d065 commit 2f5cfac
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/thin-eggs-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@osdk/example-generator": minor
"@osdk/create-app": minor
---

Remove platform specific commands in template scripts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
Expand Down
6 changes: 6 additions & 0 deletions packages/example-generator/src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,17 @@ const UPDATE_PACKAGE_JSON: Mutator = {
mutate: (template, content) => ({
type: "modify",
newContent: content.replace(
// Use locally generated SDK in the monorepo
"\"@osdk/examples.one.dot.one\": \"latest\"",
"\"@osdk/examples.one.dot.one\": \"workspace:*\"",
).replace(
// Follow monorepo package naming convention
`"name": "${templateExampleId(template)}"`,
`"name": "@osdk/examples.${templateCanonicalId(template)}"`,
).replace(
// Monorepo uses eslint 9 whereas templates are still on eslint 8
"\"lint\": \"eslint",
"\"lint\": \"ESLINT_USE_FLAT_CONFIG=false eslint",
),
}),
};
Expand Down

0 comments on commit 2f5cfac

Please sign in to comment.