# Devingen

## Getting Started

For development, run;

```bash
npm start
```

To build the app for production, run:

```bash
npm run build
```

To run the unit tests once, run:

```
npm test
```

To run the unit tests and watch for file changes during development, run:

```
npm run test.watch
```

## To serve a local CDN

```
cd dist && http-server -p 8000 --cors
```

## To publish components library

```
nvm use && npm run clean && npm i && npm run build && npm publish
```

Optionally upload to Sepet via `cd dist & sepet upload -v 0.0.40 -b dvn .`

## To deploy Mentornity Console

```shell script
# build output
nvm use && npm run clean && npm i && npm run build:mentornity.console
nvm use && npm run clean && npm i && npm run build:devingen.io

# Upload to Sepet via 
cd www && sepet upload -v 0.0.9 -b mentornity-console .
cd www && sepet upload -v 0.0.4 -b devingen-io .

# run spa locally
cd www
http-server-spa . index.html 8000
```

## To serve vanilla HTML app

Install this package https://www.npmjs.com/package/http-server-spa

```
npm install http-server-spa -g
```

Navigate to the sample folder

```
cd sample
```

Run the server

```
http-server-spa . sample-mentornity-console.html 8000
```