Skip to content

Commit 4e91ccd

Browse files
committed
update
1 parent b35b4ec commit 4e91ccd

File tree

10 files changed

+4758
-19
lines changed

10 files changed

+4758
-19
lines changed

.eslintignore

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,4 @@
22
*.config.ts
33
*.test.js
44
*.test.ts
5-
dist/cjs
6-
dist/esm
7-
dist/umd
8-
dist/types
5+
dist

.github/workflows/publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [created]
66

77
jobs:
8-
build:
8+
publish:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2

.github/workflows/test.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,14 @@ on:
1111
- master
1212

1313
jobs:
14-
build:
14+
test:
1515
runs-on: ${{ matrix.os }}
1616
strategy:
17-
max-parallel: 4
1817
matrix:
1918
os:
2019
- ubuntu-latest
21-
- macos-latest
2220
- windows-latest
23-
node: [10.x, 12.x, 14.x]
21+
node: [10.x, 12.x, 14.x, 15.x]
2422

2523
steps:
2624
- uses: actions/checkout@v2

.gitignore

-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
dist/cjs
2-
dist/esm
3-
dist/umd
4-
dist/types
5-
61

72
# Logs
83
logs

config/webpack.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module.exports = {
88
filename: 'index.js',
99
library: 'exampleTypescriptPackage',
1010
libraryTarget: 'umd',
11+
globalObject: 'this',
1112
},
1213
module: {
1314
rules: [

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"package": "npm run build && npm pack",
1717
"test": "jest",
1818
"test:cov": "jest --coverage",
19-
"addscope": "node tools/packagejson name @tomchen/example-typescript-package && prettier --write package.json"
19+
"addscope": "node tools/packagejson name @tomchen/example-typescript-package"
2020
},
2121
"publishConfig": {
2222
"access": "public"

src/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
import { Num } from './Num'
22

3-
export default { Num }
43
export { Num }

tools/packagejson.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@ for (let i = 0, l = args.length; i < l; i++) {
1515

1616
fs.writeFile(
1717
Path.join(__dirname, fileName),
18-
JSON.stringify(file),
19-
function writeJSON(err) {
18+
JSON.stringify(file, null, 2),
19+
(err) => {
2020
if (err) {
2121
return console.log(err)
2222
}
23-
console.log(JSON.stringify(file))
2423
console.log('Writing to ' + fileName)
2524
}
2625
)

tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
// "typeRoots": [], /* List of folders to include type definitions from. */
4949
// "types": [], /* Type declaration files to be included in compilation. */
5050
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
51+
// "resolveJsonModule": true,
5152
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
5253
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
5354
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */

yarn.lock

+4,749
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)