Skip to content

Commit

Permalink
updated to fcl 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
muttoni committed May 4, 2022
1 parent 69734d1 commit 24d58b5
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 57 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
VITE_PROFILE_ADDRESS=0xba1132bc08f82fe2
VITE_ACCESS_NODE_API=https://access-testnet.onflow.org
VITE_ACCESS_NODE_API=https://rest-testnet.onflow.org
VITE_DISCOVERY_WALLET=https://fcl-discovery.onflow.org/testnet/authn
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fcl-sveltekit",
"version": "0.0.1",
"version": "1.0.0",
"scripts": {
"dev": "svelte-kit dev",
"build": "svelte-kit build",
Expand All @@ -9,11 +9,9 @@
},
"devDependencies": {
"@picocss/pico": "^1.4.4",
"@rollup/plugin-node-resolve": "^13.1.1",
"@samatech/onflow-fcl-esm": "^0.4.4",
"@sveltejs/adapter-auto": "1.0.0-next.4",
"@sveltejs/adapter-vercel": "1.0.0-next.32",
"@sveltejs/kit": "1.0.0-next.202",
"@onflow/fcl": "^1.0.0-alpha.2",
"@sveltejs/adapter-auto": "^1.0.0-next.40",
"@sveltejs/kit": "^1.0.0-next.202",
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.32",
"rollup-plugin-node-builtins": "^2.1.2",
"rollup-plugin-node-globals": "^1.4.0",
Expand Down
2 changes: 1 addition & 1 deletion src/flow/actions.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { browser } from '$app/env';
import { get } from 'svelte/store';

import * as fcl from "@samatech/onflow-fcl-esm";
import * as fcl from "@onflow/fcl";
import "./config";
import { user, profile, transactionStatus, transactionInProgress } from './stores';

Expand Down
4 changes: 3 additions & 1 deletion src/flow/config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { config } from "@samatech/onflow-fcl-esm";
import { config } from "@onflow/config";

config({
"app.detail.title": "FCL Quickstart for SvelteKit", // Shows user what dapp is trying to connect
"app.detail.icon": "https://unavatar.io/twitter/muttonia", // shows image to the user to display your dapp brand
"accessNode.api": import.meta.env.VITE_ACCESS_NODE_API,
"discovery.wallet": import.meta.env.VITE_DISCOVERY_WALLET,
"0xProfile": import.meta.env.VITE_PROFILE_ADDRESS
Expand Down
53 changes: 5 additions & 48 deletions svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,53 +1,10 @@
/** @type {import('@sveltejs/kit').Config} */

import resolve from '@rollup/plugin-node-resolve'
import builtins from 'rollup-plugin-node-builtins';
import globals from 'rollup-plugin-node-globals';
import vercel from '@sveltejs/adapter-vercel';
import adapter from '@sveltejs/adapter-auto';

/** @type {import('@sveltejs/kit').Config} */
const config = {
// options passed to svelte.compile (https://svelte.dev/docs#svelte_compile)
compilerOptions: null,

// an array of file extensions that should be treated as Svelte components
extensions: ['.svelte'],

kit: {
adapter: vercel(), // change this to whatever build adapter you want to use (e.g. static)
files: {
assets: 'static',
hooks: 'src/hooks',
lib: 'src/lib',
routes: 'src/routes',
serviceWorker: 'src/service-worker',
template: 'src/app.html'
},
paths: {
assets: '',
base: ''
},
// hydrate: false,
prerender: {
crawl: false,
enabled: false
},
router: true,
ssr: true,
vite: () => ({
plugins: [
builtins(),
resolve({
browser: true,
}),
globals(),
],
}),
},

// SvelteKit uses vite-plugin-svelte. Its options can be provided directly here.

// See the available options at https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md

kit: {
adapter: adapter(),
}
};

export default config;

1 comment on commit 24d58b5

@vercel
Copy link

@vercel vercel bot commented on 24d58b5 May 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

fcl-sveltekit – ./

fcl-sveltekit-git-main-muttoni.vercel.app
fcl-sveltekit-muttoni.vercel.app
fcl-sveltekit.vercel.app

Please sign in to comment.