From 181ca7b34e731d9fcc573d2f84c6285b66130d27 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 4 Oct 2021 17:38:11 -0700 Subject: [PATCH] Create libraries directory --- .../web2d/test => libraries}/jquery-2.1.0.js | 0 .../test => libraries}/mootools-core-1.4.5.js | 0 packages/mindplot/webpack.playground.js | 74 +++++++++---------- packages/web2d/test/playground/workspace.html | 10 ++- packages/web2d/webpack.common.js | 1 + 5 files changed, 44 insertions(+), 41 deletions(-) rename {packages/web2d/test => libraries}/jquery-2.1.0.js (100%) rename {packages/web2d/test => libraries}/mootools-core-1.4.5.js (100%) diff --git a/packages/web2d/test/jquery-2.1.0.js b/libraries/jquery-2.1.0.js similarity index 100% rename from packages/web2d/test/jquery-2.1.0.js rename to libraries/jquery-2.1.0.js diff --git a/packages/web2d/test/mootools-core-1.4.5.js b/libraries/mootools-core-1.4.5.js similarity index 100% rename from packages/web2d/test/mootools-core-1.4.5.js rename to libraries/mootools-core-1.4.5.js diff --git a/packages/mindplot/webpack.playground.js b/packages/mindplot/webpack.playground.js index 34bfe7c9..423adb80 100644 --- a/packages/mindplot/webpack.playground.js +++ b/packages/mindplot/webpack.playground.js @@ -4,43 +4,43 @@ const HtmlWebpackPlugin = require('html-webpack-plugin'); /** @type {import('webpack').Configuration} */ module.exports = { - entry: { - layout: path.resolve(__dirname, './test/playground/context-loader'), + entry: { + layout: path.resolve(__dirname, './test/playground/context-loader'), + }, + output: { + path: path.resolve(__dirname, 'dist', 'test'), + filename: '[name].test.js', + publicPath: '', + }, + mode: 'production', + optimization: { + splitChunks: { + chunks: 'all', + minSize: 2000000, }, - output: { - path: path.resolve(__dirname, 'dist', 'test'), - filename: '[name].test.js', - publicPath: '', - }, - mode: 'production', - optimization: { - splitChunks: { - chunks: 'all', - minSize: 2000000, - }, - }, - devtool: 'source-map', - module: { - rules: [ - { - use: 'babel-loader', - test: /.(js|jsx)$/, - exclude: /node_modules/, - } - ], - }, - resolve: { - extensions: ['.js','.json'], - }, - plugins: [ - new CleanWebpackPlugin(), - new HtmlWebpackPlugin({ - template: 'test/playground/index.html', - }), - new HtmlWebpackPlugin({ - chunks: ['layout'], - filename: 'layout', - template: 'test/playground/layout.html', - }), + }, + devtool: 'source-map', + module: { + rules: [ + { + use: 'babel-loader', + test: /.js$/, + exclude: /node_modules/, + }, ], + }, + resolve: { + extensions: ['.js', '.json'], + }, + plugins: [ + new CleanWebpackPlugin(), + new HtmlWebpackPlugin({ + template: 'test/playground/index.html', + }), + new HtmlWebpackPlugin({ + chunks: ['layout'], + filename: 'layout', + template: 'test/playground/layout.html', + }), + ], }; diff --git a/packages/web2d/test/playground/workspace.html b/packages/web2d/test/playground/workspace.html index a15798c0..c7c19642 100755 --- a/packages/web2d/test/playground/workspace.html +++ b/packages/web2d/test/playground/workspace.html @@ -59,10 +59,12 @@ workspacePosition(); // Draw a reference grid. - var container = document.getElementById("sizeExampleContainer"); - var grid = new Grid(container, 35, 12); - grid.setPosition("0px", "0px") - grid.render(); + + // Enable when JS is loading ... + // var container = document.getElementById("sizeExampleContainer"); + // var grid = new Grid(container, 35, 12); + // grid.setPosition("0px", "0px") + // grid.render(); // Define a workspace using pixels and inchs. var workspacePixel = new web2d.Workspace(); diff --git a/packages/web2d/webpack.common.js b/packages/web2d/webpack.common.js index f4f93b0a..783f3fbc 100644 --- a/packages/web2d/webpack.common.js +++ b/packages/web2d/webpack.common.js @@ -23,4 +23,5 @@ module.exports = { extensions: ['.js', '.json'], }, plugins: [new CleanWebpackPlugin()], + };