Skip to content

Commit

Permalink
Fix: switch to typescript build
Browse files Browse the repository at this point in the history
  • Loading branch information
gliviu committed Mar 10, 2021
1 parent 0d23e07 commit 9fcc08a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
"build/src"
],
"scripts": {
"prepublishOnly": "npm run clean && npm run build",
"clean": "rm -rf build && rm -rf .nyc_output && rm -rf coverage",
"copydeps": "copyfiles \"test/expected/**\" test/testdir.tar \"test/extended/res/**\" build",
"build": "tsc && npm run copydeps",
"build": "tsc && npm run lint && npm run copydeps",
"lint": "eslint ./src ./test --ext .ts,.js",
"pretest": "npm install && npm run build",
"test": "node build/test/runTests.js",
Expand Down
5 changes: 2 additions & 3 deletions test/runTests.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { getTests, Test } from "./tests"
import pjson from '../package.json'
import colors from 'colors/safe'
import util from 'util'
import fs from 'fs'
Expand Down Expand Up @@ -228,8 +227,8 @@ function initReport(saveReport) {
if (fs.existsSync(REPORT_FILE)) {
fs.unlinkSync(REPORT_FILE)
}
fs.appendFileSync(REPORT_FILE, util.format('Date: %s, Node version: %s. OS platform: %s, OS release: %s, dir-compare version: %s\n',
new Date(), process.version, os.platform(), os.release(), pjson.version))
fs.appendFileSync(REPORT_FILE, util.format('Date: %s, Node version: %s. OS platform: %s, OS release: %s\n',
new Date(), process.version, os.platform(), os.release()))
}
}

Expand Down
2 changes: 0 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"sourceMap": true,
"strictNullChecks": true,
"allowJs": true,
"resolveJsonModule": true,
"declaration": true,
"composite": true,
"declarationMap": true,
Expand All @@ -18,7 +17,6 @@
"include": [
"**/*.ts",
"**/*.js",
"package.json"
],
"exclude": [
"build",
Expand Down

0 comments on commit 9fcc08a

Please sign in to comment.