Typescript cli (#647)

* Add tsconfig.json and static module resolution for ts

* Add trailing newline to tsconfig

* Change tsc module to commonjs to support .json import

* Add tsc as dependency and to scripts
This commit is contained in:
Jakub Ďuraš authored and Jordan Eldredge committed 2018-08-28 16:45:03 -07:00
1 parent 2a7427dd00
commit 118c1ff305
3 files changed
+31 -1

No files matched your search

+3 -1
View File
@@ -10,6 +10,7 @@
],
"scripts": {
"lint": "eslint .",
"type-check": "tsc",
"build": "webpack --config=config/webpack.prod.js",
"build-library": "webpack --config=config/webpack.library.js",
"analyze": "webpack --config=config/webpack.bundle-analyzer.js",
@@ -20,7 +21,7 @@
"stats-library": "webpack --config=config/webpack.library.js --json > stats.json",
"weight": "npm run build-library > /dev/null && gzip-size built/webamp.bundle.min.js",
"test": "jest --projects config/jest.unit.js config/jest.eslint.js",
"travis-tests": "npm run test && npm run build && npm run build-library",
"travis-tests": "npm run test && npm run type-check && npm run build && npm run build-library",
"tdd": "jest --projects config/jest.unit.js --watch",
"format": "prettier --write experiments/**/*.js js/**/*.js css/**/*.css !css/**/*.min.css",
"integration-tests": "npm run build -- --display=errors-only && jest --projects config/jest.integration.js",
@@ -107,6 +108,7 @@
"style-loader": "^0.19.1",
"tinyqueue": "^1.2.3",
"travis-weigh-in": "^1.0.2",
"typescript": "^3.0.1",
"uglifyjs-webpack-plugin": "^1.2.5",
"url-loader": "^0.6.2",
"webpack": "^3.6.0",
Vendored
+6
View File
@@ -0,0 +1,6 @@
declare module "*.wsz";
declare module "*.mp3";
declare module "*.png";
declare module "*.ico";
declare module "*.jpg";
declare module "*.svg";
+22
View File
@@ -0,0 +1,22 @@
{
"compilerOptions": {
"moduleResolution": "node",
"module": "commonjs",
"target": "esnext",
"allowJs": true,
"skipLibCheck": true,
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"strict": true,
"jsx": "preserve",
"noEmit": true,
"pretty": true
},
"include": [
"js/**/*.js"
],
"exclude": [
"node_modules",
"**/*.spec.ts"
]
}