Skip to content

Commit fa1fe70

Browse files
committedOct 30, 2020
Initial commit
0 parents  commit fa1fe70

24 files changed

+11360
-0
lines changed
 

‎.github/workflows/release.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
push:
3+
# Sequence of patterns matched against refs/tags
4+
tags:
5+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
6+
7+
jobs:
8+
npm:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: '12.x'
15+
registry-url: 'https://registry.npmjs.org'
16+
- run: npm install
17+
- run: npm run build
18+
- run: npm run build-cli
19+
- run: npm publish
20+
env:
21+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

‎.github/workflows/validation.yml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Validation
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
lint:
7+
name: Linting
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@master
11+
- name: Use Node.js 12.x
12+
uses: actions/setup-node@v1
13+
with:
14+
node-version: 12.x
15+
- name: Install dependencies
16+
run: npm install
17+
- name: ESLint
18+
run: npm run lint
19+
test:
20+
name: Run unit tests
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@master
24+
- name: Use Node.js 12.x
25+
uses: actions/setup-node@v1
26+
with:
27+
node-version: 12.x
28+
- name: Install dependencies
29+
run: npm install
30+
- name: Jest
31+
run: npm run test --coverage
32+
- name: Send coverage to codecov
33+
uses: codecov/codecov-action@v1
34+
with:
35+
token: ${{ secrets.CODECOV_TOKEN }}
36+
flags: unittests
37+
38+
build:
39+
name: Run build
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@master
43+
- name: Use Node.js 12.x
44+
uses: actions/setup-node@v1
45+
with:
46+
node-version: 12.x
47+
- name: Install dependencies
48+
run: npm install
49+
- name: Build
50+
run: npm run build
51+
52+
buildCli:
53+
name: Run build-cli
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@master
57+
- name: Use Node.js 12.x
58+
uses: actions/setup-node@v1
59+
with:
60+
node-version: 12.x
61+
- name: Install dependencies
62+
run: npm install
63+
- name: Build
64+
run: npm run build-cli

‎.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules
2+
.vscode/
3+
# ignore codecoverage output
4+
coverage/
5+
# ignore cli binary output
6+
cli/
7+
# ignore dist/ output
8+
dist/

‎.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
12.19.0

‎LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Gago
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎README.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<p align="center">
2+
<h3 align="center">Template for typescript applications</h3>
3+
4+
<p align="center">
5+
⚙ Template repository for typescript applications meant to run in node ⚙
6+
<br />
7+
<a href="https://github.com/gagoar/ts-node-template#table-of-contents"><strong>Explore the docs »</strong></a>
8+
<br />
9+
<a href="https://github.com/gagoar/ts-node-template/issues">Report Bug</a>
10+
·
11+
<a href="https://github.com/gagoar/ts-node-template/issues">Request Feature</a>
12+
</p>
13+
</p>
14+
15+
## Table of Contents
16+
17+
- [Built With](#built-with)
18+
- [Getting Started](#getting-started)
19+
- [Contributing](#contributing)
20+
- [License](#license)
21+
22+
<!-- CONTRIBUTING -->
23+
24+
### Built With
25+
26+
- [ncc](https://github.com/vercel/ncc/)
27+
- [jest](https://github.com/facebook/jest)
28+
- [ora](https://github.com/sindresorhus/ora)
29+
- [commander](https://github.com/tj/commander.js/)
30+
- [cosmiconfig](https://github.com/davidtheclark/cosmiconfig)
31+
32+
## Contributing
33+
34+
Contributions are what makes the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated **greatly appreciated**.
35+
36+
1. Fork the Project
37+
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
38+
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
39+
4. Push to the Branch (`git push origin feature/AmazingFeature`)
40+
5. Open a Pull Request
41+
42+
<!-- LICENSE -->
43+
44+
## License
45+
46+
Distributed under the MIT License. See `LICENSE` for more information.

‎__tests__/greet.spec.ts

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { greet } from '../index';
2+
3+
describe('Greet', () => {
4+
it('should output a greeting', async () => {
5+
expect(await greet({ input: 'Bob' })).toMatchInlineSnapshot('"Greetings Bob"');
6+
});
7+
});

‎index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './src';

‎jest.config.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
process.env.TZ = 'UTC';
2+
3+
module.exports = {
4+
globals: {
5+
'ts-jest': {
6+
disableSourceMapSupport: true,
7+
},
8+
},
9+
verbose: true,
10+
transform: {
11+
'^.+\\.tsx?$': 'ts-jest',
12+
},
13+
preset: 'ts-jest',
14+
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
15+
testURL: 'http://localhost',
16+
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$'],
17+
testMatch: ['**/*.(spec|test).{ts,tsx}'],
18+
collectCoverage: true,
19+
collectCoverageFrom: ['config/**/*.{ts,tsx}', 'src/**/*.{ts,tsx}', '!src/utils/guards.ts', '!src/bin/cli.ts'],
20+
coverageDirectory: './coverage/',
21+
};

0 commit comments

Comments
 (0)
Please sign in to comment.