forked from raxjs/universal-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:broven/universal-api
* 'master' of github.com:broven/universal-api: Feat quickapp asyncstorage (raxjs#77) fix: 兼容 1.0 class 组件在 Web 下 transitionEnd 回调失效 (raxjs#47) universal-unit-tool pkg (raxjs#70) fix: compaty node (raxjs#68) feat(device): support pixelRatio (raxjs#67) feat: support bytedance microapp in universal-env (raxjs#61)
- Loading branch information
Showing
19 changed files
with
181 additions
and
92 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
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,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
*~ | ||
*.swp | ||
*.log | ||
|
||
.DS_Store | ||
.idea/ | ||
.temp/ | ||
|
||
build/ | ||
dist/ | ||
lib/ | ||
coverage/ | ||
es/ | ||
types/ | ||
node_modules/ | ||
|
||
demo/miniapp/components/ | ||
_miniapp/ |
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,10 +1,5 @@ | ||
*.swp | ||
*.log | ||
|
||
.DS_Store | ||
.idea/ | ||
package-lock.json | ||
yarn.lock | ||
coverage/ | ||
node_modules/ | ||
build/ | ||
demo | ||
.eslintignore | ||
.eslintrc.js | ||
.travis.yml | ||
.tsconfig.json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"plugins": [ | ||
[ | ||
"rax-plugin-component", | ||
"build-plugin-rax-component", | ||
{ | ||
"enableTypescript": true, | ||
"targets": ["web", "weex"] | ||
"type": "rax", | ||
"targets": ["web"] | ||
} | ||
] | ||
] | ||
] | ||
} | ||
} |
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
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,70 @@ | ||
function setItem(key, value) { | ||
return new Promise(function(resolve, reject) { | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const storage = require('@system.storage'); | ||
storage.set({ | ||
key, | ||
value, | ||
success: function(data) { | ||
resolve(data); | ||
}, | ||
fail: function(data, code) { | ||
reject(`handling fail, code = ${code}`); | ||
} | ||
}); | ||
}); | ||
} | ||
|
||
function getItem(key) { | ||
return new Promise(function(resolve, reject) { | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const storage = require('@system.storage'); | ||
storage.get({ | ||
key, | ||
success: function(data) { | ||
resolve(data); | ||
}, | ||
fail: function(data, code) { | ||
reject(`handling fail, code = ${code}`); | ||
} | ||
}); | ||
}); | ||
} | ||
|
||
function removeItem(key) { | ||
return new Promise(function(resolve, reject) { | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const storage = require('@system.storage'); | ||
storage.delete({ | ||
key, | ||
success: function(data) { | ||
resolve(data); | ||
}, | ||
fail: function(data, code) { | ||
reject(`handling fail, code = ${code}`); | ||
} | ||
}); | ||
}); | ||
} | ||
|
||
function clear() { | ||
return new Promise(function(resolve, reject) { | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const storage = require('@system.storage'); | ||
storage.clear({ | ||
success: function(data) { | ||
resolve(data); | ||
}, | ||
fail: function(data, code) { | ||
reject(`handling fail, code = ${code}`); | ||
} | ||
}); | ||
}); | ||
} | ||
|
||
module.exports = { | ||
setItem, | ||
getItem, | ||
removeItem, | ||
clear | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"plugins": [ | ||
[ | ||
"rax-plugin-component", | ||
"build-plugin-rax-component", | ||
{ | ||
"enableTypescript": true, | ||
"targets": ["web", "weex"] | ||
"type": "rax", | ||
"targets": ["web"] | ||
} | ||
] | ||
] | ||
} | ||
} |
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