Skip to content

Commit f9f561c

Browse files
committed
chore: initial commit
0 parents  commit f9f561c

File tree

10 files changed

+101
-0
lines changed

10 files changed

+101
-0
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = tab
5+
end_of_line = lf
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
10+
[*.yml]
11+
indent_style = space
12+
indent_size = 2

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
yarn.lock

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Younho Choo
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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# @younho9/typescript-esm-starter

index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default function greet(name: string): string;

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function greet(name) {
2+
return `Hello ${name}`;
3+
}

index.test-d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import {expectType} from 'tsd';
2+
import greet from './index.js';
3+
4+
expectType<(name: string) => string>(greet);

package.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"name": "@younho9/typescript-esm-starter",
3+
"version": "0.0.0",
4+
"private": true,
5+
"description": "Personal TypeScript ES module starter template",
6+
"keywords": [
7+
"typescript",
8+
"typescript-starter",
9+
"ts",
10+
"esmodule",
11+
"esm",
12+
"starter",
13+
"starter-template"
14+
],
15+
"bugs": {
16+
"url": "https://github.com/younho9/typescript-esm-starter/issues"
17+
},
18+
"repository": {
19+
"type": "git",
20+
"url": "git+https://github.com/younho9/typescript-esm-starter.git"
21+
},
22+
"license": "MIT",
23+
"author": {
24+
"name": "Younho Choo",
25+
"email": "[email protected]",
26+
"url": "https://younho9.dev"
27+
},
28+
"sideEffects": false,
29+
"type": "module",
30+
"exports": "./index.js",
31+
"types": "./index.d.ts",
32+
"files": [
33+
"index.js",
34+
"index.d.ts"
35+
],
36+
"scripts": {
37+
"test": "xo && ava && tsd"
38+
},
39+
"dependencies": {},
40+
"devDependencies": {
41+
"@younho9/tsconfig": "0.1.0",
42+
"ava": "3.15.0",
43+
"tsd": "0.19.0",
44+
"typescript": "4.5.4",
45+
"xo": "0.47.0"
46+
},
47+
"engines": {
48+
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
49+
}
50+
}

test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import test from 'ava';
2+
import greet from './index.js';
3+
4+
test('greet()', t => {
5+
t.is(greet('username'), 'Hello username');
6+
});

0 commit comments

Comments
 (0)