Skip to content

Commit

Permalink
add build (#7)
Browse files Browse the repository at this point in the history
* add build

* fix ci

* add dist to gitignore
  • Loading branch information
lucasavila00 authored Jun 30, 2022
1 parent 730371a commit 3eafd66
Show file tree
Hide file tree
Showing 16 changed files with 456 additions and 118 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Publish Package to npmjs
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm run build
- run: npm run release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8 changes: 6 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ jobs:
ports:
- 8124:8123
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- name: Tests
run: |
npm ci
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ node_modules/
*.exec.ts
*.exec.json
# *.exec.md
docs-ts-out/
docs-ts-out/
dist/
Empty file added CHANGELOG.md
Empty file.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Lucas Ávila

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
165 changes: 159 additions & 6 deletions package-lock.json

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

24 changes: 17 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
{
"name": "sql-select-ts",
"version": "1.0.0",
"description": "",
"main": "index.js",
"version": "0.0.0",
"description": "A modern, database-agnostic, composable SELECT query builder with great typescript support.",
"main": "lib/index.js",
"module": "es6/index.js",
"typings": "lib/index.d.ts",
"homepage": "https://lucasavila00.github.io/sql-select-ts/",
"repository": {
"type": "git",
"url": "https://github.com/lucasavila00/sql-select-ts.git"
},
"scripts": {
"test": "jest",
"clear_jest": "jest --clearCache",
"ts": "tsc --noEmit",
"prettier-check": "prettier --check \"src/**/*.{js,jsx,ts,tsx,json,css}\"",
"static": "npm run prettier-check && npm run ts",
"docs": "docs-ts",
"build": "tsc",
"eval:transpile": "nodemon --quiet --watch ../lib/docs-eval -e md --exec \"ts-node\" --transpileOnly ./scripts/run-docs-eval.ts --transpileOnly",
"eval:check": "nodemon --watch ../lib/docs-eval -e md --exec \"ts-node\" --transpileOnly ./scripts/run-docs-eval.ts --checkOnly",
"eval": "concurrently --raw \"npm run eval:transpile\" \"npm run eval:check\"",
"run-docs-eval": "ts-node ./scripts/run-docs-eval.ts",
"fix-docs-ts": "ts-node ./scripts/copy-fix-docs-ts.ts",
"md": "npm run docs && npm run fix-docs-ts && npm run run-docs-eval"
"md": "npm run docs && npm run fix-docs-ts && npm run run-docs-eval",
"build": "rm -rf dist && tsc -p ./tsconfig.build.json && tsc -p ./tsconfig.build-es6.json && ts-node scripts/build",
"prepublishOnly": "ts-node scripts/pre-publish",
"release": "ts-node scripts/release"
},
"keywords": [],
"author": "",
"license": "ISC",
"author": "Lucas Ávila",
"license": "MIT",
"dependencies": {},
"devDependencies": {
"@apla/clickhouse": "^1.6.4",
"@types/glob": "^7.2.0",
"@types/jest": "^28.1.1",
"@types/js-yaml": "^4.0.5",
"@types/node": "^18.0.0",
Expand All @@ -33,6 +42,7 @@
"concurrently": "^7.2.2",
"docs-ts": "^0.6.10",
"fp-ts": "^2.12.1",
"glob": "^8.0.3",
"jest": "^28.1.1",
"js-yaml": "^4.1.0",
"nodemon": "^2.0.18",
Expand Down
Loading

0 comments on commit 3eafd66

Please sign in to comment.