Skip to content
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

feat: update to kit@next.100, convert to esm #39

Merged
merged 18 commits into from
May 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
nodejs 14.16.0
pnpm 5.18.7
nodejs 16.0.0
pnpm 6.2.4
28 changes: 24 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,43 @@

## Quickstart

Since SvelteKit is still in Beta, and the Adapter API is _most_ in flux, here is the Adapter to SvelteKit version compatibility:

| Adapter Version | SvelteKit Version |
| --------------- | ----------------- |
| `0.6.0` | `1.0.0-next.100` |
| `0.5.x` | `1.0.0-next.54` |
| `0.4.x` | `1.0.0-next.46` |
| `0.3.x` | `1.0.0-next.27` |

**Note**: only the versions listed have been tested together, if others happen to work, it is just coincidence. This is beta software after all.

In your standard SvelteKit project:

- `npm i -D svelte-adapter-firebase`
- add adapter to `svelte.config.cjs`:
- `npm install --save-dev svelte-adapter-firebase`
- add adapter to `svelte.config.js`:

```js
const firebaseAdapter = require("svelte-adapter-firebase");
import firebaseAdapter from "svelte-adapter-firebase";

/** @type {import('@sveltejs/kit').Config} */
module.exports = {
export default {
kit: {
adapter: firebaseAdapter(),
target: "#svelte",
},
};
```

- in `package.json` remove Firebase Hosting public directory before `svelte-kit build` to work around https://github.com/sveltejs/kit/issues/587

```json
"scripts": {
"dev": "svelte-kit dev",
"build": "npx -y rimraf <dir used in firebase.json.hosting.public> && svelte-kit build --verbose",
...
```

- `npm run build`
- Follow further instructions output by the adapter to prepare for deployment.

Expand Down
23 changes: 11 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,37 +22,36 @@
"ssr"
],
"version": "0.5.2",
"main": "dist/cli.js",
"type": "module",
"exports": {
"import": "./src/index.js"
},
"main": "src/index.js",
"types": "src/index.d.ts",
"files": [
"dist"
"src"
],
"dependencies": {
"@sveltejs/app-utils": "^1.0.0-next.3"
"@sveltejs/kit": "1.0.0-next.100",
"esbuild": "^0.11.18"
},
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-node-resolve": "^11.2.0",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
"@sveltejs/kit": "^1.0.0-next.54",
"@types/node": "^14.14.35",
"ava": "^3.15.0",
"husky": "^5.0.8",
"rimraf": "^3.0.2",
"rollup": "^2.41.2",
"semantic-release": "^17.4.0",
"typescript": "^4.2.3",
"xo": "^0.38.2"
},
"scripts": {
"preinstall": "npx -y only-allow pnpm",
"prepare": "husky install",
"fix": "xo --fix",
"test": "xo && ava",
"dev": "rollup -cw",
"prebuild": "rimraf dist",
"build": "rollup -c"
"test": "xo && ava"
},
"release": {
"branches": [
Expand Down
Loading