Skip to content

Commit

Permalink
feat
Browse files Browse the repository at this point in the history
  • Loading branch information
HadiKhai committed Mar 23, 2024
1 parent 8c6de7f commit 52441a0
Show file tree
Hide file tree
Showing 103 changed files with 27,399 additions and 1,552 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CI
on:
push:
branches:
- '*'
- '*/*'
- '**'
- '!main'
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: nrwl/nx-set-shas@v3
- run: npm ci
- run: npx nx affected -t lint
- run: npx nx affected -t test --configuration=ci
- run: npx nx affected -t build
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release
on:
push:
branches:
- 'main'
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: nrwl/nx-set-shas@v3
- run: npm ci
- run: npx nx affected -t lint
- run: npx nx affected -t test --configuration=ci
- run: npx nx affected -t build
- run: npx nx affected -t release:package --parallel=1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Binary file modified .yarn/install-state.gz
Binary file not shown.
12 changes: 10 additions & 2 deletions examples/backend/express/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
{
"name": "justaname-express-example",
"scripts": {
"start": "tsc && node dist/main.js"
"build": "tsc",
"build:watch": "tsc -w",
"start": "nodemon dist/main.js",
"serve": "concurrently \"yarn build:watch\" \"yarn start\""
},
"dependencies": {
"@justaname.id/sdk": "0.0.6",
"@justaname.id/sdk": "^0.0.7",
"express": "^4.18.1"
},
"devDependencies": {
"concurrently": "^8.2.2",
"dotenv": "^16.4.5",
"nodemon": "^3.1.0"
}
}
3 changes: 3 additions & 0 deletions examples/backend/express/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"sourceRoot": "examples/backend/express/src",
"projectType": "application",
"targets": {
"serve": {
"command": "cd ./examples/backend/express && yarn && yarn serve"
}
},
"tags": []
}
2 changes: 2 additions & 0 deletions examples/backend/express/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import express, { Request } from 'express';
import cors from 'cors';
import { JustaName } from '@justaname.id/sdk';
import dotenv from 'dotenv'

dotenv.config();
const app = express();

app.use(cors());
Expand Down
3 changes: 2 additions & 1 deletion examples/backend/express/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"strict": true,
"esModuleInterop": true,
"outDir": "./dist",
"rootDir": "./src"
"rootDir": "./src",
"skipLibCheck": true
},
"include": [
"src/**/*.ts"
Expand Down
Loading

0 comments on commit 52441a0

Please sign in to comment.