-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
yangzy0603
committed
Jun 27, 2023
1 parent
f6fbe5a
commit 726c732
Showing
21 changed files
with
683 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
// more config: http://gitlab.alibaba-inc.com/parrot/parrot-tool-must/blob/master/doc/config.md | ||
module.exports = { | ||
extract: { | ||
name: 'galaxybase', | ||
sourcePath: 'src', | ||
fileType: 'ts', | ||
prettier: true, | ||
exclude: (path)=>{ | ||
return path.includes('/pages/') ; // | ||
}, | ||
macro: { | ||
path: 'src/i18n', | ||
method: '$i18n.get({id:"$key$",dm:"$defaultMessage$"})', | ||
import: 'import $i18n from "src/i18n"', | ||
keySplitter: '.', | ||
placeholder: variable => { | ||
return `{${variable}}`; | ||
}, | ||
implement: `import locale from '@aligov/global-locale'; | ||
import stringFormat from '@aligov/global-string-format'; | ||
import strings from './strings'; | ||
let language; // Current language | ||
let intl; // Instance of intl-universal. Create by provideIntl | ||
function update() { | ||
const { lang } = locale.getLocale(); | ||
language = lang; | ||
intl = stringFormat.init(lang, strings, { name: 'galaxybase' }); | ||
} | ||
function change(langTag) { | ||
locale.setLang(langTag); | ||
update(); | ||
} | ||
function get(id, variable = {}) { | ||
if (!intl) update(); | ||
if (typeof id === 'string') { | ||
return stringFormat.format( | ||
{ | ||
id: id, | ||
}, | ||
variable, | ||
{ name: 'galaxybase' } | ||
); | ||
} else if (typeof id === 'object' && id.dm) { | ||
id.defaultMessage = id.dm; | ||
} | ||
return stringFormat.format( | ||
{ | ||
id: id.id, | ||
defaultString: id.dm, | ||
}, | ||
variable, | ||
{ name: 'galaxybase' } | ||
); | ||
} | ||
export default { | ||
get, | ||
update, | ||
change, | ||
language, | ||
}; | ||
`, | ||
dependencies: ['@aligov/global-locale', '@aligov/global-string-format'], | ||
}, | ||
babel: { | ||
allowImportExportEverywhere: true, | ||
decoratorsBeforeExport: true, | ||
plugins: [ | ||
'asyncGenerators', | ||
'classProperties', | ||
'decorators-legacy', | ||
'doExpressions', | ||
'exportExtensions', | ||
'exportDefaultFrom', | ||
'typescript', | ||
'functionSent', | ||
'functionBind', | ||
'jsx', | ||
'objectRestSpread', | ||
'dynamicImport', | ||
'numericSeparator', | ||
'optionalChaining', | ||
'optionalCatchBinding', | ||
], | ||
}, | ||
isNeedUploadCopyToMedusa: false, | ||
sourceLang: 'zh-CN', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,19 +29,21 @@ | |
"antd": "4.x" | ||
}, | ||
"dependencies": { | ||
"@antv/gi-sdk": "workspace:*", | ||
"@aligov/global-locale": "^1.0.5", | ||
"@aligov/global-string-format": "^1.0.7", | ||
"@ant-design/icons": "^4.6.2", | ||
"@antv/gi-sdk": "workspace:*", | ||
"@antv/graphin": "2.x", | ||
"@antv/graphin-icons": "^1.0.0", | ||
"antd": "4.x", | ||
"codemirror": "^5.25.0", | ||
"monaco-editor": "^0.34.0", | ||
"node-rsa": "^1.1.1", | ||
"qs": "^6.5.3", | ||
"react": "17.x", | ||
"react-monaco-editor": "^0.48.0", | ||
"umi-request": "^1.4.0", | ||
"use-immer": "^0.7.0", | ||
"node-rsa": "^1.1.1", | ||
"qs": "^6.5.3" | ||
"use-immer": "^0.7.0" | ||
}, | ||
"devDependencies": { | ||
"dumi": "^1.1.38", | ||
|
@@ -55,5 +57,6 @@ | |
"peerDependencies": {}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
}, | ||
"repository": "[email protected]:antvis/G6VP.git" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.