Skip to content

Commit

Permalink
docs: update dashboard README
Browse files Browse the repository at this point in the history
  • Loading branch information
bdromard committed Dec 19, 2024
1 parent 4f3b837 commit f88cfe0
Showing 1 changed file with 10 additions and 31 deletions.
41 changes: 10 additions & 31 deletions dashboard/README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,17 @@
# sv
# Carenage dashboard

Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).
This is the front-end interface for Carenage. It is a [SvelteKit](https://svelte.dev) project, thought as a dashboard representing metadata and environmental impact metrics for a given project, a CI pipeline, a CI run for a job, etc.

## Creating a project
## Development

If you're seeing this, you've probably already done this step. Congrats!
### Setup

```bash
# create a new project in the current directory
npx sv create
With `npm` installed, you can do `make install` to setup needed dependencies for the project. Then, with `make run_dev`, this will launch the server for
the dashboard.

# create a new project in my-app
npx sv create my-app
```
### Testing

## Developing
Unit and integration tests are executed with `make component_test`, end-to-end testing with `make e2e_test`.

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

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

To create a production version of your 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://svelte.dev/docs/kit/adapters) for your target environment.
For integration testing and mocking responses from external services like `Boagent`, [msw](https://mswjs.io/) is used. You can add handlers for specific
URLs in `src/mocks/handlers.ts`. In a development environment, those will be able to handle fetching valid URLs by the server code, and render data on the adequate pages. Handlers work either in the browser and in a Node environment.

0 comments on commit f88cfe0

Please sign in to comment.