Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Casula committed Sep 13, 2020
0 parents commit be74741
Show file tree
Hide file tree
Showing 14 changed files with 7,243 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish
on:
push:
tags:
- v*.*.*
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: 13
registry-url: https://registry.npmjs.org/
- name: Build
run: |
npm ci
npm install
npm run test
npm run build
- name: Publish
run: |
cp ./README.md ./lib
cd ./lib
npm publish --access public
shell: bash
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test
on: [pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: 13
registry-url: https://registry.npmjs.org/
- run: |
npm ci
npm install
npm run test
npm run format
npm run lint
npm run build
- uses: actions/upload-artifact@v1
with:
name: temp-package
path: lib
env:
CI: true
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
/lib
/coverage
.cc_token
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 120,
"trailingComma": "all",
"singleQuote": true,
"semi": false
}
12 changes: 12 additions & 0 deletions @types/express/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { DataExtractor, Pagination, Query } from '../../src'

declare global {
namespace Express {
interface Request {
dbResourceId: string
dbPagination: Pagination
dbQuery?: Query
parsedResource: any
}
}
}
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resty
=====

An NPM package for providing quick and dirty JSON REST API into your existing ExpressJS application servers.

3 changes: 3 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
require('whatwg-fetch')

jest.setTimeout(10000)
13 changes: 13 additions & 0 deletions jestconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"transform": {
"^.+\\.(t|j)sx?$": "ts-jest"
},
"setupFiles": ["./jest.setup.js"],
"testRegex": "(/tests/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"],
"coverageDirectory": "./coverage/",
"collectCoverage": true,
"modulePathIgnorePatterns": [
"<rootDir>/lib/"
]
}
Loading

0 comments on commit be74741

Please sign in to comment.