-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b45b9af
commit c0023b6
Showing
75 changed files
with
831 additions
and
1,140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Build & Deploy | ||
on: | ||
push: | ||
branches: | ||
- dev | ||
env: | ||
SKIP_PREFLIGHT_CHECK: true | ||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
|
||
- name: Look Changelog | ||
uses: jaywcjlove/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
filter-author: (jaywcjlove|小弟调调™|dependabot\[bot\]|Renovate Bot|renovate\-bot) | ||
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' | ||
|
||
- run: npm install | ||
- run: npm run hoist | ||
- run: npm run build | ||
|
||
- name: example @example/basic | ||
working-directory: example/basic | ||
run: npm run build && npm run coverage | ||
|
||
- name: example @example/express | ||
working-directory: example/express | ||
run: npm run build | ||
|
||
- name: example @example/hapi | ||
working-directory: example/hapi | ||
run: npm run build | ||
|
||
- name: example @example/express-typeorm | ||
working-directory: example/express-typeorm | ||
run: npm run build | ||
|
||
- name: example @example/koa | ||
working-directory: example/koa | ||
run: npm run build | ||
|
||
- name: example @example/react-component | ||
working-directory: example/react-component | ||
run: npm run build && npm run doc | ||
|
||
- name: example @example/react-component-tsx | ||
working-directory: example/react-component-tsx | ||
run: | | ||
npm run build:lib | ||
npm run doc | ||
cd lib/cjs | ||
ls -al | ||
- name: example @example/transform-typescript | ||
working-directory: example/transform-typescript | ||
run: npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,6 @@ on: | |
branches: | ||
- master | ||
- v2 | ||
tags: | ||
- v* | ||
env: | ||
SKIP_PREFLIGHT_CHECK: true | ||
jobs: | ||
|
@@ -18,7 +16,7 @@ jobs: | |
node-version: 14 | ||
|
||
- name: Look Changelog | ||
uses: jaywcjlove/[email protected].2 | ||
uses: jaywcjlove/[email protected].3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
filter-author: (jaywcjlove|小弟调调™|dependabot\[bot\]|Renovate Bot|renovate\-bot) | ||
|
@@ -73,7 +71,7 @@ jobs: | |
|
||
- name: Generate Changelog | ||
id: changelog | ||
uses: jaywcjlove/[email protected].2 | ||
uses: jaywcjlove/[email protected].3 | ||
if: steps.create_tag.outputs.successful | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -202,6 +200,6 @@ jobs: | |
publish_branch: gh-pages | ||
publish_dir: ./zip | ||
|
||
- run: npm install @jsdevtools/npm-publish | ||
- run: ./node_modules/.bin/npm-publish --token="${{ secrets.NPM_TOKEN }}" ./packages/tsbb/package.json | ||
- run: ./node_modules/.bin/npm-publish --token="${{ secrets.NPM_TOKEN }}" ./packages/create-tsbb/package.json | ||
- run: npm install @jsdevtools/npm-publish -g | ||
- run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./packages/tsbb/package.json | ||
- run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./packages/create-tsbb/package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
./node_modules/.bin/pretty-quick --staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
/// <reference types="jest" /> | ||
|
||
import index from './'; | ||
|
||
describe('sum', () => { | ||
it('works', async () => { | ||
const num = await index(); | ||
expect(num).toBe(11); | ||
expect(num).toBe('22 Hello World'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export type Test = { | ||
a: string; | ||
b: number; | ||
}; | ||
|
||
export type TestGood = { | ||
a: string; | ||
g: string; | ||
b: number; | ||
c: number; | ||
e: number; | ||
e333: number; | ||
}; | ||
|
||
export function test(str: string) { | ||
return `${str}`; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import { abs } from './a/a'; | ||
|
||
export function sum(a: number, b: number) { | ||
return a + b; | ||
return a + b + abs(a, b); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
/// <reference types="jest" /> | ||
|
||
import { sum } from '../src/utils/sum'; | ||
|
||
describe('sum', () => { | ||
it('works', async () => { | ||
expect(sum(1, 1)).toEqual(2); | ||
expect(sum(1, 1)).toEqual(4); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
# Edit at https://www.gitignore.io/?templates=node | ||
|
||
lib | ||
esm | ||
package-lock.json | ||
__snapshots__ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
c0023b6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#120