Match-id-0ea64d4ad1f5f3234446fd1e6e5a19918b696d31

This commit is contained in:
* 2022-05-16 17:34:20 +08:00 committed by *
parent 062e0065b8
commit 64488b2e08
7 changed files with 9 additions and 7 deletions

View File

@ -1,4 +0,0 @@
/*
*/
declare var isDev: boolean;

View File

@ -83,6 +83,7 @@ const Horizon = {
_getProcessingVNode, _getProcessingVNode,
}; };
export const version = __VERSION__;
export { export {
Children, Children,
createRef, createRef,
@ -115,7 +116,6 @@ export {
findDOMNode, findDOMNode,
unmountComponentAtNode, unmountComponentAtNode,
act, act,
// 暂时给HorizonX使用 // 暂时给HorizonX使用
_launchUpdateFromVNode, _launchUpdateFromVNode,
_getProcessingVNode, _getProcessingVNode,

View File

@ -4,7 +4,7 @@
"keywords": [ "keywords": [
"horizon" "horizon"
], ],
"version": "0.0.6", "version": "0.0.7",
"homepage": "", "homepage": "",
"bugs": "", "bugs": "",
"main": "index.js", "main": "index.js",

View File

@ -5,3 +5,4 @@ global.MessageChannel = function MessageChannel() {
postMessage() { } postMessage() { }
}; };
}; };
global.__VERSION__ = require('../../../libs/horizon/package.json').version;

View File

@ -2,6 +2,7 @@ const webpack = require('webpack');
const ESLintPlugin = require('eslint-webpack-plugin'); const ESLintPlugin = require('eslint-webpack-plugin');
const baseConfig = require('./webpack.base'); const baseConfig = require('./webpack.base');
const path = require('path'); const path = require('path');
const horizonVersion = require('../../libs/horizon/package.json').version;
const mode = 'development'; const mode = 'development';
const devtool = 'inline-source-map'; const devtool = 'inline-source-map';
@ -12,6 +13,7 @@ const plugins = [
new webpack.DefinePlugin({ new webpack.DefinePlugin({
'process.env.NODE_ENV': '"development"', 'process.env.NODE_ENV': '"development"',
isDev: 'true', isDev: 'true',
__VERSION__: `"${horizonVersion}"`,
}), }),
]; ];

View File

@ -2,6 +2,7 @@ const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin');
const baseConfig = require('./webpack.base'); const baseConfig = require('./webpack.base');
const path = require('path'); const path = require('path');
const horizonVersion = require('../../libs/horizon/package.json').version;
const mode = 'production'; const mode = 'production';
const devtool = 'none'; const devtool = 'none';
@ -11,6 +12,7 @@ const plugins = [
new webpack.DefinePlugin({ new webpack.DefinePlugin({
'process.env.NODE_ENV': '"production"', 'process.env.NODE_ENV': '"production"',
isDev: 'false', isDev: 'false',
__VERSION__: `"${horizonVersion}"`,
}) })
]; ];

View File

@ -34,7 +34,8 @@
}, },
"include": [ "include": [
"./libs/**/src/**/*.ts", "./libs/**/src/**/*.ts",
"libs/horizon/index.d.ts" "./libs/**/*.ts",
"./libs/horizon/global.d.ts"
], ],
"exclude": ["node_modules", "**/*.spec.ts", "dev"], "exclude": ["node_modules", "**/*.spec.ts", "dev"],
"types": ["node"] "types": ["node"]