diff --git a/.gitignore b/.gitignore index bcb195a..98fe359 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ +/dist .DS_Store node_modules bower_components coverage npm-debug.log -tmp \ No newline at end of file +tmp diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..d6bbf93 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + // 使用 IntelliSense 以学习相关的 Node.js 调试属性。 + // 悬停以查看现有属性的描述。 + // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + + { + "type": "node", + "request": "attach", + "name": "Attach by Process ID", + "processId": "${command:PickProcess}", + "protocol": "inspector" + } + ] +} diff --git a/config/index.js b/config/index.js deleted file mode 100644 index 4b818df..0000000 --- a/config/index.js +++ /dev/null @@ -1,5 +0,0 @@ -// local or development or production -module.exports = - (process.env.NODE_ENV === 'local' && require('./config.local')) || - (process.env.NODE_ENV === 'development' && require('./config.dev')) || - require('./config.prod') diff --git a/package.json b/package.json index a567fb2..ceec937 100644 --- a/package.json +++ b/package.json @@ -2,24 +2,21 @@ "name": "rap2-delos", "version": "1.0.0", "repository": { - "url": "" + "url": "https://github.com/thx/rap2-delos" }, "description": "", - "main": "dispatch.js", + "main": "dist/dispatch.js", "scripts": { - "create-db": "node scripts/init", - "dev": "NODE_ENV=development nodemon --watch scripts --watch src scripts/dev.js", - "dev-local": "NODE_ENV=local nodemon --watch scripts --watch src scripts/dev.js", - "start": "NODE_ENV=production node dispatch.js", - "check": "npm run linter;npm run test;", - "test": "NODE_ENV=development TEST_MODE=true mocha --exit --reporter nyan", - "linter": "standard --fix", - "watch-test": "NODE_ENV=development nodemon --watch scripts --watch src --watch test ./node_modules/.bin/mocha --timeout 5000", - "watch-test-local": "NODE_ENV=local nodemon --watch scripts --watch src --watch test ./node_modules/.bin/mocha --timeout 5000" + "init": "node dist/scripts/init/index.js", + "dev": "cross-env NODE_ENV=development nodemon --watch scripts --watch dist dist/scripts/dev.js", + "start": "cross-env NODE_ENV=production node dist/dispatch.js" }, - "author": "mozhi.gyy@alibaba-inc.com, bosn@outlook.com", + "author": "bosn, nuysoft", "license": "ISC", "dependencies": { + "@types/koa": "^2.0.43", + "cross-env": "^5.1.1", + "@types/koa-router": "^7.0.27", "chalk": "^1.1.3", "graceful": "^1.0.1", "js-beautify": "^1.6.9", @@ -34,33 +31,34 @@ "mockjs": "^1.0.1-beta3", "moment": "^2.17.1", "mysql": "^2.11.1", + "mysql2": "^1.5.1", "node-fetch": "^1.7.1", "node-print": "0.0.4", "path-to-regexp": "^2.1.0", - "sequelize": "^3.30.4", - "sequelize-cli": "^3.1.0", + "reflect-metadata": "^0.1.10", + "sequelize": "^4.28.6", + "sequelize-typescript": "^0.6.2", + "svg-captcha": "^1.3.11", "underscore": "^1.8.3", "urllib": "^2.22.0" }, "devDependencies": { + "@types/node": "^8.5.2", "babel-eslint": "^7.2.3", "chai": "^3.5.0", "mocha": "^4.0.1", "nodemon": "^1.11.0", "npm-run-all": "^4.0.2", - "pre-commit": "^1.2.2", "standard": "^10.0.2", - "supertest": "^3.0.0" + "supertest": "^3.0.0", + "tslint": "^5.8.0" }, "standard": { "parser": "babel-eslint", "globals": [], "ignore": [] }, - "pre-commit": [ - "linter" - ], "engines": { - "install-node": "9.2.0" + "install-node": "8.9.3" } } diff --git a/public/index.html b/public/index.html index f9d5bf6..a9acd30 100644 --- a/public/index.html +++ b/public/index.html @@ -7,6 +7,7 @@