From 63f8ad75557bb7f304cd6afcf6809b83253151cd Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Thu, 2 Dec 2021 12:52:49 -0800 Subject: [PATCH] Remove webcomponent module, it must be part of mindplot. --- packages/webcomponent/.gitignore | 3 -- packages/webcomponent/README.md | 11 ---- .../__tests__/webcomponent.test.js | 7 --- packages/webcomponent/package.json | 50 ------------------- packages/webcomponent/public/index.html | 11 ---- packages/webcomponent/src/App.tsx | 10 ---- packages/webcomponent/src/index.tsx | 6 --- packages/webcomponent/tsconfig.json | 16 ------ packages/webcomponent/webpack.common.js | 40 --------------- packages/webcomponent/webpack.dev.js | 20 -------- packages/webcomponent/webpack.prod.js | 16 ------ 11 files changed, 190 deletions(-) delete mode 100644 packages/webcomponent/.gitignore delete mode 100644 packages/webcomponent/README.md delete mode 100644 packages/webcomponent/__tests__/webcomponent.test.js delete mode 100644 packages/webcomponent/package.json delete mode 100644 packages/webcomponent/public/index.html delete mode 100644 packages/webcomponent/src/App.tsx delete mode 100644 packages/webcomponent/src/index.tsx delete mode 100644 packages/webcomponent/tsconfig.json delete mode 100644 packages/webcomponent/webpack.common.js delete mode 100644 packages/webcomponent/webpack.dev.js delete mode 100644 packages/webcomponent/webpack.prod.js diff --git a/packages/webcomponent/.gitignore b/packages/webcomponent/.gitignore deleted file mode 100644 index b7433c5b..00000000 --- a/packages/webcomponent/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -lib/ -node_module/ - diff --git a/packages/webcomponent/README.md b/packages/webcomponent/README.md deleted file mode 100644 index c2f77052..00000000 --- a/packages/webcomponent/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# `webcomponent` - -> TODO: description - -## Usage - -``` -import webcomponent from 'webcomponent'; - -// TODO: DEMONSTRATE API -``` diff --git a/packages/webcomponent/__tests__/webcomponent.test.js b/packages/webcomponent/__tests__/webcomponent.test.js deleted file mode 100644 index 3476b0f2..00000000 --- a/packages/webcomponent/__tests__/webcomponent.test.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -import webcomponent from '..'; - -describe('webcomponent', () => { - it('needs tests'); -}); diff --git a/packages/webcomponent/package.json b/packages/webcomponent/package.json deleted file mode 100644 index b8934f53..00000000 --- a/packages/webcomponent/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "@wisemapping/webcomponent", - "version": "0.0.1", - "description": "webcomponent Wisemapping", - "author": "Ezequiel-Vega ", - "homepage": "https://www.wisemapping.com", - "license": "MIT", - "main": "dist/webcomponent.js", - "private": false, - "directories": { - "lib": "lib", - "test": "__tests__" - }, - "files": [ - "lib" - ], - "publishConfig": { - "registry": "https://registry.yarnpkg.com" - }, - "repository": { - "type": "git", - "url": "git@bitbucket.org:wisemapping/wisemapping-frontend.git" - }, - "scripts": { - "start": "webpack serve --config webpack.dev.js", - "build": "webpack --config webpack.prod.js" - }, - "devDependencies": { - "@typescript-eslint/eslint-plugin": "^4.31.0", - "@typescript-eslint/parser": "^4.31.0", - "babel-loader": "^8.2.2", - "clean-webpack-plugin": "^4.0.0", - "html-webpack-plugin": "^5.3.2", - "prettier": "^2.3.2", - "ts-loader": "^9.2.5", - "typescript": "^4.4.2", - "webpack": "^5.52.0", - "webpack-cli": "^4.8.0", - "webpack-merge": "^5.8.0", - "webpack-server": "^0.1.2" - }, - "dependencies": { - "@wisemapping/mindplot": "^0.0.1", - "@wisemapping/core-js": "^0.0.1", - "@wisemapping/web2d": "^0.0.1", - "mootools": "1.4.5", - "react": "^17.0.2", - "react-dom": "^17.0.2" - } -} \ No newline at end of file diff --git a/packages/webcomponent/public/index.html b/packages/webcomponent/public/index.html deleted file mode 100644 index b5c89d63..00000000 --- a/packages/webcomponent/public/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - Document - - -
- - diff --git a/packages/webcomponent/src/App.tsx b/packages/webcomponent/src/App.tsx deleted file mode 100644 index bb640096..00000000 --- a/packages/webcomponent/src/App.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react'; -import Mindplot from '@wisemapping/web2d'; - -const App = (): React.ReactElement => { - const mindplot = Mindplot(); - console.log(mindplot); - return
Webcomponent
; -}; - -export default App; diff --git a/packages/webcomponent/src/index.tsx b/packages/webcomponent/src/index.tsx deleted file mode 100644 index ecb5952b..00000000 --- a/packages/webcomponent/src/index.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; -import App from './App'; -import 'mootools'; - -ReactDOM.render(, document.getElementById('root')); diff --git a/packages/webcomponent/tsconfig.json b/packages/webcomponent/tsconfig.json deleted file mode 100644 index 02973338..00000000 --- a/packages/webcomponent/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "compilerOptions": { - "outDir": "./lib/", - "sourceMap": true, - "noImplicitAny": false, - "types": ["node"], - "moduleResolution": "node", - "module": "es6", - "target": "es6", - "jsx": "react", - "allowJs": true, - "esModuleInterop": true - }, - "include": ["./src/**/*"], - "exclude": ["node_modules"] -} diff --git a/packages/webcomponent/webpack.common.js b/packages/webcomponent/webpack.common.js deleted file mode 100644 index ba433bac..00000000 --- a/packages/webcomponent/webpack.common.js +++ /dev/null @@ -1,40 +0,0 @@ -const path = require('path'); -const HtmlWebpackPlugin = require('html-webpack-plugin'); -const { CleanWebpackPlugin } = require('clean-webpack-plugin'); - -/** @type {import('webpack').Configuration} */ -module.exports = { - entry: './src/index.tsx', - output: { - path: path.resolve(__dirname, 'lib'), - filename: 'webcomponent.js', - publicPath: '/', - }, - module: { - rules: [ - { - use: 'babel-loader', - test: /.(js|jsx)$/, - exclude: /node_modules/, - }, - { - use: 'ts-loader', - test: /\.(ts|tsx)$/, - exclude: /node_modules/, - }, - { - type: 'asset', - test: /\.(png|svg|jpg|jpeg|gif)$/i, - }, - ], - }, - resolve: { - extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'], - }, - plugins: [ - new CleanWebpackPlugin(), - new HtmlWebpackPlugin({ - template: './public/index.html', - }), - ], -}; diff --git a/packages/webcomponent/webpack.dev.js b/packages/webcomponent/webpack.dev.js deleted file mode 100644 index 2a6fd051..00000000 --- a/packages/webcomponent/webpack.dev.js +++ /dev/null @@ -1,20 +0,0 @@ -const path = require('path'); -const { HotModuleReplacementPlugin } = require('webpack'); -const { merge } = require('webpack-merge'); -const common = require('./webpack.common'); - -/** @type {import('webpack').Configuration} */ -const devConfig = { - mode: 'development', - devServer: { - contentBase: path.join(__dirname, 'lib'), - compress: true, - port: 8080, - hot: true, - }, - target: 'web', - plugins: [new HotModuleReplacementPlugin()], - devtool: 'eval-source-map', -}; - -module.exports = merge(common, devConfig); diff --git a/packages/webcomponent/webpack.prod.js b/packages/webcomponent/webpack.prod.js deleted file mode 100644 index 7029919d..00000000 --- a/packages/webcomponent/webpack.prod.js +++ /dev/null @@ -1,16 +0,0 @@ -const { merge } = require('webpack-merge'); -const common = require('./webpack.common'); - -/** @type {import('webpack').Configuration} */ -const prodConfig = { - mode: 'production', - devtool: 'source-map', - optimization: { - splitChunks: { - chunks: 'all', - minSize: 3000000, - }, - }, -}; - -module.exports = merge(common, prodConfig);