diff --git a/create-app.js b/create-app.js index dd94fa3..1537cd8 100644 --- a/create-app.js +++ b/create-app.js @@ -24,7 +24,7 @@ cpSync('logo.png', 'app/logo.png') rmSync(appTemp, { recursive: true }) // Run build to ensure distributed files for plugin exist. -execSync('npm run build', { +execSync('bun run build', { stdio: 'inherit', }) @@ -35,7 +35,7 @@ execSync('npm install $(npm pack .. | tail -1)', { }) // Additional dependency. -execSync('npm install react-native-cols mobx', { +execSync('bun install react-native-cols mobx', { cwd: join(process.cwd(), 'app'), stdio: 'inherit', }) diff --git a/documentation/markup/Repl.js b/documentation/markup/Repl.js index f7c92c0..c5afe4a 100644 --- a/documentation/markup/Repl.js +++ b/documentation/markup/Repl.js @@ -87,10 +87,7 @@ const SandpackInner = ({ phone, setPhone }) => { const phone = deviceSizes[selected.value] Object.values(sandpack.clients).forEach((client) => { - client.iframe.contentWindow.postMessage( - { type: 'width', width: phone.width / phone.scale }, - '*' - ) + client.iframe.contentWindow.postMessage({ type: 'width', width: phone.width / phone.scale }, '*') }) setPhone(phone) @@ -98,10 +95,7 @@ const SandpackInner = ({ phone, setPhone }) => { useEffect(() => { Object.values(sandpack.clients).forEach((client) => { - client.iframe.contentWindow.postMessage( - { type: 'width', width: phone.width / phone.scale }, - '*' - ) + client.iframe.contentWindow.postMessage({ type: 'width', width: phone.width / phone.scale }, '*') }) }, [sandpack]) @@ -141,11 +135,7 @@ const SandpackInner = ({ phone, setPhone }) => { }), option: (provided, state) => ({ ...provided, - backgroundColor: state.isSelected - ? '#82D9FF' - : state.isFocused - ? '#FF85FA' - : 'transparent', + backgroundColor: state.isSelected ? '#82D9FF' : state.isFocused ? '#FF85FA' : 'transparent', cursor: 'pointer', ':active': { backgroundColor: '#FF85FA', @@ -176,7 +166,7 @@ const SandpackInner = ({ phone, setPhone }) => { } export const Repl = () => { - const [phone, setPhone] = useState(deviceSizes['iphone14']) + const [phone, setPhone] = useState(deviceSizes['iphone15']) return ( diff --git a/documentation/package.json b/documentation/package.json index 6debeec..d267faf 100644 --- a/documentation/package.json +++ b/documentation/package.json @@ -7,15 +7,15 @@ "lint": "next lint" }, "dependencies": { - "@codesandbox/sandpack-react": "^2.11.2", + "@codesandbox/sandpack-react": "^2.14.2", "@stitches/react": "^1.2.8", - "device-sizes": "^1.2.3", - "indicate": "^6.2.0", + "device-sizes": "^1.2.4", + "indicate": "^6.3.0", "next": "14.0.4", "react": "18.2.0", "react-dom": "18.2.0", "react-select": "^5.8.0", - "wasser": "^2.4.0" + "wasser": "^2.6.0" }, "devDependencies": { "eslint": "8.56.0", diff --git a/package.json b/package.json index 4a3db52..1b035a7 100644 --- a/package.json +++ b/package.json @@ -6,13 +6,13 @@ "license": "MIT", "author": "Matthias Giger", "scripts": { - "app": "node create-app.js", + "app": "bun create-app.js", "app:install": "npm i --no-save $(npm pack . | tail -1) --prefix app", "build": "esbuild index.ts --outdir=dist --bundle --format=esm --platform=neutral --sourcemap --external:react-native --external:react --external:mobx && tsc", "watch": "npm-run-all --parallel build:watch copy", "copy": "cpx 'dist/**/*' app/node_modules/responsive-react-native/dist --watch", "build:watch": "esbuild index.ts --watch --outdir=dist --bundle --format=esm --platform=neutral --sourcemap --external:react-native --external:react --external:mobx", - "test": "jest && npm run test:types", + "test": "jest && bun run test:types", "test:types": "cd test && tsc && cd types && tsc", "test:watch": "jest --watchAll", "lint": "eslint . --fix --ext .js,.jsx,.ts,.tsx",