-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 changed file
with
17 additions
and
23 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 |
---|---|---|
@@ -1,38 +1,32 @@ | ||
# create-svelte | ||
# Parse Svelte Binding | ||
|
||
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). | ||
|
||
## Creating a project | ||
## About | ||
|
||
If you're seeing this, you've probably already done this step. Congrats! | ||
The project demos how to use the upcoming Parse JS feature [bind](https://github.com/parse-community/Parse-SDK-JS/pull/1484). | ||
|
||
```bash | ||
# create a new project in the current directory | ||
npm create svelte@latest | ||
Binding allows all Parse Objects' properties to be accessed via `object.bind.key`, instead of `object.get('key')`. | ||
|
||
# create a new project in my-app | ||
npm create svelte@latest my-app | ||
``` | ||
This allows for convienient two-way binding directly to elements such as inputs with `bind:value={object.bind.key}`. | ||
|
||
## Developing | ||
Configure Parse applicationId and serverURL in [src/main.js](src/parse.js) | ||
|
||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: | ||
## Project setup | ||
``` | ||
npm install | ||
``` | ||
|
||
```bash | ||
### Compiles and hot-reloads for development | ||
``` | ||
npm run dev | ||
|
||
# or start the server and open the app in a new browser tab | ||
npm run dev -- --open | ||
``` | ||
|
||
## Building | ||
### Testing on other projects | ||
|
||
To create a production version of your app: | ||
|
||
```bash | ||
npm run build | ||
``` | ||
To use Bind Notation on your project, install the branch with: | ||
|
||
You can preview the production build with `npm run preview`. | ||
``` | ||
npm i dblythy/Parse-SDK-JS#dot-notation | ||
``` | ||
|
||
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. |