-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
6 changed files
with
48 additions
and
21 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 |
---|---|---|
@@ -1,22 +1,22 @@ | ||
module.exports = { | ||
'presets': [ | ||
presets: [ | ||
'@babel/preset-react', | ||
['@babel/preset-env', { | ||
'modules': false, | ||
'useBuiltIns': false | ||
}] | ||
modules: false, | ||
useBuiltIns: false, // 默认 corejs 2 | ||
targets: "> 0.05%, not dead" | ||
}], | ||
], | ||
'plugins': [ | ||
plugins: [ | ||
['@babel/plugin-proposal-private-methods', { 'loose': true }], | ||
['@babel/plugin-proposal-private-property-in-object', { 'loose': true }], | ||
['@babel/plugin-proposal-class-properties', { 'loose': true }], | ||
['@babel/plugin-proposal-decorators', { 'legacy': true }], | ||
['@babel/transform-runtime', { | ||
'absoluteRuntime': false, | ||
'corejs': false, | ||
'helpers': false, | ||
'regenerator': true, | ||
'useESModules': false | ||
['@babel/plugin-transform-runtime', { | ||
absoluteRuntime: false, | ||
corejs: false, | ||
helpers: true, // 默认 true,从 babel-runtimie 引入,而非每个模块 inline 代码 | ||
regenerator: true, | ||
}] | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
async function arrayFromFeature(a, b) { | ||
const array = Array.from(a); | ||
return await new Promise((resolve =>{ | ||
resolve(array.includes(b)); | ||
})) | ||
} | ||
|
||
export { | ||
arrayFromFeature, | ||
} |
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,10 @@ | ||
async function arrayIncludesFeature(a, b) { | ||
const array = new Array(...a); | ||
return await new Promise((resolve =>{ | ||
resolve(array.includes(b)); | ||
})) | ||
} | ||
|
||
export { | ||
arrayIncludesFeature, | ||
} |
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 |
---|---|---|
@@ -1,16 +1,21 @@ | ||
import Dialog from './dialog'; | ||
import Toast from './toast'; | ||
|
||
import { arrayIncludesFeature } from './feature/index' | ||
import { arrayFromFeature } from './feature/feature' | ||
// import { Dialog, Toast } from 'easyjs-react-component-lib'; | ||
// import * as EasyComponentLib from 'easyjs-react-component-lib'; | ||
export { | ||
Dialog, | ||
Toast | ||
Toast, | ||
arrayIncludesFeature, | ||
arrayFromFeature | ||
} | ||
|
||
// import EasyComponentLib from 'easyjs-react-component-lib'; | ||
// const { Dialog, Toast } = EasyComponentLib; | ||
export default { | ||
Dialog, | ||
Toast | ||
} | ||
// export default { | ||
// Dialog, | ||
// Toast, | ||
// arrayIncludesFeature, | ||
// arrayFromFeature | ||
// } |
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