Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9d4d829

Browse files
authored
First-class TypeScript declarations (#705)
* Merge typings from DefinitelyTyped* run tests and package build on GitHub actions* fix test running command* transpile before running ES5 code
1 parentfe6e726 commit9d4d829

23 files changed

+23550
-5836
lines changed

‎.babelrc‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
2-
"presets": [],
2+
"presets": [["@babel/preset-typescript", {"allExtensions":true }]],
33
"plugins": [
4+
"@babel/plugin-transform-typescript",
45
"@babel/plugin-transform-runtime",
6+
"@babel/plugin-proposal-class-properties",
57
[
68
"@babel/plugin-transform-classes",
79
{
@@ -10,7 +12,6 @@
1012
],
1113
"@babel/plugin-syntax-dynamic-import",
1214
"@babel/plugin-syntax-import-meta",
13-
"@babel/plugin-proposal-class-properties",
1415
"@babel/plugin-proposal-json-strings",
1516
[
1617
"@babel/plugin-proposal-decorators",
@@ -37,6 +38,17 @@
3738
"cjs": {
3839
"presets": ["@babel/preset-env"]
3940
},
41+
"jsnext": {
42+
"presets": [
43+
[
44+
"@babel/preset-env",
45+
{
46+
"modules":"commonjs"
47+
}
48+
],
49+
["@babel/preset-typescript", {"allExtensions":true }]
50+
]
51+
},
4052
"test": {
4153
"plugins": ["@babel/plugin-transform-modules-commonjs"]
4254
}

‎.github/workflows/build.yml‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name:Build
2+
3+
on:
4+
push:
5+
branches:[master]
6+
pull_request:
7+
branches:[master]
8+
9+
jobs:
10+
build:
11+
name:Test Suite
12+
runs-on:ubuntu-latest
13+
14+
steps:
15+
-name:Set up Node
16+
uses:actions/setup-node@v1
17+
with:
18+
node-version:14.x
19+
20+
-name:Checkout code
21+
uses:actions/checkout@v2
22+
23+
-name:Cache dependencies
24+
uses:actions/cache@v2
25+
with:
26+
path:~/.npm
27+
key:${{ runner.OS }}-npm-${{ hashFiles('**/package-lock.json') }}
28+
restore-keys:|
29+
${{ runner.OS }}-npm-
30+
${{ runner.OS }}-
31+
32+
-name:Install dependencies
33+
run:npm ci
34+
35+
-name:Build package
36+
run:npm run build

‎.github/workflows/tests.yml‎

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name:Tests
2+
3+
on:
4+
push:
5+
branches:[master]
6+
pull_request:
7+
branches:[master]
8+
9+
jobs:
10+
build:
11+
name:Test Suite
12+
runs-on:ubuntu-latest
13+
14+
steps:
15+
-name:Set up Node
16+
uses:actions/setup-node@v1
17+
with:
18+
node-version:14.x
19+
20+
-name:Checkout code
21+
uses:actions/checkout@v2
22+
23+
-name:Cache dependencies
24+
uses:actions/cache@v2
25+
with:
26+
path:~/.npm
27+
key:${{ runner.OS }}-npm-${{ hashFiles('**/package-lock.json') }}
28+
restore-keys:|
29+
${{ runner.OS }}-npm-
30+
${{ runner.OS }}-
31+
32+
-name:Install dependencies
33+
run:npm ci
34+
35+
-name:Lint code
36+
run:npm run lint
37+
38+
-name:Transpile to ES5
39+
run:npm run transpile:cjs
40+
41+
-name:ES5 tests
42+
run:npm run test:es5
43+
44+
-name:Normal tests
45+
run:npm run test
46+
47+
-name:Performance tests
48+
run:npm run test:perf
49+
50+
-name:Collect coverage
51+
run:npx codecov

‎.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ docs-current/
55
.DS_Store
66
lib/
77
es/
8+
jsnext/
9+
types/
810
.publish
911
dist/
1012
min

‎.travis.yml‎

Lines changed: 0 additions & 20 deletions
This file was deleted.

‎ambient.d.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
declare module"immutable-ops";
2+
declare module"lodash/filter";
3+
declare module"lodash/orderBy";
4+
declare module"lodash/reject";
5+
declare module"lodash/sortBy";

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp