-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(typescript): foundation * fix(foo): files only for test setup * feat(eslint): support typescript * feat(compile): with typescript * feat(webpack): with typescript * fix(webpack): name the bundle mson * refactor(webpack.config): need to ignore require lint error * build(typescript): also output definitions * fix(typescript): combine config and target es6 for generators * refactor(typescript): nODE_ENV not needed to transpile * test(just-test): interactively * fix(just-test): clean up watching * feat(prettier): define rc * feat(bundle-size): much smaller with es5 target * fix(typescript): commonjs needed for mson-server * feat(registrar): add getters and setters for typescript * fix(registrar): registrar not register * refactor(registrar): default client to any until migrate to typescript * fix(registrar): back out changes for typescript as not needed now
- Loading branch information
Showing
12 changed files
with
2,444 additions
and
9,786 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,3 @@ | ||
node_modules | ||
lib | ||
dist |
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,23 @@ | ||
module.exports = { | ||
env: { | ||
node: true, | ||
browser: true, | ||
'jest/globals': true | ||
}, | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
plugins: [ | ||
'@typescript-eslint', | ||
'jest' | ||
], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended' | ||
], | ||
rules: { | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'no-prototype-builtins': 'off', | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'@typescript-eslint/no-this-alias': 'off' | ||
} | ||
}; |
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,3 @@ | ||
{ | ||
"singleQuote": true | ||
} |
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,16 @@ | ||
module.exports = { | ||
preset: 'ts-jest/presets/js-with-ts', | ||
collectCoverageFrom: [ | ||
'src/**/*.{ts,js}' | ||
], | ||
coverageThreshold: { | ||
global: { | ||
branches: 100, | ||
functions: 100, | ||
lines: 100, | ||
statements: 100 | ||
} | ||
}, | ||
// globalSetup: '<rootDir>/setup.ts', | ||
// globalTeardown: '<rootDir>/teardown.ts' | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"compilerOptions": { | ||
"outDir": "./lib", | ||
"allowJs": true, | ||
"target": "es6", | ||
"strict": true, | ||
"esModuleInterop": true, | ||
"declaration": true, | ||
"moduleResolution": "node", | ||
"module": "commonjs" | ||
}, | ||
"include": ["./src/**/*"], | ||
"exclude": [ | ||
"src/**/*.test.ts", | ||
"src/**/*.test.js" | ||
] | ||
} |
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,24 +1,28 @@ | ||
// eslint-disable-next-line | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
mode: 'production', | ||
entry: { | ||
mson: './src/index.js', | ||
}, | ||
|
||
output: { | ||
path: path.resolve(__dirname, 'dist'), | ||
filename: '[name].js', | ||
library: '[name]', | ||
}, | ||
|
||
devtool: "source-map", | ||
|
||
resolve: { | ||
extensions: ["", ".webpack.js", ".web.js", ".ts", ".tsx", ".js"], | ||
}, | ||
|
||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
exclude: /node_modules/, | ||
use: { | ||
loader: 'babel-loader', | ||
}, | ||
}, | ||
{ test: /\.tsx?$/, loader: "ts-loader" }, | ||
{ test: /\.js$/, loader: "source-map-loader" }, | ||
], | ||
}, | ||
} | ||
}; |
Oops, something went wrong.