Get webpack build working

This commit is contained in:
Daniel Imms
2019-05-26 11:19:42 -07:00
parent 38afe991b2
commit 873f0de0ec
9 changed files with 20 additions and 17 deletions
+1
View File
@@ -2,6 +2,7 @@ node_modules/
*.swp *.swp
.lock-wscript .lock-wscript
lib/ lib/
out/
Makefile.gyp Makefile.gyp
*.Makefile *.Makefile
*.target.gyp.mk *.target.gyp.mk
+1 -4
View File
@@ -7,10 +7,7 @@
/// <reference path="../typings/xterm.d.ts"/> /// <reference path="../typings/xterm.d.ts"/>
const t = require('../lib2/xterm'); import { Terminal } from '../lib/xterm';
console.log(t);
import { Terminal } from '../lib2/xterm';
console.log('t2', Terminal);
import { AttachAddon } from 'xterm-addon-attach'; import { AttachAddon } from 'xterm-addon-attach';
import { SearchAddon, ISearchOptions } from 'xterm-addon-search'; import { SearchAddon, ISearchOptions } from 'xterm-addon-search';
import { WebLinksAddon } from 'xterm-addon-web-links'; import { WebLinksAddon } from 'xterm-addon-web-links';
+4 -4
View File
@@ -33,10 +33,10 @@ const clientConfig = {
resolve: { resolve: {
modules: [path.resolve(__dirname, '..'), 'node_modules'], modules: [path.resolve(__dirname, '..'), 'node_modules'],
extensions: [ '.tsx', '.ts', '.js' ], extensions: [ '.tsx', '.ts', '.js' ],
alias: { // alias: {
common: path.resolve(__dirname, '../lib/common'), // common: path.resolve(__dirname, '../lib/common'),
core: path.resolve(__dirname, '../lib/core') // core: path.resolve(__dirname, '../lib/core')
} // }
}, },
output: { output: {
filename: 'client-bundle.js', filename: 'client-bundle.js',
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "xterm", "name": "xterm",
"description": "Full xterm terminal, in your browser", "description": "Full xterm terminal, in your browser",
"version": "3.13.0", "version": "3.13.0",
"main": "lib/public/Terminal.js", "main": "lib/xterm.js",
"types": "typings/xterm.d.ts", "types": "typings/xterm.d.ts",
"repository": "https://github.com/xtermjs/xterm.js", "repository": "https://github.com/xtermjs/xterm.js",
"license": "MIT", "license": "MIT",
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"extends": "../tsconfig-library-base", "extends": "../tsconfig-library-base",
"compilerOptions": { "compilerOptions": {
"outDir": "../../lib", "outDir": "../../out",
"types": [ "types": [
"../../node_modules/@types/mocha" "../../node_modules/@types/mocha"
], ],
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"extends": "../tsconfig-library-base", "extends": "../tsconfig-library-base",
"compilerOptions": { "compilerOptions": {
"outDir": "../../lib", "outDir": "../../out",
"types": [ "types": [
"../../node_modules/@types/mocha" "../../node_modules/@types/mocha"
], ],
+1 -1
View File
@@ -10,7 +10,7 @@
"es2015.promise" "es2015.promise"
], ],
"rootDir": ".", "rootDir": ".",
"outDir": "../lib", "outDir": "../out",
"noUnusedLocals": true, "noUnusedLocals": true,
"noImplicitAny": true "noImplicitAny": true
+1 -1
View File
@@ -5,7 +5,7 @@
"dom", "dom",
"es5", "es5",
], ],
"outDir": "../../lib", "outDir": "../../out",
"types": [ "types": [
"../../node_modules/@types/mocha" "../../node_modules/@types/mocha"
] ]
+9 -4
View File
@@ -1,7 +1,12 @@
/**
* Copyright (c) 2019 The xterm.js authors. All rights reserved.
* @license MIT
*/
const path = require('path'); const path = require('path');
module.exports = { module.exports = {
entry: './lib/public/Terminal.js', entry: './out/public/Terminal.js',
devtool: 'inline-source-map', devtool: 'inline-source-map',
module: { module: {
rules: [ rules: [
@@ -17,13 +22,13 @@ module.exports = {
modules: ['./node_modules'], modules: ['./node_modules'],
extensions: [ '.js' ], extensions: [ '.js' ],
alias: { alias: {
common: path.resolve('./lib/common'), common: path.resolve('./out/common'),
core: path.resolve('./lib/core') core: path.resolve('./out/core')
} }
}, },
output: { output: {
filename: 'xterm.js', filename: 'xterm.js',
path: path.resolve('./lib2'), path: path.resolve('./lib'),
library: 'Terminal', library: 'Terminal',
libraryTarget: 'umd' libraryTarget: 'umd'
}, },