mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-26 03:33:58 -05:00
Add typescript dependency & tsconfig.json
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
63095e6c78
commit
0d788e0aec
3 changed files with 24 additions and 4 deletions
11
package.json
11
package.json
|
@ -2,18 +2,18 @@
|
|||
"name": "CodiMD",
|
||||
"version": "1.6.0",
|
||||
"description": "Realtime collaborative markdown notes on all platforms.",
|
||||
"main": "app.js",
|
||||
"main": "lib/app.js",
|
||||
"license": "AGPL-3.0",
|
||||
"scripts": {
|
||||
"test": "npm run-script eslint && npm run-script jsonlint && npm run-script mocha-suite",
|
||||
"eslint": "node_modules/.bin/eslint --max-warnings 0 lib public test app.js",
|
||||
"eslint": "node_modules/.bin/eslint --max-warnings 0 lib public test",
|
||||
"jsonlint": "find . -not -path './node_modules/*' -type f -name '*.json' -o -type f -name '*.json.example' | while read json; do echo $json ; jq . $json; done",
|
||||
"mocha-suite": "NODE_ENV=test CMD_DB_URL=\"sqlite::memory:\" mocha --exit",
|
||||
"standard": "echo 'standard is no longer being used, use `npm run eslint` instead!' && exit 1",
|
||||
"dev": "webpack --config webpack.dev.js --progress --colors --watch",
|
||||
"heroku-prebuild": "bin/heroku",
|
||||
"build": "webpack --config webpack.prod.js --progress --colors --bail",
|
||||
"start": "sequelize db:migrate && node app.js"
|
||||
"start": "tsc && sequelize db:migrate && node built/app.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@passport-next/passport-openid": "^1.0.0",
|
||||
|
@ -167,6 +167,9 @@
|
|||
"url": "https://github.com/codimd/server.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/express": "4.17.0",
|
||||
"@types/node": "^12.12.12",
|
||||
"awesome-typescript-loader": "^5.2.1",
|
||||
"babel-cli": "^6.26.0",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-loader": "^7.1.4",
|
||||
|
@ -196,6 +199,8 @@
|
|||
"script-loader": "^0.7.2",
|
||||
"string-loader": "^0.0.1",
|
||||
"style-loader": "^1.0.0",
|
||||
"tslint": "^5.20.1",
|
||||
"typescript": "^3.7.2",
|
||||
"url-loader": "^2.3.0",
|
||||
"webpack": "^4.41.2",
|
||||
"webpack-cli": "^3.3.10",
|
||||
|
|
12
tsconfig.json
Normal file
12
tsconfig.json
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"outDir": "./built",
|
||||
"allowJs": true,
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
"esModuleInterop": true
|
||||
},
|
||||
"include": [
|
||||
"./lib/**/*"
|
||||
]
|
||||
}
|
|
@ -357,7 +357,7 @@ module.exports = {
|
|||
|
||||
resolve: {
|
||||
modules: ['node_modules'],
|
||||
extensions: ['.js'],
|
||||
extensions: ['.js', '.ts', '.tsx'],
|
||||
alias: {
|
||||
codemirror: path.join(__dirname, 'node_modules/codemirror/codemirror.min.js'),
|
||||
inlineAttachment: path.join(__dirname, 'public/vendor/inlineAttachment/inline-attachment.js'),
|
||||
|
@ -388,6 +388,9 @@ module.exports = {
|
|||
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.tsx?$/,
|
||||
use: [{ loader: 'awesome-typescript-loader' }]
|
||||
}, {
|
||||
test: /\.js$/,
|
||||
use: [{ loader: 'babel-loader' }],
|
||||
exclude: [/node_modules/, /public\/vendor/]
|
||||
|
|
Loading…
Reference in a new issue