Skip to content

Commit

Permalink
feat: build to lib
Browse files Browse the repository at this point in the history
  • Loading branch information
chakhsu committed Dec 12, 2023
1 parent 36dcea7 commit ff212d1
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,23 @@ jobs:
steps:
- name: Checkout master
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install Dependencies
run: pnpm i

- name: Build
run: pnpm build

- name: Test
run: pnpm test
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ typings/
# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Build files
lib/

### Vim ###
# Swap
[._]*.s[a-v][a-z]
Expand Down
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "grpcity",
"version": "1.3.0",
"version": "1.3.1",
"description": "A powerful and complete gRPC framework for Node.js",
"author": "Chakhsu.Lau",
"license": "MIT",
Expand All @@ -20,14 +20,18 @@
"bugs": {
"url": "https://github.com/chakhsu/grpcity/issues"
},
"main": "./types/index.js",
"types": "./types/index.d.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
"lib"
],
"engines": {
"node": ">=16"
},
"scripts": {
"clear": "rimraf lib",
"test": "mocha --exit --extension .test.js --recursive test",
"build": "rm -rf types && tsc -P tsconfig.json",
"build": "pnpm clear && tsc -P tsconfig.json",
"lint:prettier": "prettier --cache --check --ignore-path .gitignore --ignore-path .prettierignore .",
"prettier": "pnpm lint:prettier --write",
"prepare": "husky install"
Expand All @@ -51,6 +55,7 @@
"lint-staged": "^15.1.0",
"mocha": "^10.2.0",
"prettier": "3.1.0",
"rimraf": "^5.0.5",
"typescript": "^5.3.2"
}
}
84 changes: 84 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "@tsconfig/node14/tsconfig.json",
"compilerOptions": {
"outDir": "types",
"outDir": "lib",
"sourceMap": false,
"declaration": true,
"stripInternal": true,
Expand Down

0 comments on commit ff212d1

Please sign in to comment.