Skip to content

Commit

Permalink
doc: README update
Browse files Browse the repository at this point in the history
  • Loading branch information
0gust1 committed Sep 11, 2023
1 parent c562cc8 commit 9ca1561
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
# create-svelte
# Molstar Svelte Library

Everything you need to build a Svelte library, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
This is a collection of [Svelte](https://svelte.dev) components for [Mol\*](https://molstar.org) visualizations.

Read more about creating a library [in the docs](https://kit.svelte.dev/docs/packaging).
The goal is to provide a set of composable components that can be used to build web applications/components/websites providing visualization and analysis of biomolecular structures.
The components are designed to be used in a [Svelte](https://svelte.dev) application, ~~but could be used in any framework that supports [Web Components](https://developer.mozilla.org/en-US/docs/Web/Web_Components)~~ (later).

## Creating a project
## Developing

If you're seeing this, you've probably already done this step. Congrats!
Install the dependencies...

```bash
# create a new project in the current directory
npm create svelte@latest

# create a new project in my-app
npm create svelte@latest my-app
# we use npm ci to install the pinned dependencies from package-lock.json
npm ci
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev
Expand All @@ -27,31 +22,30 @@ npm run dev
npm run dev -- --open
```

Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app.
Everything inside `src/lib` is part of the library, everything inside `src/routes` is used to generate the documentation/showcase/e2e website.

## Building

To build your library:
To build the library:

```bash
npm run package
```

To create a production version of your showcase app:
To create a production version of the documentation/showcase app:

```bash
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
## Publishing

Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)).
Website/doc deploymen is done through github actions.

To publish your library to [npm](https://www.npmjs.com):
**TODO:**
package publishing is not yet automated.

```bash
npm publish
Expand Down

0 comments on commit 9ca1561

Please sign in to comment.