Skip to content

Commit

Permalink
Merge pull request #52 from kieler/jep/build
Browse files Browse the repository at this point in the history
fixing yarn package
  • Loading branch information
Drakae authored Jan 6, 2025
2 parents 1bc9aa9 + d484a38 commit 52827d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions extension/build-util/prepare-extension-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as fs from 'node:fs';

var data = fs.readFileSync('package.json', 'utf-8');
var newValue = data.replace('"main": "./pack/src/extension.cjs"', '"main": "./pack/src/extension.js"');
fs.writeFileSync('package.json', newValue, 'utf-8');

console.log('Bad magic');
4 changes: 2 additions & 2 deletions extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@
"src-webview",
"pack"
],
"main": "./pack/src/extension.js",
"main": "./pack/src/extension.cjs",
"dependencies": {
"langium": "^3.0.0",
"langium-sprotty": "^3.0.0",
Expand Down Expand Up @@ -586,7 +586,7 @@
"lint": "eslint .",
"build": "yarn run langium:generate && tsc -b src src-diagram-snippets src-language-server src-webview src-context-table && node esbuild.mjs",
"watch": "webpack --watch",
"package": "vsce package --yarn -o pasta.vsix",
"package": "node build-util/prepare-extension-config.js && vsce package --yarn -o pasta.vsix",
"predistribute": "yarn run package",
"distribute": "yarn run distribute:vsce && yarn run distribute:ovsx",
"distribute:vsce": "vsce publish --yarn --packagePath pasta.vsix",
Expand Down

0 comments on commit 52827d6

Please sign in to comment.