Skip to content

Commit

Permalink
revert: drop gulp, introduce esbuild-runner for tasks (zwave-js#1855)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone authored Feb 23, 2021
1 parent 99e0d72 commit 0ecd923
Show file tree
Hide file tree
Showing 25 changed files with 1,256 additions and 405 deletions.
2 changes: 1 addition & 1 deletion .fimbullinter.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
config: .wotanrc.yaml
exclude:
- "**/*.d.ts"
#- "**/*.d.ts"
- "**/*.test.ts"
project: tsconfig.eslint.json
3 changes: 3 additions & 0 deletions .github/workflows/cc-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ jobs:
- name: Install dependencies
run: yarn install --prefer-offline --frozen-lockfile

- name: Compile TypeScript code
run: yarn run build

# The script will check if there are changes before updating the issue
- name: Update CC table
uses: ./.github/actions/gh-cc-table
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ jobs:
- name: Install dependencies
run: yarn install --prefer-offline --frozen-lockfile

- name: Compile TypeScript code
run: npx lerna run build

- name: Run linters
run: yarn run lint

Expand Down Expand Up @@ -116,6 +119,9 @@ jobs:
- name: Install dependencies
run: yarn install --prefer-offline --frozen-lockfile

- name: Compile TypeScript code
run: npx lerna run build

- name: Lint config files
run: yarn run lint:config

Expand Down Expand Up @@ -158,6 +164,10 @@ jobs:
- name: Install dependencies
run: yarn install --prefer-offline --frozen-lockfile

# Compilation is necessary, or the tests won't run
- name: Compile TypeScript code
run: yarn run build

- name: Run component tests
run: yarn run test:ci
env:
Expand Down Expand Up @@ -199,7 +209,7 @@ jobs:
- name: Install dependencies
run: yarn install --prefer-offline --frozen-lockfile

# Do a full build (includes a type check) and make sure that the package files are regenerated
# Do a full build so the package files are regenerated
- name: Compile TypeScript code
run: yarn run build:full

Expand Down Expand Up @@ -247,6 +257,10 @@ jobs:
- name: Install dependencies
run: yarn install --prefer-offline --frozen-lockfile

# Compilation is necessary, or the tests won't run
- name: Compile TypeScript code
run: yarn run build

- name: Generate coverage
run: yarn run coverage:ci
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/zwave-js-bot_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,10 @@ jobs:
if: steps.check-permissions.outputs.result == 'true'
run: yarn install --prefer-offline --frozen-lockfile

# - name: Compile TypeScript code
# if: steps.check-permissions.outputs.result == 'true'
# # We need this or the linter will complain about other stuff than the checks
# run: yarn run build
- name: Compile TypeScript code
if: steps.check-permissions.outputs.result == 'true'
# We need this or the linter will complain about other stuff than the checks
run: yarn run build

- name: Get config file ID
if: steps.check-permissions.outputs.result == 'true'
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"ts-node/register/transpile-only",
"-r",
"tsconfig-paths/register",
"${workspaceFolder}/packages/maintenance/src/generateTypedDocs.ts"
"${workspaceFolder}/maintenance/generateTypedDocs.ts"
],
"console": "integratedTerminal",
"skipFiles": ["<node_internals>/**"],
Expand Down
9 changes: 7 additions & 2 deletions maintenance/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@
"module": "commonjs",
"moduleResolution": "node",
// "noImplicitAny": true,
"lib": ["ES2020"],
"lib": [
"ES2020"
],
"target": "es2015",
"rootDir": "../",
"newLine": "lf"
},
"include": ["*.ts", "../packages/*/src/**/*.ts"]
"include": [
"*.ts",
"../packages/*/src/**/*.ts"
]
}
23 changes: 13 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
"@fimbul/mithotyn": "^0.21.0",
"@fimbul/wotan": "^0.22.0",
"@types/fs-extra": "^9.0.1",
"@types/gulp": "^4.0.7",
"@types/gulp-sourcemaps": "0.0.32",
"@types/jest": "^26.0.14",
"@types/js-levenshtein": "^1.1.0",
"@types/json-logic-js": "^1.2.1",
Expand All @@ -67,11 +69,12 @@
"commitizen": "^4.1.5",
"coveralls": "^3.1.0",
"cz-conventional-changelog": "^3.2.0",
"esbuild": "^0.8.49",
"esbuild-runner": "^1.3.2",
"eslint": "^7.10.0",
"eslint-config-prettier": "^6.12.0",
"eslint-plugin-prettier": "^3.1.4",
"gulp": "^4.0.2",
"gulp-sourcemaps": "^2.6.5",
"gulp-typescript": "^6.0.0-alpha.1",
"husky": "^4.3.0",
"jest": "^26.4.2",
"jest-circus": "^26.4.2",
Expand All @@ -85,7 +88,7 @@
"semver": "^7.3.2",
"supports-color": "^7.2.0",
"ts-morph": "^9.1.0",
"ts-node": "^9.1.1",
"ts-node": "^9.0.0",
"ts-pegjs": "^0.3.1",
"tsconfig-paths": "^3.9.0",
"typescript": "^4.1.3",
Expand All @@ -106,24 +109,24 @@
"show-coverage": "yarn run coverage && start ./coverage/index.html",
"lint:ts": "eslint --ext .ts \"packages/*/src/**/*.ts\"",
"lint:wotan": "wotan",
"lint:config": "esr packages/config/maintenance/lintConfigFiles.ts",
"lint:config": "lerna exec --scope=@zwave-js/config -- gulp lintConfigFiles",
"lint:configjson": "prettier -c \"packages/config/config/**/*.json\"",
"lint:zwave": "esr packages/zwave-js/maintenance/lintAll.ts",
"lint:zwave": "lerna exec --scope=zwave-js -- gulp lint",
"lint": "yarn run lint:wotan && yarn run lint:ts && yarn run lint:configjson",
"implemented_ccs": "esr packages/maintenance/src/implementedCCs.ts",
"implemented_ccs": "ts-node packages/maintenance/src/implementedCCs.ts",
"gh-cc-table": "yarn run implemented_ccs -- --flavor=github --only-incomplete",
"toLogEntryOverview": "esr packages/zwave-js/maintenance/checkCCToLogEntry.ts",
"toLogEntryOverview": "ts-node packages/zwave-js/maintenance/checkCCToLogEntry.ts",
"usbdebug": "cmd.exe /c \"test\\usbdebug.bat\"",
"commit": "git-cz",
"release": "yarn run build && lerna version --no-commit-hooks",
"preversion": "release-script --lerna-check",
"version": "yarn install && release-script --lerna",
"postversion": "git push && git push --tags",
"config": "esr packages/config/maintenance/importConfig.ts",
"config": "ts-node packages/config/maintenance/importConfig.ts",
"docs": "docsify serve docs",
"docs:generate": "ts-node -P packages/maintenance/tsconfig.json packages/maintenance/src/generateTypedDocs.ts",
"test:perf": "esr test/valuedb-perf.ts",
"test:firmware": "esr test/firmware-extraction.ts"
"test:perf": "ts-node test/valuedb-perf.ts",
"test:firmware": "ts-node test/firmware-extraction.ts"
},
"readme": "README.md",
"husky": {
Expand Down
1 change: 1 addition & 0 deletions packages/config/gulpfile.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { lintConfigFiles } from "./maintenance/lintConfigFiles";
3 changes: 3 additions & 0 deletions packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,8 @@
"build": "tsc -b tsconfig.build.json",
"clean": "tsc -b tsconfig.build.json --clean",
"watch": "yarn run build -- --watch --pretty"
},
"devDependencies": {
"@zwave-js/maintenance": "^6.4.0"
}
}
14 changes: 9 additions & 5 deletions packages/config/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@
{
"path": "../core/tsconfig.build.json"
},
{
"path": "../maintenance/tsconfig.build.json"
},
{
"path": "../shared/tsconfig.build.json"
}
],
"include": ["maintenance/**/*.ts", "src/**/*.ts"],
"exclude": ["build/**", "node_modules/**"]
"include": [
"gulpfile.ts",
"maintenance/**/*.ts",
"src/**/*.ts"
],
"exclude": [
"build/**",
"node_modules/**"
]
}
Loading

0 comments on commit 0ecd923

Please sign in to comment.