mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-02-11 14:20:07 +08:00
Merge from develop
This commit is contained in:
commit
1ab2562e39
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@octokit-request-npm-5.4.10-83526a8370-3ff3e9c7bb.zip
vendored
Normal file
BIN
.yarn/cache/@octokit-request-npm-5.4.10-83526a8370-3ff3e9c7bb.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@types-babel__core-npm-7.1.12-0093691d63-e2642b77b8.zip
vendored
Normal file
BIN
.yarn/cache/@types-babel__core-npm-7.1.12-0093691d63-e2642b77b8.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/aws4-npm-1.11.0-283476ad94-d30dce2b73.zip
vendored
Normal file
BIN
.yarn/cache/aws4-npm-1.11.0-283476ad94-d30dce2b73.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/call-bind-npm-1.0.0-6bb7f0ff8b-aeb82f8f5d.zip
vendored
Normal file
BIN
.yarn/cache/call-bind-npm-1.0.0-6bb7f0ff8b-aeb82f8f5d.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/electron-to-chromium-npm-1.3.586-e0ddd2d533-3c680e665a.zip
vendored
Normal file
BIN
.yarn/cache/electron-to-chromium-npm-1.3.586-e0ddd2d533-3c680e665a.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/get-intrinsic-npm-1.0.1-8cfb9e0955-c38bc558f1.zip
vendored
Normal file
BIN
.yarn/cache/get-intrinsic-npm-1.0.1-8cfb9e0955-c38bc558f1.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/hast-util-parse-selector-npm-2.2.5-cd773533ea-a9f5dc8f7d.zip
vendored
Normal file
BIN
.yarn/cache/hast-util-parse-selector-npm-2.2.5-cd773533ea-a9f5dc8f7d.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/object.assign-npm-4.1.2-d52edada1c-a5855cc6db.zip
vendored
Normal file
BIN
.yarn/cache/object.assign-npm-4.1.2-d52edada1c-a5855cc6db.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/react-side-effect-npm-2.1.1-52222d7f8f-5896f7c126.zip
vendored
Normal file
BIN
.yarn/cache/react-side-effect-npm-2.1.1-52222d7f8f-5896f7c126.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/react-syntax-highlighter-npm-15.3.0-0a74e2bc36-07a40895ee.zip
vendored
Normal file
BIN
.yarn/cache/react-syntax-highlighter-npm-15.3.0-0a74e2bc36-07a40895ee.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/regenerate-npm-1.4.2-b296c5b63a-54275a99ef.zip
vendored
Normal file
BIN
.yarn/cache/regenerate-npm-1.4.2-b296c5b63a-54275a99ef.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -28,7 +28,6 @@
|
||||
"scripts": {
|
||||
"build": "babel src --copy-files --out-dir dist",
|
||||
"clean": "rm -rf dist",
|
||||
"dev": "webpack serve",
|
||||
"npm-publish": "npm publish --access public",
|
||||
"prepare": "yarn build",
|
||||
"prepublishOnly": "yarn build",
|
||||
@ -61,7 +60,7 @@
|
||||
"enzyme-to-json": "3.6.1",
|
||||
"html-webpack-plugin": "4.5.0",
|
||||
"identity-obj-proxy": "3.0.0",
|
||||
"jest": "26.6.1",
|
||||
"jest": "26.6.2",
|
||||
"js-yaml": "3.14.0",
|
||||
"path-browserify": "1.0.1",
|
||||
"process": "0.11.10",
|
||||
|
@ -31,8 +31,8 @@
|
||||
"npm-publish": "npm publish --access public",
|
||||
"prepare": "yarn build",
|
||||
"prepublishOnly": "yarn build",
|
||||
"serve": "serve dist -p 3002",
|
||||
"start": "webpack serve --config webpack.dev.js",
|
||||
"start": "webpack serve --config webpack.demo.js",
|
||||
"start:dev": "webpack serve --config webpack.dev.js",
|
||||
"test": "jest --coverage --config jest.config.js --no-cache",
|
||||
"version:prerelease": "yarn version prerelease",
|
||||
"version:patch": "yarn version patch -d",
|
||||
@ -59,11 +59,10 @@
|
||||
"enzyme": "3.11.0",
|
||||
"html-webpack-plugin": "4.5.0",
|
||||
"identity-obj-proxy": "3.0.0",
|
||||
"jest": "26.6.1",
|
||||
"jest": "26.6.2",
|
||||
"js-yaml": "3.14.0",
|
||||
"react-markdown": "4.3.1",
|
||||
"react-syntax-highlighter": "15.2.1",
|
||||
"serve": "11.3.2",
|
||||
"react-syntax-highlighter": "15.3.0",
|
||||
"style-loader": "2.0.0",
|
||||
"webpack": "5.3.2",
|
||||
"webpack-cli": "4.1.0",
|
||||
|
@ -3,7 +3,7 @@ const { ModuleFederationPlugin } = require('webpack').container;
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
const package = require('./package.json');
|
||||
const packageJson = require('./package.json');
|
||||
|
||||
const sanitizeName = (name) => {
|
||||
return name
|
||||
@ -70,21 +70,21 @@ module.exports = {
|
||||
},
|
||||
plugins: [
|
||||
new ModuleFederationPlugin({
|
||||
name: sanitizeName(package.name),
|
||||
library: { type: 'var', name: sanitizeName(package.name) },
|
||||
name: sanitizeName(packageJson.name),
|
||||
library: { type: 'var', name: sanitizeName(packageJson.name) },
|
||||
filename: 'remoteEntry.js',
|
||||
exposes: blockModules(),
|
||||
shared: {
|
||||
...package.dependencies,
|
||||
...packageJson.dependencies,
|
||||
react: {
|
||||
singleton: true, // only a single version of the shared module is allowed
|
||||
requiredVersion: '~17.0.0',
|
||||
version: package.dependencies.react,
|
||||
version: packageJson.dependencies.react,
|
||||
},
|
||||
'react-dom': {
|
||||
singleton: true, // only a single version of the shared module is allowed
|
||||
requiredVersion: '~17.0.0',
|
||||
version: package.dependencies['react-dom'],
|
||||
version: packageJson.dependencies['react-dom'],
|
||||
},
|
||||
},
|
||||
}),
|
||||
|
49
packages/blocksBasic/webpack.demo.js
Normal file
49
packages/blocksBasic/webpack.demo.js
Normal file
@ -0,0 +1,49 @@
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
const path = require('path');
|
||||
const { merge } = require('webpack-merge');
|
||||
|
||||
const common = require('./webpack.common.js');
|
||||
const packageJson = require('./package.json');
|
||||
|
||||
const sanitizeName = (name) => {
|
||||
return name
|
||||
.replace('@', '_at_')
|
||||
.replace('/', '_slash_')
|
||||
.replace('-', '_dash_')
|
||||
.replace(/^[a-zA-Z0-9_]/g, '_');
|
||||
};
|
||||
|
||||
const addRemoteEntryUrl = (content, absoluteFrom) => {
|
||||
const scope = sanitizeName(packageJson.name);
|
||||
const meta = JSON.parse(content);
|
||||
meta.moduleFederation = {
|
||||
module: path.basename(absoluteFrom, '.json'),
|
||||
scope,
|
||||
version: packageJson.version,
|
||||
remoteEntryUrl: 'http://localhost:3002/remoteEntry.js',
|
||||
};
|
||||
return JSON.stringify(meta);
|
||||
};
|
||||
|
||||
module.exports = merge(common, {
|
||||
entry: './demo/index',
|
||||
mode: 'development',
|
||||
devtool: 'eval-source-map',
|
||||
devServer: {
|
||||
contentBase: path.join(__dirname, 'dist'),
|
||||
port: 3002,
|
||||
},
|
||||
plugins: [
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: 'src/blocks/**/*.json',
|
||||
transformPath: (targetPath) => {
|
||||
return path.join('meta', path.basename(targetPath));
|
||||
},
|
||||
transform: addRemoteEntryUrl,
|
||||
},
|
||||
],
|
||||
}),
|
||||
],
|
||||
});
|
@ -3,7 +3,7 @@ const path = require('path');
|
||||
const { merge } = require('webpack-merge');
|
||||
|
||||
const common = require('./webpack.common.js');
|
||||
const package = require('./package.json');
|
||||
const packageJson = require('./package.json');
|
||||
|
||||
const sanitizeName = (name) => {
|
||||
return name
|
||||
@ -14,19 +14,19 @@ const sanitizeName = (name) => {
|
||||
};
|
||||
|
||||
const addRemoteEntryUrl = (content, absoluteFrom) => {
|
||||
const scope = sanitizeName(package.name);
|
||||
const scope = sanitizeName(packageJson.name);
|
||||
const meta = JSON.parse(content);
|
||||
meta.moduleFederation = {
|
||||
module: path.basename(absoluteFrom, '.json'),
|
||||
scope,
|
||||
version: package.version,
|
||||
version: packageJson.version,
|
||||
remoteEntryUrl: 'http://localhost:3002/remoteEntry.js',
|
||||
};
|
||||
return JSON.stringify(meta);
|
||||
};
|
||||
|
||||
module.exports = merge(common, {
|
||||
entry: './demo/index',
|
||||
entry: './src/index.js',
|
||||
mode: 'development',
|
||||
devtool: 'eval-source-map',
|
||||
devServer: {
|
||||
|
@ -3,7 +3,7 @@ const path = require('path');
|
||||
const { merge } = require('webpack-merge');
|
||||
|
||||
const common = require('./webpack.common.js');
|
||||
const package = require('./package.json');
|
||||
const packageJson = require('./package.json');
|
||||
|
||||
const sanitizeName = (name) => {
|
||||
return name
|
||||
@ -14,15 +14,15 @@ const sanitizeName = (name) => {
|
||||
};
|
||||
|
||||
const addRemoteEntryUrl = (content, absoluteFrom) => {
|
||||
const scope = sanitizeName(package.name);
|
||||
const scope = sanitizeName(packageJson.name);
|
||||
const meta = JSON.parse(content);
|
||||
// if no moduleFederation info is provided, default to unpkg
|
||||
if (!meta.moduleFederation) {
|
||||
meta.moduleFederation = {
|
||||
module: path.basename(absoluteFrom, '.json'),
|
||||
scope,
|
||||
version: package.version,
|
||||
remoteEntryUrl: `https://unpkg.com/${package.name}@${package.version}/dist/remoteEntry.js`,
|
||||
version: packageJson.version,
|
||||
remoteEntryUrl: `https://unpkg.com/${packageJson.name}@${packageJson.version}/dist/remoteEntry.js`,
|
||||
};
|
||||
}
|
||||
return JSON.stringify(meta);
|
||||
|
@ -56,7 +56,7 @@
|
||||
"babel-jest": "26.6.2",
|
||||
"babel-loader": "8.1.0",
|
||||
"clean-webpack-plugin": "3.0.0",
|
||||
"jest": "26.6.1",
|
||||
"jest": "26.6.2",
|
||||
"webpack": "5.3.2",
|
||||
"webpack-cli": "4.1.0"
|
||||
}
|
||||
|
@ -73,7 +73,7 @@
|
||||
"clean-webpack-plugin": "3.0.0",
|
||||
"css-loader": "5.0.0",
|
||||
"html-webpack-plugin": "4.5.0",
|
||||
"jest": "26.6.1",
|
||||
"jest": "26.6.2",
|
||||
"style-loader": "2.0.0",
|
||||
"webpack": "5.3.2",
|
||||
"webpack-cli": "4.0.0"
|
||||
|
@ -45,6 +45,6 @@
|
||||
"@babel/core": "7.12.3",
|
||||
"@babel/preset-env": "7.12.1",
|
||||
"babel-jest": "26.6.2",
|
||||
"jest": "26.6.1"
|
||||
"jest": "26.6.2"
|
||||
}
|
||||
}
|
||||
|
@ -49,6 +49,6 @@
|
||||
"@babel/core": "7.12.3",
|
||||
"@babel/preset-env": "7.12.1",
|
||||
"babel-jest": "26.6.2",
|
||||
"jest": "26.6.1"
|
||||
"jest": "26.6.2"
|
||||
}
|
||||
}
|
||||
|
@ -44,6 +44,6 @@
|
||||
"@babel/core": "7.12.3",
|
||||
"@babel/preset-env": "7.12.1",
|
||||
"babel-jest": "26.6.2",
|
||||
"jest": "26.6.1"
|
||||
"jest": "26.6.2"
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,7 @@
|
||||
"babel-jest": "26.6.2",
|
||||
"babel-loader": "8.1.0",
|
||||
"clean-webpack-plugin": "3.0.0",
|
||||
"jest": "26.6.1",
|
||||
"jest": "26.6.2",
|
||||
"webpack": "5.3.2",
|
||||
"webpack-cli": "4.1.0"
|
||||
}
|
||||
|
@ -46,7 +46,7 @@
|
||||
"@babel/core": "7.12.3",
|
||||
"@babel/preset-env": "7.12.1",
|
||||
"babel-jest": "26.6.2",
|
||||
"jest": "26.6.1",
|
||||
"jest": "26.6.2",
|
||||
"jest-diff": "26.6.2"
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,6 @@
|
||||
"scripts": {
|
||||
"build": "babel src --out-dir dist",
|
||||
"clean": "rm -rf dist",
|
||||
"dev": "webpack serve",
|
||||
"npm-publish": "npm publish --access public",
|
||||
"prepare": "yarn build",
|
||||
"prepublishOnly": "yarn build",
|
||||
@ -60,7 +59,7 @@
|
||||
"css-loader": "5.0.0",
|
||||
"html-webpack-plugin": "4.5.0",
|
||||
"identity-obj-proxy": "3.0.0",
|
||||
"jest": "26.6.1",
|
||||
"jest": "26.6.2",
|
||||
"js-yaml": "3.14.0",
|
||||
"less": "3.12.2",
|
||||
"less-loader": "7.0.2",
|
||||
|
@ -46,7 +46,7 @@
|
||||
"@babel/core": "7.12.3",
|
||||
"@babel/preset-env": "7.12.1",
|
||||
"babel-jest": "26.6.2",
|
||||
"jest": "26.6.1",
|
||||
"jest": "26.6.2",
|
||||
"jest-diff": "26.6.2"
|
||||
}
|
||||
}
|
||||
|
@ -47,6 +47,6 @@
|
||||
"@babel/core": "7.12.3",
|
||||
"@babel/preset-env": "7.12.1",
|
||||
"babel-jest": "26.6.2",
|
||||
"jest": "26.6.1"
|
||||
"jest": "26.6.2"
|
||||
}
|
||||
}
|
||||
|
@ -49,6 +49,6 @@
|
||||
"@babel/core": "7.12.3",
|
||||
"@babel/preset-env": "7.12.1",
|
||||
"babel-jest": "26.6.2",
|
||||
"jest": "26.6.1"
|
||||
"jest": "26.6.2"
|
||||
}
|
||||
}
|
||||
|
@ -30,8 +30,8 @@
|
||||
"clean": "rm -rf dist",
|
||||
"npm-publish": "npm publish --access public",
|
||||
"prepublishOnly": "yarn build",
|
||||
"start": "serve dist -p 3001",
|
||||
"dev": "webpack serve --config webpack.dev.js",
|
||||
"serve": "serve dist -p 3001",
|
||||
"start": "webpack serve --config webpack.dev.js",
|
||||
"version:prerelease": "yarn version prerelease",
|
||||
"version:patch": "yarn version patch -d",
|
||||
"version:minor": "yarn version minor -d",
|
||||
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
"extends": [
|
||||
"config:base"
|
||||
],
|
||||
"baseBranches": [
|
||||
"develop"
|
||||
]
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user