From 88fcbce8af30648d793bea8ce2c4c79a22aec718 Mon Sep 17 00:00:00 2001 From: Huan LI Date: Sun, 24 Jun 2018 14:14:05 +0800 Subject: [PATCH] add reference path for ts-node v7 (#1383) --- bin/entrypoint.sh | 3 --- package.json | 12 ++++++------ src/config.ts | 2 ++ src/puppet-wechat4u/index.ts | 2 ++ 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/bin/entrypoint.sh b/bin/entrypoint.sh index 8c5e7f14..cc34a2e7 100755 --- a/bin/entrypoint.sh +++ b/bin/entrypoint.sh @@ -9,9 +9,6 @@ set -e export HOME=/bot export PATH=$PATH:/wechaty/bin:/wechaty/node_modules/.bin -# Issue #1383 for ts-node v7 -export TS_NODE_FILES=1 - function wechaty::banner() { echo figlet " Wechaty " diff --git a/package.json b/package.json index eeb4ff01..96008081 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "doc": "bash -x scripts/generate-docs.sh", "coverage": "nyc report --reporter=text-lcov | coveralls", "changelog": "github_changelog_generator -u chatie -p wechaty && sed -i'.bak' /greenkeeper/d CHANGELOG.md && sed -i'.bak' '/An in-range update of/d' CHANGELOG.md && ts-node scripts/sort-contributiveness.ts < CHANGELOG.md > CHANGELOG.new.md 2>/dev/null && cat CHANGELOG.md >> CHANGELOG.new.md && mv CHANGELOG.new.md CHANGELOG.md", - "doctor": "npm run check-node-version && npm run ts-node bin/doctor", + "doctor": "npm run check-node-version && ts-node bin/doctor", "check-node-version": "check-node-version --node \">= 8.5\"", "lint": "npm run check-node-version && npm run lint:ts && npm run lint:es && npm run lint:sh", "lint:es": "eslint \"{bin,examples,scripts,src,tests}/**/*.js\" --ignore-pattern=\"tests/fixtures/**\"", @@ -28,18 +28,18 @@ "lint:ts": "tslint --project tsconfig.json && tsc --noEmit", "lint:sh": "bash -n bin/*.sh", "sloc": "sloc bin examples scripts src tests --details --format cli-table --keys total,source,comment && sloc bin examples scripts src tests", - "ts-node": "TS_NODE_FILES=1 ts-node", + "ts-node": "ts-node", "test": "npm run clean && npm run lint && npm run test:unit:retry && npm run test:shell && npm run sloc", "test:linux": "npm run pretest && parallel ts-node -- ./src/**/*.spec.ts ./tests/**/*.spec.ts && npm run posttest", "test:pack": "bash -x scripts/npm-pack-testing.sh", "test:shell": "shellcheck bin/*.sh", - "test:unit": "TS_NODE_FILES=1 blue-tape -r ts-node/register \"src/**/*.spec.ts\" \"src/*.spec.ts\" \"tests/*.spec.ts\" \"tests/**/*.spec.ts\"", - "test:unit:retry": "npm run ts-node scripts/retry-unit-tests", + "test:unit": "blue-tape -r ts-node/register \"src/**/*.spec.ts\" \"src/*.spec.ts\" \"tests/*.spec.ts\" \"tests/**/*.spec.ts\"", + "test:unit:retry": "ts-node scripts/retry-unit-tests", "test:win32": "npm run test:unit:retry", "test:debug": "blue-tape -r ts-node/register src/puppet-web/bridge.spec.ts", "typedoc": "bash scripts/typedoc.sh", - "io-client": "npm run ts-node bin/io-client", - "demo": "npm run ts-node examples/ding-dong-bot.ts", + "io-client": "ts-node bin/io-client", + "demo": "ts-node examples/ding-dong-bot.ts", "start": "npm run demo" }, "repository": { diff --git a/src/config.ts b/src/config.ts index 4cae3a0a..4fe17022 100644 --- a/src/config.ts +++ b/src/config.ts @@ -16,6 +16,8 @@ * limitations under the License. * */ +/// + import fs from 'fs' import os from 'os' import path from 'path' diff --git a/src/puppet-wechat4u/index.ts b/src/puppet-wechat4u/index.ts index e008f9b7..0df16632 100644 --- a/src/puppet-wechat4u/index.ts +++ b/src/puppet-wechat4u/index.ts @@ -16,6 +16,8 @@ * limitations under the License. * */ +/// + import { PuppetWechat4u } from './puppet-wechat4u' export { -- GitLab