-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
164 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
# - @vue/* | ||
|
||
public-hoist-pattern[]=@vue/* | ||
prefer-workspace-packages=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
{ | ||
"name": "@whyframe/playground-astro", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "astro dev", | ||
"build": "astro build", | ||
"preview": "astro preview" | ||
}, | ||
"dependencies": { | ||
"preact": "^10.13.2", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"solid-js": "^1.7.1", | ||
"vue": "^3.2.47" | ||
}, | ||
"devDependencies": { | ||
"@astrojs/preact": "^2.1.0", | ||
"@astrojs/react": "^2.1.1", | ||
"@astrojs/solid-js": "^2.1.0", | ||
"@astrojs/svelte": "^2.1.0", | ||
"@astrojs/vue": "^2.1.0", | ||
"@types/react": "^18.0.32", | ||
"@types/react-dom": "^18.0.11", | ||
"@whyframe/astro": "workspace:*", | ||
"@whyframe/core": "workspace:*", | ||
"@whyframe/jsx": "workspace:*", | ||
"@whyframe/svelte": "workspace:*", | ||
"@whyframe/vue": "workspace:*", | ||
"astro": "^2.1.9", | ||
"svelte": "^3.58.0", | ||
"vite-plugin-inspect": "^0.7.18" | ||
} | ||
"name": "@whyframe/playground-astro", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "astro dev", | ||
"build": "astro build", | ||
"preview": "astro preview" | ||
}, | ||
"dependencies": { | ||
"preact": "^10.13.2", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"solid-js": "^1.7.1", | ||
"vue": "^3.2.47" | ||
}, | ||
"devDependencies": { | ||
"@astrojs/preact": "^2.1.0", | ||
"@astrojs/react": "^2.1.1", | ||
"@astrojs/solid-js": "^2.1.0", | ||
"@astrojs/svelte": "^2.1.0", | ||
"@astrojs/vue": "^2.1.0", | ||
"@types/react": "^18.0.32", | ||
"@types/react-dom": "^18.0.11", | ||
"@whyframe/astro": "^0.2.4", | ||
"@whyframe/core": "^0.1.9", | ||
"@whyframe/jsx": "^0.1.8", | ||
"@whyframe/svelte": "^0.1.5", | ||
"@whyframe/vue": "^0.1.5", | ||
"astro": "^2.1.9", | ||
"svelte": "^3.58.0", | ||
"vite-plugin-inspect": "^0.7.18" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
{ | ||
"name": "@whyframe/playground-next", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start", | ||
"preview": "next start" | ||
}, | ||
"dependencies": { | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" | ||
}, | ||
"devDependencies": { | ||
"@whyframe/core": "workspace:*", | ||
"@whyframe/jsx": "workspace:*", | ||
"next": "^13.2.4" | ||
} | ||
"name": "@whyframe/playground-next", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start", | ||
"preview": "next start" | ||
}, | ||
"dependencies": { | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" | ||
}, | ||
"devDependencies": { | ||
"@whyframe/core": "^0.1.9", | ||
"@whyframe/jsx": "^0.1.8", | ||
"next": "^13.2.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
{ | ||
"name": "@whyframe/playground-sveltekit", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite dev", | ||
"build": "vite build", | ||
"preview": "vite preview" | ||
}, | ||
"devDependencies": { | ||
"@sveltejs/adapter-auto": "^2.0.0", | ||
"@sveltejs/kit": "^1.15.0", | ||
"@whyframe/core": "workspace:*", | ||
"@whyframe/svelte": "workspace:*", | ||
"mdsvex": "^0.10.6", | ||
"svelte": "^3.58.0", | ||
"vite": "^4.2.1", | ||
"vite-plugin-inspect": "^0.7.18" | ||
} | ||
"name": "@whyframe/playground-sveltekit", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite dev", | ||
"build": "vite build", | ||
"preview": "vite preview" | ||
}, | ||
"devDependencies": { | ||
"@sveltejs/adapter-auto": "^2.0.0", | ||
"@sveltejs/kit": "^1.15.0", | ||
"@whyframe/core": "^0.1.9", | ||
"@whyframe/svelte": "^0.1.5", | ||
"mdsvex": "^0.10.6", | ||
"svelte": "^3.58.0", | ||
"vite": "^4.2.1", | ||
"vite-plugin-inspect": "^0.7.18" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
{ | ||
"name": "@whyframe/playground-vitepress", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vitepress dev", | ||
"build": "vitepress build", | ||
"preview": "vitepress serve" | ||
}, | ||
"dependencies": { | ||
"vue": "^3.2.47" | ||
}, | ||
"devDependencies": { | ||
"@whyframe/core": "workspace:*", | ||
"@whyframe/vue": "workspace:*", | ||
"vite": "^4.2.1", | ||
"vite-plugin-inspect": "^0.7.18", | ||
"vitepress": "1.0.0-alpha.64" | ||
} | ||
"name": "@whyframe/playground-vitepress", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vitepress dev", | ||
"build": "vitepress build", | ||
"preview": "vitepress serve" | ||
}, | ||
"dependencies": { | ||
"vue": "^3.2.47" | ||
}, | ||
"devDependencies": { | ||
"@whyframe/core": "^0.1.9", | ||
"@whyframe/vue": "^0.1.5", | ||
"vite": "^4.2.1", | ||
"vite-plugin-inspect": "^0.7.18", | ||
"vitepress": "1.0.0-alpha.64" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
{ | ||
"name": "@whyframe/playground-webpack-react", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "webpack serve", | ||
"build": "webpack build", | ||
"preview": "sirv dist -s" | ||
}, | ||
"dependencies": { | ||
"copy-webpack-plugin": "^11.0.0", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.21.4", | ||
"@babel/preset-react": "^7.18.6", | ||
"@whyframe/core": "workspace:*", | ||
"@whyframe/jsx": "workspace:*", | ||
"babel-loader": "^9.1.2", | ||
"css-loader": "^6.7.3", | ||
"html-webpack-plugin": "^5.5.0", | ||
"mini-css-extract-plugin": "^2.7.5", | ||
"sirv-cli": "^2.0.2", | ||
"style-loader": "^3.3.2", | ||
"webpack": "^5.77.0", | ||
"webpack-cli": "^5.0.1", | ||
"webpack-dev-server": "^4.13.2" | ||
} | ||
"name": "@whyframe/playground-webpack-react", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "webpack serve", | ||
"build": "webpack build", | ||
"preview": "sirv dist -s" | ||
}, | ||
"dependencies": { | ||
"copy-webpack-plugin": "^11.0.0", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.21.4", | ||
"@babel/preset-react": "^7.18.6", | ||
"@whyframe/core": "^0.1.9", | ||
"@whyframe/jsx": "^0.1.8", | ||
"babel-loader": "^9.1.2", | ||
"css-loader": "^6.7.3", | ||
"html-webpack-plugin": "^5.5.0", | ||
"mini-css-extract-plugin": "^2.7.5", | ||
"sirv-cli": "^2.0.2", | ||
"style-loader": "^3.3.2", | ||
"webpack": "^5.77.0", | ||
"webpack-cli": "^5.0.1", | ||
"webpack-dev-server": "^4.13.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import fs from 'node:fs/promises' | ||
import path from 'node:path' | ||
|
||
// playground projects need to reference the `@whyframe/*` packages with direct version | ||
// not the `workspace:*` version, so they can be used in stackblitz directly. | ||
// pnpm likes to convert them to `workspace:*` when updating, this scripts reverts it, | ||
// and can be helpful when releasing new packages. | ||
|
||
// find all package versions in packages/ | ||
const packages = await fs.readdir('packages') | ||
const versions = {} | ||
for (const pkg of packages) { | ||
if (pkg.startsWith('.')) continue | ||
const pkgJson = await fs.readFile( | ||
path.join('packages', pkg, 'package.json'), | ||
'utf-8' | ||
) | ||
const pkgJsonObj = JSON.parse(pkgJson) | ||
versions[pkgJsonObj.name] = pkgJsonObj.version | ||
} | ||
|
||
// find all playground projects, since the versions with ^ | ||
const playgrounds = await fs.readdir('playground') | ||
for (const playground of playgrounds) { | ||
if (playground.startsWith('.')) continue | ||
const pkgJsonPath = path.join('playground', playground, 'package.json') | ||
const pkgJson = await fs.readFile(pkgJsonPath, 'utf-8') | ||
const pkgJsonObj = JSON.parse(pkgJson) | ||
for (const dep in pkgJsonObj.devDependencies) { | ||
if (versions[dep]) { | ||
pkgJsonObj.devDependencies[dep] = `^${versions[dep]}` | ||
} | ||
} | ||
await fs.writeFile(pkgJsonPath, JSON.stringify(pkgJsonObj, null, 2) + '\n') | ||
} |