allow starting commands in new tabs via CLI (fixes #304)

This commit is contained in:
Eugene Pankov
2018-08-26 17:35:04 +02:00
parent 3f8f87a141
commit 6cc20c3719
23 changed files with 1006 additions and 411 deletions

View File

@@ -0,0 +1,49 @@
const path = require('path')
const webpack = require('webpack')
module.exports = {
name: 'terminus-main',
target: 'node',
entry: {
main: path.resolve(__dirname, 'lib/index.js'),
},
mode: process.env.DEV ? 'development' : 'production',
context: __dirname,
devtool: 'source-map',
output: {
path: path.join(__dirname, 'dist'),
pathinfo: true,
filename: '[name].js',
},
resolve: {
modules: ['lib/', 'node_modules', '../node_modules'].map(x => path.join(__dirname, x)),
extensions: ['.ts', '.js'],
},
module: {
rules: [
{
test: /lib[\\/].*\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['babel-preset-es2015'],
},
},
},
],
},
externals: {
electron: 'commonjs electron',
'electron-config': 'commonjs electron-config',
'electron-vibrancy': 'commonjs electron-vibrancy',
'electron-squirrel-startup': 'commonjs electron-squirrel-startup',
fs: 'commonjs fs',
mz: 'commonjs mz',
path: 'commonjs path',
yargs: 'commonjs yargs',
},
plugins: [
new webpack.optimize.ModuleConcatenationPlugin(),
],
}