Match-id-d8da945d5c64b9bf709ad5a7c7ba75dbda46afef
This commit is contained in:
commit
c021656a01
|
@ -3,3 +3,4 @@
|
|||
.vscode
|
||||
package-lock.json
|
||||
pnpm-lock.yaml
|
||||
/packages/**/node_modules
|
||||
|
|
10
package.json
10
package.json
|
@ -1,11 +1,17 @@
|
|||
{
|
||||
"name": "inulajs",
|
||||
"description": "InulaJS is a JavaScript framework library.",
|
||||
"version": "0.0.54",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"lint": "eslint . --ext .ts --fix",
|
||||
"prettier": "prettier -w libs/**/*.ts"
|
||||
"prettier": "prettier -w libs/**/*.ts",
|
||||
"build:inula": "pnpm -F inulajs build",
|
||||
"test:inula": "pnpm -F inulajs test",
|
||||
"build:inula-cli": "pnpm -F inula-cli build",
|
||||
"build:inula-intl": "pnpm -F inula-intl rollup-build",
|
||||
"build:inula-request": "pnpm -F inula-request build",
|
||||
"build:inula-router": "pnpm -F inula-router build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.16.7",
|
||||
|
|
|
@ -28,19 +28,9 @@ module.exports = {
|
|||
'no-unused-vars': 'off', // 允许变量声明后未使用
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||
"no-underscore-dangle": ["off", "always"], // 允许私有变量 _xxx的变量命名方式
|
||||
"react/jsx-indent-props": [2, 4], // 验证JSX中的props缩进
|
||||
"react/prop-types": 0, // 防止在React组件定义中丢失props验证
|
||||
'react/jsx-indent': [ // 解决react里面的缩进问题
|
||||
'error',
|
||||
4
|
||||
],
|
||||
'filenames/match-exported': 0,
|
||||
'react/jsx-one-expression-per-line': 0, // 关闭一个表达式必须换行设定
|
||||
'react/jsx-filename-extension': [1, { 'extensions': [".js", '.jsx'] }], // 允许在 .js 和 .jsx 文件中使用 jsx
|
||||
'consistent-return': 0,
|
||||
"comma-dangle": [2, "never"], // 组和对象键值对最后一个逗号, never参数:不能带末尾的逗号, always参数:必须带末尾的逗号
|
||||
'react/button-has-type': 0, // button无需强制声明类型
|
||||
'react/no-array-index-key': 0, // 允许使用数组index作为组件的key
|
||||
'global-require': 0, // 允许require语句不出现在顶层中
|
||||
'no-nested-ternary': 0, // 允许嵌套三元表达式
|
||||
'no-unused-expressions': 0, // 允许使用未执行的表达式。比如fn是一个函数,允许 fn && fn()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@cloudsop/horizon-cli",
|
||||
"version": "1.0.45",
|
||||
"name": "inula-cli",
|
||||
"version": "0.0.1",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -19,7 +19,7 @@ module.exports = {
|
|||
"@babel/preset-react",
|
||||
{
|
||||
"runtime": "automatic",
|
||||
"importSource": "@cloudsop/horizon"
|
||||
"importSource": "inulajs"
|
||||
}
|
||||
]
|
||||
],
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
|
||||
*/
|
||||
|
||||
import Inula, { useState } from '@cloudsop/horizon';
|
||||
import Inula, { useState } from 'inulajs';
|
||||
import { IntlProvider } from "../index";
|
||||
import zh from "./locale/zh";
|
||||
import en from "./locale/en";
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
|
||||
*/
|
||||
|
||||
import Inula from "@cloudsop/horizon";
|
||||
import Inula from "inulajs";
|
||||
import { useIntl } from "../../index";
|
||||
|
||||
const Example1 = () => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
|
||||
*/
|
||||
import Inula from "@cloudsop/horizon";
|
||||
import Inula from "inulajs";
|
||||
import { FormattedMessage } from "../../index";
|
||||
|
||||
const Example2= () => {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
|
||||
*/
|
||||
|
||||
import Inula from '@cloudsop/horizon';
|
||||
import Inula from 'inulajs';
|
||||
import { FormattedMessage } from "../../index";
|
||||
|
||||
const Example3 = (props) => {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
|
||||
*/
|
||||
|
||||
import Inula from "@cloudsop/horizon";
|
||||
import Inula from "inulajs";
|
||||
import { createIntl } from "../../index";
|
||||
|
||||
const Example4 = (props) => {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
|
||||
*/
|
||||
|
||||
import Inula, { Component } from '@cloudsop/horizon';
|
||||
import Inula, { Component } from 'inulajs';
|
||||
import { injectIntl } from '../../index';
|
||||
|
||||
class Example5 extends Component<any, any, any> {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
|
||||
*/
|
||||
|
||||
import Inula from "@cloudsop/horizon";
|
||||
import Inula from "inulajs";
|
||||
import { createIntl, createIntlCache, RawIntlProvider } from "../../index";
|
||||
import Example6Child from "./Example6Child";
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
|
||||
*/
|
||||
import * as Inula from '@cloudsop/horizon';
|
||||
import * as Inula from 'inulajs';
|
||||
import App from './App'
|
||||
|
||||
function render() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@cloudsop/horizon-intl",
|
||||
"version": "1.0.22",
|
||||
"name": "inula-intl",
|
||||
"version": "0.0.1",
|
||||
"description": "",
|
||||
"main": "build/intl.umd.js",
|
||||
"type": "commonjs",
|
||||
|
@ -13,7 +13,7 @@
|
|||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://szv-open.codehub.huawei.com/innersource/fenghuang/horizon/horizon-core.git"
|
||||
"url": ""
|
||||
},
|
||||
"files": [
|
||||
"build",
|
||||
|
@ -23,7 +23,7 @@
|
|||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@cloudsop/horizon": "^0.0.58"
|
||||
"inulajs": "^0.0.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.21.3",
|
||||
|
|
|
@ -20,11 +20,8 @@ export default {
|
|||
output: [
|
||||
{
|
||||
file: path.resolve(output, 'intl.umd.js'),
|
||||
name: 'HorizonI18n',
|
||||
name: 'InulaI18n',
|
||||
format: 'umd',
|
||||
globals:{
|
||||
'@cloudsop/horizon':'Horizon'
|
||||
}
|
||||
},
|
||||
],
|
||||
plugins: [
|
||||
|
@ -46,7 +43,7 @@ export default {
|
|||
terser(),
|
||||
],
|
||||
external:[
|
||||
'@cloudsop/horizon',
|
||||
'inulajs',
|
||||
'react',
|
||||
'react-dom'
|
||||
]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
|
||||
*/
|
||||
import Inula, { Children, Fragment } from '@cloudsop/horizon';
|
||||
import Inula, { Children, Fragment } from 'inulajs';
|
||||
import { FormattedMessageProps } from '../../types/interfaces';
|
||||
import useI18n from '../hook/useI18n';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
|
||||
*/
|
||||
import Inula, { useRef, useState, useEffect, useMemo, Component } from '@cloudsop/horizon';
|
||||
import Inula, { useRef, useState, useEffect, useMemo, Component } from 'inulajs';
|
||||
import utils from '../../utils/utils';
|
||||
import { InjectProvider } from './InjectI18n';
|
||||
import I18n, { createI18nInstance } from '../I18n';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
|
||||
*/
|
||||
import Inula , { createContext, forwardRef } from '@cloudsop/horizon';
|
||||
import Inula , { createContext, forwardRef } from 'inulajs';
|
||||
import { isVariantI18n } from '../../utils/utils';
|
||||
import copyStaticProps from '../../utils/copyStaticProps';
|
||||
import { InjectOptions } from '../../types/interfaces';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
|
||||
*/
|
||||
import Inula, { useContext } from '@cloudsop/horizon';
|
||||
import Inula, { useContext } from 'inulajs';
|
||||
import utils from '../../utils/utils';
|
||||
import { I18nContext } from '../components/InjectI18n';
|
||||
import I18n from '../I18n';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
|
||||
*/
|
||||
import { isMemo, ForwardRef } from '@cloudsop/horizon';
|
||||
import { isMemo, ForwardRef } from 'inulajs';
|
||||
import {
|
||||
INULA_FORWARD_REF_STATICS,
|
||||
INULA_MEMO_STATICS,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
import copyStaticProps from '../../src/utils/copyStaticProps';
|
||||
|
||||
describe('hoistNonReactStatics', () => {
|
||||
describe('copyStaticProps', () => {
|
||||
test('should hoist static properties from sourceComponent to targetComponent', () => {
|
||||
class SourceComponent {
|
||||
static staticProp = 'sourceProp';
|
||||
|
|
|
@ -21,7 +21,7 @@ module.exports = {
|
|||
'@babel/preset-react',
|
||||
{
|
||||
'runtime': 'automatic', // 新增
|
||||
'importSource': '@cloudsop/horizon' // 新增
|
||||
'importSource': 'inulajs' // 新增
|
||||
}
|
||||
],
|
||||
'@babel/preset-typescript'],
|
||||
|
|
Loading…
Reference in New Issue