Improve headless packaging

This commit is contained in:
Daniel Imms
2021-08-10 12:57:45 -07:00
parent 4a200e59ac
commit 15bd827c2e
5 changed files with 4 additions and 3 deletions
-1
View File
@@ -2,7 +2,6 @@ node_modules/
*.swp *.swp
.lock-wscript .lock-wscript
lib/ lib/
lib-headless/
out/ out/
out-test/ out-test/
.nyc_output/ .nyc_output/
+1 -1
View File
@@ -16,7 +16,7 @@ const xtermHeadlessPackageJson = {
...xtermPackageJson, ...xtermPackageJson,
name: 'xterm-headless', name: 'xterm-headless',
description: 'A headless terminal component that runs in Node.js', description: 'A headless terminal component that runs in Node.js',
main: 'lib/xterm-headless.js', main: 'lib-headless/xterm-headless.js',
types: 'typings/xterm-headless.d.ts', types: 'typings/xterm-headless.d.ts',
}; };
delete xtermHeadlessPackageJson['scripts']; delete xtermHeadlessPackageJson['scripts'];
+1
View File
@@ -1,2 +1,3 @@
lib-headless/
typings/ typings/
package.json package.json
+1
View File
@@ -11,6 +11,7 @@
"prepackage": "npm run build", "prepackage": "npm run build",
"package": "webpack", "package": "webpack",
"package-headless": "webpack --config ./webpack.config.headless.js", "package-headless": "webpack --config ./webpack.config.headless.js",
"postpackage-headless": "node ./bin/package_headless.js",
"compile": "tsc -b ./src/common/public/tsconfig.json", "compile": "tsc -b ./src/common/public/tsconfig.json",
"start": "node demo/start", "start": "node demo/start",
"start-debug": "node --inspect-brk demo/start", "start-debug": "node --inspect-brk demo/start",
+1 -1
View File
@@ -34,7 +34,7 @@ module.exports = {
}, },
output: { output: {
filename: 'xterm.js', filename: 'xterm.js',
path: path.resolve('./lib-headless'), path: path.resolve('./headless/lib-headless'),
library: { library: {
type: 'commonjs' type: 'commonjs'
} }