From 75ee4529c4ab0e6a00f31470f9e07ecbc51675cb Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sat, 2 Oct 2021 19:52:56 -0700 Subject: [PATCH] Clean up code --- packages/core-js/README.md | 22 -- packages/core-js/package.json | 2 - packages/core-js/webpack.common.js | 18 +- packages/core-js/webpack.dev.js | 8 +- packages/core-js/webpack.prod.js | 1 - .../web2d/test/jsUnit/ElementsTestSuite.html | 286 ------------------ .../web2d/test/jsUnit/WorkspaceTestSuite.html | 135 --------- 7 files changed, 7 insertions(+), 465 deletions(-) delete mode 100755 packages/web2d/test/jsUnit/ElementsTestSuite.html delete mode 100755 packages/web2d/test/jsUnit/WorkspaceTestSuite.html diff --git a/packages/core-js/README.md b/packages/core-js/README.md index d0e8e9f5..194e9eba 100644 --- a/packages/core-js/README.md +++ b/packages/core-js/README.md @@ -2,28 +2,6 @@ Core-JS defines custom functions for the **Wisemapping** ecosystem. -## Quick Start - -1. Clone repository with the next command: - -``` -git clone https://[username]@bitbucket.org/wisemapping/wisemapping-frontend.git -``` - -where the variable _username_ is you username of Bitbucket. - -_Note:The project is configured to use the yarn dependency manager_ - -2. Move to folder core-js - -``` -cd packages/core-js -``` - -3. Now you need install all dependence, this is done with command `yarn install` - -4. To start the development enviroment you have to use command `yarn start`. - ## Production To build up the package core-js and use in production, you have to use command `yarn build` diff --git a/packages/core-js/package.json b/packages/core-js/package.json index 379b04b9..7695727f 100644 --- a/packages/core-js/package.json +++ b/packages/core-js/package.json @@ -28,10 +28,8 @@ "babel-loader": "^8.2.2", "clean-webpack-plugin": "^4.0.0-alpha.0", "core-js": "^3.15.2", - "html-webpack-plugin": "^5.3.2", "webpack": "^5.44.0", "webpack-cli": "^4.7.2", - "webpack-dev-server": "^3.11.2", "webpack-merge": "^5.8.0" }, "dependencies": { diff --git a/packages/core-js/webpack.common.js b/packages/core-js/webpack.common.js index 198312b9..9fc5bf47 100644 --- a/packages/core-js/webpack.common.js +++ b/packages/core-js/webpack.common.js @@ -1,12 +1,10 @@ -const path = require('path'); // eslint-disable-line -const { CleanWebpackPlugin } = require('clean-webpack-plugin'); // eslint-disable-line +const path = require('path'); +const { CleanWebpackPlugin } = require('clean-webpack-plugin'); -/** @type {import('webpack').Configuration} */ module.exports = { - // eslint-disable-line entry: './lib/core.js', output: { - path: path.resolve(__dirname, 'dist'), // eslint-disable-line + path: path.resolve(__dirname, 'dist'), filename: 'core.js', publicPath: '', }, @@ -14,17 +12,13 @@ module.exports = { rules: [ { use: 'babel-loader', - test: /.(js|jsx)$/, + test: /.js$/, exclude: /node_modules/, - }, - { - type: 'asset', - test: /\.(png|svg|jpg|jpeg|gif)$/i, - }, + } ], }, resolve: { - extensions: ['.js', '.jsx', '.json'], + extensions: ['.js'], }, plugins: [new CleanWebpackPlugin()], }; diff --git a/packages/core-js/webpack.dev.js b/packages/core-js/webpack.dev.js index 90b62cf1..69bbd6d3 100644 --- a/packages/core-js/webpack.dev.js +++ b/packages/core-js/webpack.dev.js @@ -2,17 +2,11 @@ const { HotModuleReplacementPlugin } = require('webpack'); const { merge } = require('webpack-merge'); const common = require('./webpack.common'); -/** @type {import('webpack').Configuration} */ const devConfig = { mode: 'development', target: 'web', plugins: [new HotModuleReplacementPlugin()], - devtool: 'eval-source-map', - devServer: { - port: 8080, - open: 'google-chrome-stable', - hot: true, - }, + devtool: 'eval-source-map' }; module.exports = merge(common, devConfig); diff --git a/packages/core-js/webpack.prod.js b/packages/core-js/webpack.prod.js index 0462e9b7..b9f51a89 100644 --- a/packages/core-js/webpack.prod.js +++ b/packages/core-js/webpack.prod.js @@ -1,7 +1,6 @@ const { merge } = require('webpack-merge'); const common = require('./webpack.common'); -/** @type {import('webpack').Configuration} */ const prodConfig = { mode: 'production', devtool: 'source-map', diff --git a/packages/web2d/test/jsUnit/ElementsTestSuite.html b/packages/web2d/test/jsUnit/ElementsTestSuite.html deleted file mode 100755 index b6fb9843..00000000 --- a/packages/web2d/test/jsUnit/ElementsTestSuite.html +++ /dev/null @@ -1,286 +0,0 @@ - - - - - - JsUnit Test Suite - - - - - - - -

JsUnit Test Suite

- -

This page contains a suite of tests for testing JsUnit. Click here to - start running the test

- -
-
- - - - - - - - diff --git a/packages/web2d/test/jsUnit/WorkspaceTestSuite.html b/packages/web2d/test/jsUnit/WorkspaceTestSuite.html deleted file mode 100755 index 5c6bd708..00000000 --- a/packages/web2d/test/jsUnit/WorkspaceTestSuite.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - JsUnit Test Suite - - - - - - - - -

JsUnit Test Suite

- -

This page contains a suite of tests for testing JsUnit. Click here to - start running the test

- -
-
- - - - - - - -