generated from stagas/ts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
131 additions
and
108 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
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,4 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npm run lint | ||
npm run prepush |
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 @@ | ||
const { pullConfigs } = require('pull-configs') | ||
|
||
const local = __dirname + '/' | ||
const remote = 'https://github.com/stagas/typescript-minimal-template/raw/main/' | ||
|
||
const { assign, omit, sort, merge, replace } = pullConfigs(remote, local) | ||
|
||
merge('package.json', (prev, next) => { | ||
assign(prev.scripts, omit(next.scripts, ['test', 'build:min'])) | ||
sort(assign(prev.devDependencies, next.devDependencies)) | ||
}) | ||
replace('.eslintrc.js') | ||
replace('.prettierrc') | ||
// replace('jest.config.js') | ||
replace('tsconfig.json') | ||
replace('web-test-runner.config.js') | ||
merge('.vscode/settings.json') |
This file was deleted.
Oops, something went wrong.
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,33 +1,12 @@ | ||
{ | ||
"files.exclude": { | ||
".husky": true, | ||
".npmrc": true, | ||
".gitignore": true, | ||
".gitattributes": true, | ||
".prettierignore": true, | ||
"coverage": true | ||
}, | ||
"auto-run-command.rules": [ | ||
{ | ||
"condition": [ | ||
"hasFile: coverage/lcov.info" | ||
], | ||
"command": "coverage-gutters.watchCoverageAndVisibleEditors", | ||
"message": "Running coverage" | ||
} | ||
], | ||
"restoreTerminals.terminals": [ | ||
{ | ||
"splitTerminals": [ | ||
{ | ||
"name": "coverage", | ||
"commands": [ | ||
"npm run cov:watch" | ||
] | ||
}, | ||
{ | ||
"name": "zsh", | ||
"commands": [] | ||
} | ||
] | ||
}, | ||
], | ||
"todo-tree.tree.scanMode": "workspace only", | ||
"npm-scripts.showStartNotification": false | ||
} |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,25 +1,40 @@ | ||
{ | ||
"extends": "@tsconfig/node16/tsconfig.json", | ||
"include": [ | ||
"benchmark", | ||
"example", | ||
"src" | ||
], | ||
"watchOptions": { | ||
"watchFile": "priorityPollingInterval", | ||
"watchDirectory": "dynamicPriorityPolling" | ||
}, | ||
"ts-node": { | ||
"files": true | ||
}, | ||
"include": [ | ||
"src", | ||
"types" | ||
], | ||
"exclude": [ | ||
"**/*.spec.ts", | ||
"**/*.spec.tsx" | ||
], | ||
"compilerOptions": { | ||
"outDir": "dist/cjs", | ||
"lib": [ | ||
"dom" | ||
"DOM", | ||
"DOM.Iterable", | ||
"ESNext" | ||
], | ||
"outDir": "dist", | ||
"moduleResolution": "node", | ||
"experimentalDecorators": true, | ||
"emitDecoratorMetadata": true, | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"inlineSources": true, | ||
"declaration": true, | ||
"sourceMap": true, | ||
"module": "commonjs", | ||
"target": "esnext", | ||
"jsx": "react", | ||
"jsxFactory": "h", | ||
"jsxFragmentFactory": "Fragment", | ||
"strict": 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
const { esbuildPlugin } = require('@web/dev-server-esbuild') | ||
const { summaryReporter } = require('@web/test-runner') | ||
const { fromRollup } = require('@web/dev-server-rollup') | ||
const rollupCommonjs = require('@rollup/plugin-commonjs') | ||
|
||
const commonjs = fromRollup(rollupCommonjs); | ||
|
||
module.exports = { | ||
concurrency: 1, | ||
nodeResolve: true, | ||
files: ['test/**/*.spec.web.{ts,tsx}'], | ||
plugins: [ | ||
esbuildPlugin({ | ||
ts: true, | ||
tsx: true, | ||
jsxFactory: 'h', | ||
jsxFragment: 'Fragment', | ||
}), | ||
commonjs(), | ||
], | ||
reporters: [ | ||
summaryReporter(), | ||
], | ||
coverageConfig: { | ||
include: ['src/**/*.{ts,tsx}'], | ||
}, | ||
testRunnerHtml: testFramework => ` | ||
<html> | ||
<head> | ||
<script type="module" src="${testFramework}"></script> | ||
<script type="module">import 'jest-browser-globals';</script> | ||
</head> | ||
</html> | ||
`, | ||
} |