Match-id-b60089383446695222ba632ec585d0b53aacb778
This commit is contained in:
commit
af1f68be90
|
@ -35,7 +35,7 @@
|
|||
"@babel/plugin-transform-template-literals": "7.16.7",
|
||||
"@babel/preset-env": "7.16.7",
|
||||
"@babel/preset-typescript": "7.16.7",
|
||||
"@babel/runtime": "8.0.0-alpha.1",
|
||||
"@babel/runtime": "7.16.7",
|
||||
"@rollup/plugin-babel": "^5.3.1",
|
||||
"@rollup/plugin-node-resolve": "^13.3.0",
|
||||
"@rollup/plugin-replace": "^4.0.0",
|
||||
|
|
|
@ -347,12 +347,12 @@ const TextInput = () => {
|
|||
|
||||
该情况是指项目没有将React源码打包,默认使用externals方式的配置 ,在该场景下可以通过如下步骤将React项目迁移至InulaJS:
|
||||
|
||||
**1、修改webpack配置文件中`externals`,名称修改为`InulaJS`,如下:**
|
||||
**1、修改webpack配置文件中`externals`,名称修改为`inulajs`,如下:**
|
||||
|
||||
```js
|
||||
externals: {
|
||||
react: 'InulaJS', // React 修改成 InulaJS
|
||||
'react-dom': 'InulaJS', // ReactDOM 修改成 InulaJS
|
||||
react: 'inulajs', // React 修改成 inulajs
|
||||
'react-dom': 'inulajs', // ReactDOM 修改成 inulajs
|
||||
},
|
||||
```
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
'use strict';
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./cjs/horizon.production.min.js');
|
||||
module.exports = require('./cjs/inula.production.min.js');
|
||||
} else {
|
||||
module.exports = require('./cjs/horizon.development.js');
|
||||
module.exports = require('./cjs/inula.development.js');
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"name": "@cloudsop/horizon",
|
||||
"description": "Horizon is a JavaScript framework library.",
|
||||
"name": "inulajs",
|
||||
"description": "Inulajs is a JavaScript framework library.",
|
||||
"keywords": [
|
||||
"horizon"
|
||||
"inulajs"
|
||||
],
|
||||
"version": "0.0.55",
|
||||
"version": "0.0.1",
|
||||
"homepage": "",
|
||||
"bugs": "",
|
||||
"main": "index.js",
|
||||
|
@ -15,7 +15,6 @@
|
|||
"scripts": {
|
||||
"build": "rollup --config ./scripts/rollup/rollup.config.js",
|
||||
"build-types": "tsc -p tsconfig.build.json || echo \"WARNING: TSC exited with status $?\" && rollup -c ./scripts/rollup/build-types.js",
|
||||
"build:inula3rdLib-dev": "npm run build & node ./scripts/gen3rdLib.js build:horizon3rdLib-dev",
|
||||
"build:watch": "rollup --watch --config ./scripts/rollup/rollup.config.js",
|
||||
"debug-test": "yarn test --debug",
|
||||
"lint": "eslint . --ext .ts --fix",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Huawei Technologies Co.,Ltd.
|
||||
*
|
||||
* openGauss is licensed under Mulan PSL v2.
|
||||
* InulaJS is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Huawei Technologies Co.,Ltd.
|
||||
*
|
||||
* openGauss is licensed under Mulan PSL v2.
|
||||
* InulaJS is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Huawei Technologies Co.,Ltd.
|
||||
*
|
||||
* openGauss is licensed under Mulan PSL v2.
|
||||
* InulaJS is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Huawei Technologies Co.,Ltd.
|
||||
*
|
||||
* openGauss is licensed under Mulan PSL v2.
|
||||
* InulaJS is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Huawei Technologies Co.,Ltd.
|
||||
*
|
||||
* openInula is licensed under Mulan PSL v2.
|
||||
* InulaJS is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
*
|
||||
|
@ -53,12 +53,12 @@ export function cleanUp(folders) {
|
|||
|
||||
function buildTypeConfig() {
|
||||
return {
|
||||
input: ['./build/horizon/@types/index.d.ts'],
|
||||
input: ['./build/inula/@types/index.d.ts'],
|
||||
output: {
|
||||
file: './build/horizon/@types/index.d.ts',
|
||||
file: './build/inula/@types/index.d.ts',
|
||||
format: 'es',
|
||||
},
|
||||
plugins: [dts(), cleanUp(['./build/horizon/@types/'])],
|
||||
plugins: [dts(), cleanUp(['./build/inula/@types/'])],
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Huawei Technologies Co.,Ltd.
|
||||
*
|
||||
* openGauss is licensed under Mulan PSL v2.
|
||||
* InulaJS is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
*
|
||||
|
@ -27,7 +27,7 @@ const extensions = ['.js', '.ts'];
|
|||
|
||||
const libDir = path.join(__dirname, '../..');
|
||||
const rootDir = path.join(__dirname, '../..');
|
||||
const outDir = path.join(rootDir, 'build', 'horizon');
|
||||
const outDir = path.join(rootDir, 'build', 'inula');
|
||||
|
||||
if (!fs.existsSync(path.join(rootDir, 'build'))) {
|
||||
fs.mkdirSync(path.join(rootDir, 'build'));
|
||||
|
@ -67,7 +67,7 @@ const getBasicPlugins = mode => {
|
|||
};
|
||||
|
||||
function getOutputName(mode) {
|
||||
return mode === 'production' ? `horizon.${mode}.min.js` : `horizon.${mode}.js`;
|
||||
return mode === 'production' ? `inula.${mode}.min.js` : `inula.${mode}.js`;
|
||||
}
|
||||
|
||||
function genConfig(mode) {
|
||||
|
@ -83,7 +83,7 @@ function genConfig(mode) {
|
|||
{
|
||||
file: outputResolve('umd', getOutputName(mode)),
|
||||
sourcemap,
|
||||
name: 'Horizon',
|
||||
name: 'Inula',
|
||||
format: 'umd',
|
||||
},
|
||||
],
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Huawei Technologies Co.,Ltd.
|
||||
*
|
||||
* openGauss is licensed under Mulan PSL v2.
|
||||
* InulaJS is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Huawei Technologies Co.,Ltd.
|
||||
*
|
||||
* openGauss is licensed under Mulan PSL v2.
|
||||
* InulaJS is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Huawei Technologies Co.,Ltd.
|
||||
*
|
||||
* openGauss is licensed under Mulan PSL v2.
|
||||
* InulaJS is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
*
|
||||
|
|
|
@ -72,7 +72,7 @@ import {
|
|||
import { syncUpdates as flushSync } from './renderer/TreeBuilder';
|
||||
import { toRaw } from './inulax/proxy/ProxyHandler';
|
||||
|
||||
const Horizon = {
|
||||
const Inula = {
|
||||
Children,
|
||||
createRef,
|
||||
Component,
|
||||
|
@ -181,4 +181,4 @@ export {
|
|||
};
|
||||
|
||||
export * from './types';
|
||||
export default Horizon;
|
||||
export default Inula;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Huawei Technologies Co.,Ltd.
|
||||
*
|
||||
* openGauss is licensed under Mulan PSL v2.
|
||||
* InulaJS is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Huawei Technologies Co.,Ltd.
|
||||
*
|
||||
* openGauss is licensed under Mulan PSL v2.
|
||||
* InulaJS is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Huawei Technologies Co.,Ltd.
|
||||
*
|
||||
* openGauss is licensed under Mulan PSL v2.
|
||||
* InulaJS is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Huawei Technologies Co.,Ltd.
|
||||
*
|
||||
* openGauss is licensed under Mulan PSL v2.
|
||||
* InulaJS is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Huawei Technologies Co.,Ltd.
|
||||
*
|
||||
* openGauss is licensed under Mulan PSL v2.
|
||||
* InulaJS is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Huawei Technologies Co.,Ltd.
|
||||
*
|
||||
* openGauss is licensed under Mulan PSL v2.
|
||||
* InulaJS is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Huawei Technologies Co.,Ltd.
|
||||
*
|
||||
* openGauss is licensed under Mulan PSL v2.
|
||||
* InulaJS is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
*
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"declaration": true,
|
||||
"skipLibCheck": true,
|
||||
"emitDeclarationOnly": true,
|
||||
"declarationDir": "./build/horizon/@types"
|
||||
"declarationDir": "./build/inula/@types"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue