Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: migrate gulp + esbuild to rollup #458

Merged
merged 4 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
# Github
.github/**

# Build
gulpfile.js

# Test
test/**
out/test/**
Expand Down
91 changes: 0 additions & 91 deletions gulpfile.ts

This file was deleted.

27 changes: 12 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,18 @@
"main": "./dist/extension.js",
"l10n": "./l10n",
"scripts": {
"build": "gulp build",
"build": "yarn clean && yarn convert && rollup -c rollup.config.ts --configPlugin @rollup/plugin-typescript",
"lint": "eslint src --ext ts",
"watch": "gulp watch",
"watch": "yarn run build --watch",
"format": "prettier --write .",
"clean": "gulp clean",
"clean": "rimraf --glob 'dist/' 'package.nls.*.json' 'l10n/*.json' 'cactbot-highlight*.vsix'",
"convert": "js-yaml syntaxes/timeline.tmLanguage.yaml > syntaxes/timeline.tmLanguage.json",
"toc": "md-magic --path \"*.md\"",
"pretest": "yarn run build && yarn run tsc -p tsconfig.test.json",
"pretest": "yarn run build --sourcemap && yarn run tsc -p tsconfig.test.json",
"tsc:noEmit": "tsc --noEmit",
"test": "node ./out/runTest.js",
"package": "gulp package",
"prepack": "yarn port-i18n && yarn crowdin:pull",
"package": "vsce package --yarn",
"prepack": "yarn port-i18n && yarn crowdin:pull && yarn build --minify",
"********* MANAGE I18N FILES **********": "",
"port-i18n": "vscode-l10n-dev export --outDir ./l10n ./src",
"crowdin:pull": "crowdin download",
Expand Down Expand Up @@ -146,10 +147,10 @@
},
"devDependencies": {
"@crowdin/cli": "^3.13.0",
"@types/event-stream": "^4.0.5",
"@rollup/plugin-commonjs": "^25.0.8",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"@types/glob": "^8.0.1",
"@types/gulp": "^4.0.10",
"@types/gulp-babel": "^6.1.31",
"@types/js-yaml": "^4.0.5",
"@types/mocha": "^10.0.1",
"@types/node": "18.15.11",
Expand All @@ -158,22 +159,18 @@
"@typescript-eslint/parser": "^7.11.0",
"@vscode/l10n-dev": "^0.0.35",
"@vscode/test-electron": "^2.3.10",
"del": "^7.0.0",
"eslint": "<9",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"event-stream": "^4.0.1",
"glob": "^10.3.12",
"gulp": "^5.0.0",
"gulp-cli": "^3.0.0",
"gulp-esbuild": "^0.11.2",
"js-yaml": "^4.1.0",
"markdown-magic": "^2.6.1",
"mocha": "^10.4.0",
"prettier": "^3.0.0",
"rimraf": "^5.0.7",
"rollup": "^4.18.0",
"ts-node": "^10.9.1",
"tsimportlib": "^0.0.5",
"vsce": "^2.15.0"
},
"dependencies": {
Expand Down
15 changes: 15 additions & 0 deletions rollup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import commonjs from '@rollup/plugin-commonjs'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import typescript from '@rollup/plugin-typescript'
import { defineConfig } from 'rollup'

export default defineConfig({
input: './src/extension.ts',
output: {
dir: 'dist',
format: 'cjs',
},
external: ['vscode', 'fsevents'],
treeshake: true,
plugins: [nodeResolve(), commonjs(), typescript()],
})
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"baseUrl": ".",
"module": "commonjs",
"module": "ESNext",
"moduleResolution": "node",
"target": "es2019",
"outDir": "dist",
Expand Down
Loading
Loading