mirror of
https://github.com/whscullin/apple2js.git
synced 2024-01-12 14:14:38 +00:00
Add configuration and dependencies to support Typescript (#37)
This change adds basic, non-optimal support for Typescript with webpack. It functions well in development mode and deployment boots ProDOS. There are probably many ways this configuration can be sped up, but I haven't investigated that yet. Note that no Typescript files are added in this change; it is merely a configuration change.
This commit is contained in:
parent
f5ad2cca16
commit
e8cd85f54a
13
jest.config.js
Normal file
13
jest.config.js
Normal file
@ -0,0 +1,13 @@
|
||||
module.exports = {
|
||||
"roots": [
|
||||
"js/",
|
||||
"test/",
|
||||
],
|
||||
"testMatch": [
|
||||
"**/?(*.)+(spec|test).+(ts|js)"
|
||||
],
|
||||
"transform": {
|
||||
"^.+\\.js$": "babel-jest",
|
||||
"^.+\\.ts$": "ts-jest"
|
||||
},
|
||||
}
|
3274
package-lock.json
generated
3274
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -26,13 +26,17 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.9.0",
|
||||
"@babel/preset-env": "^7.9.0",
|
||||
"@types/jest": "^26.0.14",
|
||||
"ajv": "^6.12.0",
|
||||
"babel-jest": "^25.1.0",
|
||||
"eslint": "^6.8.0",
|
||||
"file-loader": "^6.0.0",
|
||||
"jest": "^25.1.0",
|
||||
"jest": "^25.5.4",
|
||||
"node-forge": "^0.10.0",
|
||||
"raw-loader": "^4.0.0",
|
||||
"ts-jest": "^26.4.1",
|
||||
"ts-loader": "^8.0.5",
|
||||
"typescript": "^4.0.3",
|
||||
"webpack": "^4.42.0",
|
||||
"webpack-cli": "^3.3.11",
|
||||
"webpack-dev-server": "^3.11.0"
|
||||
|
24
tsconfig.json
Normal file
24
tsconfig.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"target": "es6",
|
||||
"noImplicitAny": true,
|
||||
"moduleResolution": "node",
|
||||
"sourceMap": true,
|
||||
"strictNullChecks": true,
|
||||
"outDir": "dist",
|
||||
"baseUrl": ".",
|
||||
"allowJs": true,
|
||||
"paths": {
|
||||
"*": [
|
||||
"node_modules/*",
|
||||
"src/types/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"js/**/*"
|
||||
]
|
||||
}
|
@ -39,6 +39,18 @@ module.exports =
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.ts$/i,
|
||||
use: [
|
||||
{
|
||||
loader: 'ts-loader'
|
||||
},
|
||||
],
|
||||
exclude: /node_modules/,
|
||||
}
|
||||
],
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.ts', '.js'],
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user