-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Postinstall sync #5760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Postinstall sync #5760
Changes from 10 commits
bdd671e
220b1a7
b3c34cc
aa6772c
2a5c4fd
483dcdd
3e9ef4c
969fcd5
dc8661f
ad0c80f
eef885b
072fe86
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'create-svelte': patch | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
Use @sveltejs/kit postinstall lifecycle hook to invoke 'svelte-kit sync' instead of prepare in projects created by create-svelte |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
env: | ||
# not needed for linting | ||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1" | ||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
|
@@ -38,7 +38,7 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
node-version: [16] | ||
os: [ubuntu-latest , windows-latest] | ||
os: [ubuntu-latest, windows-latest] | ||
e2e-browser: ['chromium'] | ||
include: | ||
- node-version: 16 | ||
|
@@ -53,7 +53,7 @@ jobs: | |
env: | ||
TURBO_CACHE_KEY: ${{ matrix.os }}-${{ matrix.node-version }} | ||
# Install playwright's binray under node_modules so it will be cached together | ||
PLAYWRIGHT_BROWSERS_PATH: "0" | ||
PLAYWRIGHT_BROWSERS_PATH: '0' | ||
KIT_E2E_BROWSER: ${{matrix.e2e-browser}} | ||
steps: | ||
- run: git config --global core.autocrlf false | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,11 @@ | ||
#!/usr/bin/env node | ||
import './dist/cli.js'; | ||
import fs from 'fs'; | ||
import { fileURLToPath } from 'url'; | ||
|
||
// in our own CI, and when deploying directly from this monorepo, | ||
// the `dist` directory will not exist yet | ||
if (fs.existsSync(fileURLToPath(new URL('./dist', import.meta.url)))) { | ||
import('./dist/cli.js'); | ||
dominikg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} else { | ||
console.error('Run "pnpm build" and try running this command again'); | ||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -6,8 +6,7 @@ | |||||
"dev": "vite dev", | ||||||
"build": "vite build", | ||||||
"preview": "vite preview", | ||||||
"prepare": "node ../../cli.js sync", | ||||||
"check": "tsc && svelte-check", | ||||||
"check": "svelte-kit sync && tsc && svelte-check", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
without this is always goes to dist for me. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah yeah, changed it to IIRC the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was thinking of prepare with the ../../cli.js call too, so that when you pull changes and do |
||||||
"test": "npm run test:dev && npm run test:build", | ||||||
"test:dev": "rimraf test/errors.json && cross-env DEV=true playwright test", | ||||||
"test:build": "rimraf test/errors.json && playwright test" | ||||||
|
Uh oh!
There was an error while loading. Please reload this page.