~tim/termy

a97a44aca4a4980a8fe33455745831226df96c15 — Tim Morgan 2 years ago ad15eb0
Fix building of assets for vi
4 files changed, 16 insertions(+), 12 deletions(-)

M .gitignore
M js/shell/resolver.js
M public/index.html
M webpack.config.js
M .gitignore => .gitignore +1 -1
@@ 1,2 1,2 @@
node_modules
public/dist
public/js

M js/shell/resolver.js => js/shell/resolver.js +2 -0
@@ 2,6 2,8 @@ import * as Builtins from './builtins.js'
import { expandPath } from './utils.js'
import Program from '../program.js'

window.Program = Program // needed for some reason because webpack?

class Resolver {
  constructor(command, session) {
    this.name = command[0]

M public/index.html => public/index.html +6 -6
@@ 2,11 2,11 @@
<html>
  <head>
    <meta charset='utf-8'>
    <link rel="stylesheet" href="dist/xterm.css" />
    <script src="dist/xterm.js"></script>
    <script src="dist/addons/fit/fit.js"></script>
    <script src="dist/browserfs.js"></script>
    <script src="dist/rope.js"></script>
    <link rel="stylesheet" href="js/xterm.css" />
    <script src="js/xterm.js"></script>
    <script src="js/addons/fit/fit.js"></script>
    <script src="js/browserfs.js"></script>
    <script src="js/rope.js"></script>
    <style>
      html, body { height: 100%; margin: 0; padding: 0; }
      #terminal { height: calc(100% - 20px); padding: 10px; background-color: black; }


@@ 14,6 14,6 @@
  </head>
  <body>
    <div id="terminal"></div>
    <script src="dist/termy.js"></script>
    <script src="js/termy.js"></script>
  </body>
</html>

M webpack.config.js => webpack.config.js +7 -5
@@ 5,12 5,12 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');

module.exports = {
    entry: {
        main: path.resolve('./termy.js')
        'termy': path.resolve('./termy.js')
    },

    output: {
        filename: 'termy.js',
        path: path.resolve('./public/dist')
        filename: '[name].js',
        path: path.resolve('./public/js')
    },

    module: {


@@ 28,10 28,12 @@ module.exports = {
        { from: 'node_modules/xterm/dist/xterm.css' },
        { from: 'node_modules/xterm/dist/xterm.js' },
        { from: 'node_modules/xterm/dist/addons/fit/fit.js',
          to: path.resolve('./public/dist/addons/fit/fit.js') },
          to: path.resolve('./public/js/addons/fit/fit.js') },
        { from: 'node_modules/browserfs/dist/browserfs.js' },
        { from: 'js/vendor/rope.js',
          to: path.resolve('./public/dist/rope.js') }
          to: path.resolve('./public/js/rope.js') },
        { from: 'js/bin/*',
          to: path.resolve('./public/js/bin/[name].[ext]') }
      ])
    ]
};