Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a coverage report badge #137

Merged
merged 8 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
COVERALLS_REPO_TOKEN=""
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
**/node_modules
**/dist
**/.npmrc
**/coverage
**/coverage
**/.npm
**/.ash_history
**/.env
**/.node_repl_history
**/.config
68 changes: 44 additions & 24 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## Requirements

- [Git](https://git-scm.com/)
- [Node](https://nodejs.org/)
- [NPM](https://www.npmjs.com/)
- [Docker](https://www.docker.com/)
- [Docker Compose](https://docs.docker.com/compose/)

## Clone

Expand All @@ -13,58 +13,72 @@ git clone https://github.com/aminnairi/kryptonian
cd kryptonian
```

### Library
## Setup

#### Install
```bash
cp .env.example .env
```

## Startup

```bash
npm install
docker compose up --detach
```

#### Test
## Library

### Install

```bash
npm test
docker compose exec node npm install
```

#### Build
### Test

```bash
npm run build
docker compose exec node npm test
```

### Template
### Coverage report

```bash
cd template
docker compose exec node npm run coverage
```

#### Install
### Build

```bash
npm --workspaces install
docker compose exec node npm run build
```

#### Build
## Template

### Install

```bash
npm --workspaces run build
docker compose exec node npm --workspaces install
```

### Build

```bash
docker compose exec node npm --workspaces run build
```

Or

```bash
npm --workspace shared run build
npm --workspace shared run server
npm --workspace shared run client
docker compose node npm --workspace shared run build
docker compose node npm --workspace shared run server
docker compose node npm --workspace shared run client
```

#### Development
### Development

```bash
npm --workspace shared run dev
npm --workspace shared run dev
npm --workspace shared run dev
docker compose exec node npm --workspace shared run dev
docker compose exec node npm --workspace shared run dev
docker compose exec node npm --workspace shared run dev
```

## Publish
Expand All @@ -84,7 +98,7 @@ touch .npmrc
#### Build

```bash
npm run build
docker compose exec node npm run build
```

#### Changelog
Expand All @@ -98,5 +112,11 @@ Update the package version in the `package.json` file to reflect the new release
#### Publish

```bash
npm publish
docker compose exec node npm publish
```

## Shutdown

```bash
docker compose down --remove-orphans --volumes --timeout 0
```
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

Purity, hope, and the strength of Krypton in one package

[![npm](https://img.shields.io/npm/v/kryptonian)](https://www.npmjs.com/package/kryptonian) [![npm type definitions](https://img.shields.io/npm/types/kryptonian)](https://github.com/aminnairi/kryptonian) [![npm bundle size](https://img.shields.io/bundlephobia/minzip/kryptonian)](https://bundlephobia.com/package/kryptonian) [![NPM](https://img.shields.io/npm/l/kryptonian)](https://github.com/aminnairi/kryptonian/blob/development/LICENSE)
[![npm](https://img.shields.io/npm/v/kryptonian)](https://www.npmjs.com/package/kryptonian) ![Coveralls branch](https://img.shields.io/coverallsCoverage/github/aminnairi/kryptonian) [![npm type definitions](https://img.shields.io/npm/types/kryptonian)](https://github.com/aminnairi/kryptonian) [![npm bundle size](https://img.shields.io/bundlephobia/minzip/kryptonian)](https://bundlephobia.com/package/kryptonian) [![NPM](https://img.shields.io/npm/l/kryptonian)](https://github.com/aminnairi/kryptonian/blob/development/LICENSE)


## Summary

Expand Down
13 changes: 13 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
version: "3"

services:
node:
image: node:20.0.0-alpine
user: node
tty: true
stdin_open: true
working_dir: /home/node
env_file: .env
volumes:
- .:/home/node
Loading
Loading