Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(hippy-vue-next): support vue3.x #2357

Merged
merged 117 commits into from
Oct 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
28e8705
feat(hippy-vue-next): initialize hippy-vue-next package
lxy32167 Jul 27, 2022
ebcaadc
feat(hippy-vue-next): rollup build config
lxy32167 Jul 29, 2022
bef5256
feat(example): add vue-next demo
lxy32167 Aug 2, 2022
9e4b91d
docs(hippy-vue-next): update vue version
lxy32167 Aug 3, 2022
0c4706e
feat(hippy-vue-next): update branch up to date with Tencent:master
lxy32167 Aug 3, 2022
94e28e0
feat(hippy-vue-next): update comment
Aug 4, 2022
d2c1be4
feat(example): use @vue/runtime-core with package
lxy32167 Aug 4, 2022
2000647
docs(hippy-vue-next): update comment
Aug 4, 2022
a84fdcb
fix(hippy-vue-next): fix demo debug problem
gguoyu Aug 4, 2022
42907d8
feat(hippy-vue-next): modify import type of runtime in demo
gguoyu Aug 4, 2022
e1e60a1
feat(hippy-vue-next): generate d.ts file
lxy32167 Aug 4, 2022
8f0bfc6
fix(hippy-vue-next): fix android horizontal problem in demo-list
gguoyu Aug 5, 2022
be0b351
feat(hippy-vue-next): modify eslint options to check demo's code
gguoyu Aug 5, 2022
65482d2
feat(hippy-vue-next): add vue-next unit test
lxy32167 Aug 5, 2022
79ee06d
feat(hippy-vue-next): fix & commit unit tests
gguoyu Aug 5, 2022
04cbba0
feat(hippy-vue-next): ignore api-extractor warnings
lxy32167 Aug 5, 2022
90d4ae3
docs(hippy-vue-next): update docs
gguoyu Aug 5, 2022
609d946
docs(hippy-vue-next): update comment
Aug 5, 2022
70252c1
docs(hippy-vue-next): update docs
gguoyu Aug 5, 2022
0e6f453
docs(hippy-vue-next): update docs
gguoyu Aug 8, 2022
53b25d1
chore(license): add license header
lxy32167 Aug 8, 2022
201d0e0
docs(hippy-vue-next): update docs
gguoyu Aug 8, 2022
274e3f3
feat(hippy-vue-next): add once event demo
gguoyu Aug 8, 2022
1b173fd
refactor(hippy-vue-next): rename tool package
lxy32167 Aug 8, 2022
8ee005d
docs(hippy-vue-next): update docs
Aug 8, 2022
c3ab8d4
docs(hippy-vue-next): update comment
Aug 8, 2022
79131ee
docs(hippy-vue-next): update docs
Aug 8, 2022
ebb150e
feat(hippy-vue-next): modify regexp
gguoyu Aug 8, 2022
fa3b7ac
docs(hippy-vue-next): update docs
lxy32167 Aug 8, 2022
26a2c7d
feat(hippy-vue-next): modify regexp
gguoyu Aug 8, 2022
7de4cc9
feat(hippy-vue-next): perf regexp
gguoyu Aug 8, 2022
8aaa46b
Merge branch 'master' into feature/hippy-vue-next
zoomchan-cxj Aug 8, 2022
3905835
feat(hippy-vue-next): perf regexp
gguoyu Aug 8, 2022
aa6d046
feat(hippy-vue-next): perf regexp
gguoyu Aug 8, 2022
c65ccbc
feat(hippy-vue-next): perf regexp
gguoyu Aug 8, 2022
a698774
feat(hippy-vue-next): perf regexp
gguoyu Aug 8, 2022
8373b72
feat(hippy-vue-next): perf regexp
gguoyu Aug 8, 2022
216f0d3
Merge branch 'master' into feature/hippy-vue-next
gguoyu Aug 9, 2022
27be900
feat(hippy-vue-next): reset old package-lock
lxy32167 Aug 9, 2022
0c109da
feat(hippy-vue-next): update breakStrategy demo
gguoyu Aug 9, 2022
f57a17c
Merge branch 'master' into feature/hippy-vue-next
zoomchan-cxj Aug 9, 2022
72915ec
Merge branch 'master' into feature/hippy-vue-next
zoomchan-cxj Aug 10, 2022
c944b44
feat(hippy-vue-next): add utils unit test case
gguoyu Aug 10, 2022
46c9b55
feat(hippy-vue-next): add utils & element unit test case
gguoyu Aug 11, 2022
1e4aa14
feat(hippy-vue-next): add event & element unit test case
gguoyu Aug 12, 2022
35fb1fa
feat(hippy-vue-next): add native unit test case
gguoyu Aug 12, 2022
ea94a1a
Merge branch 'master' into feature/hippy-vue-next
zoomchan-cxj Aug 12, 2022
84d7159
feat(hippy-vue-next): add built-in & patch unit test case
gguoyu Aug 15, 2022
7a26343
feat(hippy-vue-next): add patch unit test case
gguoyu Aug 15, 2022
3b25a9d
feat(hippy-vue-next): add style unit test case
gguoyu Aug 15, 2022
564d3a9
feat(hippy-vue-next): add style unit test case
gguoyu Aug 16, 2022
e2ff971
feat(hippy-vue-next): add style & util unit test case
gguoyu Aug 16, 2022
1fc5714
Merge branch 'master' into feature/hippy-vue-next
zoomchan-cxj Aug 16, 2022
7364377
fix(hippy-vue-next): fix swiper & animation warn in debug mode
gguoyu Aug 18, 2022
1d4e11c
feat(hippy-vue-next): use shallowRef to up perf for component reactive
gguoyu Aug 18, 2022
393c7d4
fix(hippy-vue-next): fix animation warn in debug mode
gguoyu Aug 18, 2022
7ec4aaa
feat(hippy-vue-next): upgrade debug package
gguoyu Aug 19, 2022
7a274c3
Merge branch 'master' into feature/hippy-vue-next
zoomchan-cxj Aug 22, 2022
9ce0f5d
Merge branch 'feature/vue-next-unit-test' of https://github.com/lxy32…
gguoyu Aug 23, 2022
4cc9ab8
feat(hippy-vue-next): fix CR problem
gguoyu Aug 23, 2022
a2e7097
Merge branch 'master' of https://github.com/lxy32167/Hippy into featu…
gguoyu Aug 23, 2022
48d10ac
feat(hippy-vue-next): fix CR problem
gguoyu Aug 23, 2022
7e199c7
feat(hippy-vue-next): app start support both callback & promise
gguoyu Aug 23, 2022
4dc730a
feat(hippy-vue-next): fix turbo proxy value problem
gguoyu Aug 23, 2022
52ec3b6
feat(hippy-vue-next): update docs
gguoyu Aug 23, 2022
8c860d1
feat(hippy-vue-next): fix animation demo problem
gguoyu Aug 25, 2022
c864ca5
feat(hippy-vue-next): modify register hippy method to compatible vue2
gguoyu Aug 25, 2022
541ebc6
feat(hippy-vue-next): update docs
gguoyu Aug 25, 2022
0d74a44
feat(hippy-vue-next): update vue3 docs
gguoyu Aug 25, 2022
0422427
feat(hippy-vue-next): add waterfall lose props
gguoyu Aug 31, 2022
c5492dc
Merge branch 'master' of https://github.com/lxy32167/Hippy into featu…
gguoyu Aug 31, 2022
61ea7b7
Merge branch 'master' into feature/hippy-vue-next
zoomchan-cxj Aug 31, 2022
fef939f
fix(vue-next): fix lint issues and logic robust issues
zoomchan-cxj Sep 1, 2022
f158002
feat(hippy-vue-next): add event bus & unit test case
gguoyu Aug 31, 2022
ab83e03
feat(hippy-vue-next): add webpack vendor options
gguoyu Aug 31, 2022
be75bb5
feat(hippy-vue-next): add webpack vendor options
gguoyu Aug 31, 2022
dd3feb5
feat(hippy-vue-next): remove unused demo method
gguoyu Aug 31, 2022
3be18e6
feat(hippy-vue-next): modify event bus to compatible vue2
gguoyu Aug 31, 2022
6370c8a
feat(hippy-vue-next): modify event bus to compatible vue2
gguoyu Sep 1, 2022
ff7119c
feat(hippy-vue-next): add event-bus unit test cases
gguoyu Sep 1, 2022
9cbab23
feat(hippy-vue-next): add build vendor directive
gguoyu Sep 1, 2022
a2e8492
feat(hippy-vue-next): remove demo redundant method & add silent option
gguoyu Sep 1, 2022
6f8c8ac
feat(hippy-vue-next): update debug doc
gguoyu Sep 1, 2022
e9d1ba1
feat(hippy-vue-next): add console output style
gguoyu Sep 1, 2022
c2052af
Merge branch 'master' into feature/hippy-vue-next
zoomchan-cxj Sep 1, 2022
222ec1a
Merge branch 'master' into feature/hippy-vue-next
zoomchan-cxj Sep 6, 2022
0f9d9a0
feat(hippy-vue-next): add custom nativeapis and components demo
lxy32167 Sep 8, 2022
4252bc2
docs(text): extend custom nativeapis and components docs
lxy32167 Sep 9, 2022
80fecde
feat(hippy-vue-next): remove auto generated declaration files
gguoyu Sep 14, 2022
420ffa9
feat(hippy-vue-next): update demo list & compatible vue3.2.39+ event
gguoyu Sep 14, 2022
59da647
Merge branch 'master' into feature/hippy-vue-next
gguoyu Sep 16, 2022
5083ae1
feat(hippy-vue-next): support scoped & attribute selector & merge update
gguoyu Sep 19, 2022
8a14767
Merge branch 'master' into feature/hippy-vue-next
gguoyu Sep 19, 2022
0b79d3d
feat(hippy-vue-next): support scoped & add unit tests
gguoyu Sep 20, 2022
d1531fc
feat(hippy-vue-next): update vue-next-demo same to vue-demo
gguoyu Sep 21, 2022
a8691dc
Merge branch 'master' into feature/hippy-vue-next
gguoyu Sep 21, 2022
4971e80
feat(hippy-vue-next): add unit tests
gguoyu Sep 21, 2022
71cb3ca
feat(hippy-vue-next): use named export instead universal export
gguoyu Sep 22, 2022
312ee33
Merge branch 'master' into feature/hippy-vue-next
gguoyu Sep 22, 2022
fb2ee7c
feat(hippy-vue-next): update css-loader name to compatible vue-loader
gguoyu Sep 22, 2022
002d31f
Merge branch 'master' into feature/hippy-vue-next
zoomchan-cxj Sep 22, 2022
26cc4ea
Merge branch 'master' into feature/hippy-vue-next
zoomchan-cxj Sep 22, 2022
b84183f
feat(hippy-vue-next): fix style matched issue
gguoyu Sep 22, 2022
1c280ec
Merge branch 'master' into feature/hippy-vue-next
zoomchan-cxj Sep 23, 2022
64b5a1e
refactor(vue-next): update docs & lock
zoomchan-cxj Sep 23, 2022
8cdba95
fix(npm,eslint): update npm package & fix lint
zoomchan-cxj Sep 26, 2022
d2321ba
Merge branch 'master' into feature/hippy-vue-next
zoomchan-cxj Sep 26, 2022
8db22cb
feat(hippy-vue-next): add style unit tests
gguoyu Sep 26, 2022
034d1e3
feat(hippy-vue-next): fix eslint issue
gguoyu Sep 27, 2022
43f2e21
feat(hippy-vue-next): add android router inject logic & doc
gguoyu Sep 27, 2022
0cd1da2
feat(hippy-vue-next): use hippy history to solve router inject logic
gguoyu Sep 28, 2022
23ede22
Merge branch 'master' into feature/hippy-vue-next
zoomchan-cxj Oct 8, 2022
63e2243
feat(hippy-vue-next): update router history doc
gguoyu Oct 8, 2022
41f32c8
feat(hippy-vue-next): update router history doc
gguoyu Oct 8, 2022
49a4139
Merge branch 'master' into feature/hippy-vue-next
zoomchan-cxj Oct 8, 2022
b79ae8c
feat(vue): add getElemCss scoped judgement
zoomchan-cxj Oct 8, 2022
53a324d
refactor(vue-demo): remove stop
zoomchan-cxj Oct 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ module.exports = {
'jsx-a11y',
],
overrides: [
{
files: ['*.test.ts'],
extends: ['plugin:jest/recommended'],
},
{
files: ['**/*.ts', '**/*.tsx'],
extends: ['eslint-config-tencent/ts'],
Expand All @@ -65,6 +69,9 @@ module.exports = {
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/prefer-for-of': 'off',
},
parserOptions: {
project: ['./**/tsconfig.json'],
},
},
],
env: {
Expand Down Expand Up @@ -95,6 +102,9 @@ module.exports = {
// Allow event name not kebab-case
'vue/custom-event-name-casing': 'off',

// Allow component names not be multi-word
'vue/multi-word-component-names': 'off',

'import/no-unresolved': 'off',

// Disable prop-types
Expand All @@ -103,6 +113,8 @@ module.exports = {
// Disable deprecated
'react/no-deprecated': 'off',

'react/no-unknown-property': 'off',

'import/namespace': [
'error',
{
Expand Down Expand Up @@ -156,6 +168,7 @@ module.exports = {
['shared', resolveVue('shared')],
['sfc', resolveVue('sfc')],
['he', path.resolve(__dirname, './packages/hippy-vue/src/util/entity-decoder')],
['@hippy-vue-next-style-parser', resolvePackage('hippy-vue-next-style-parser')],
],
},
},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/frontend_build_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: lint & build
run: npm run lint & npm run build
- name: test
run: npm run coverage
run: npm run test:jest && npm run coverage
- name: coverage
if: matrix.node == '16.x'
uses: codecov/codecov-action@v2
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ For iOS, we recommend to use iOS simulator when first try. However, you can chan
>
> `npm run build`: Build each front-end sdk package.

2. Choose a demo to build with `npm run buildexample [hippy-react-demo|hippy-vue-demo]` at root directory.
2. Choose a demo to build with `npm run buildexample [hippy-react-demo|hippy-vue-demo|hippy-vue-next-demo]` at root directory.
3. Start the Xcode and build the iOS app with `open examples/ios-demo/HippyDemo.xcodeproj`.

> If `Step 2` throw error, you can `cd` to `examples` hippy-react-demo or hippy-vue-demo, and run `npm install --legacy-peer-deps` to install demo dependencies first.
> If `Step 2` throw error, you can `cd` to `examples` hippy-react-demo or hippy-vue-demo or hippy-vue-next-demo, and run `npm install --legacy-peer-deps` to install demo dependencies first.
>
> More details for [iOS SDK integration](https://hippyjs.org/#/ios/integration?id=ios-%e9%9b%86%e6%88%90).

Expand All @@ -81,12 +81,12 @@ Before build the android app, please make sure the SDK and NDK is installed, And
>
> `npm run build`: Build each front-end sdk package.

2. Choose a demo to build with `npm run buildexample [hippy-react-demo|hippy-vue-demo]` at root directory.
2. Choose a demo to build with `npm run buildexample [hippy-react-demo|hippy-vue-demo|hippy-vue-next-demo]` at root directory.
3. Open `Android Project` at root directory with Android Studio.
4. Connect Android phone with USB cable and make sure USB debugging mode is enabled(Run `adb devices` on the computer terminal to check cellphone connection status).
5. Open the project with Android Studio, run and install the apk.

> If `Step 2` throw error, you can `cd` to `examples` hippy-react-demo or hippy-vue-demo, and run `npm install --legacy-peer-deps` to install demo dependencies first.
> If `Step 2` throw error, you can `cd` to `examples` hippy-react-demo or hippy-vue-demo or hippy-vue-next-demo, and run `npm install --legacy-peer-deps` to install demo dependencies first.
>
> If you encounter the issue of `No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android`, here is the [solution](https://github.com/google/filament/issues/15#issuecomment-415423557).
>
Expand All @@ -95,19 +95,19 @@ Before build the android app, please make sure the SDK and NDK is installed, And
### Debug the js demo

1. Follow [Build the iOS simulator with js demo](https://github.com/Tencent/Hippy#build-the-ios-simulator-with-js-demo) or [Build the Android app with js demo](https://github.com/Tencent/Hippy#build-the-android-app-with-js-demo) first to build the App.
2. Run `npm run init:example [hippy-react-demo|hippy-vue-demo]` at root directory.
3. Run `npm run debugexample [hippy-react-demo|hippy-vue-demo] dev` at root directory.
2. Run `npm run init:example [hippy-react-demo|hippy-vue-demo|hippy-vue-next-demo]` at root directory.
3. Run `npm run debugexample [hippy-react-demo|hippy-vue-demo|hippy-vue-next-demo] dev` at root directory.

> Or you can `cd` to `examples/hippy-react-demo` or `examples/hippy-vue-demo` directory to run `npm run hippy:dev` instead.
> Or you can `cd` to `examples/hippy-react-demo` or `examples/hippy-vue-demo` or `examples/hippy-vue-next-demo` directory to run `npm run hippy:dev` instead.
>
> On example debug mode, npm packages such as @hippy/react, @hippy/vue are linked to `packages` > `[different package]` > `dist`(not node_modules), so if you have changed js package source code and want to make it take effect in target example, please call `npm run build` at root directory again.
> On example debug mode, npm packages such as @hippy/react, @hippy/vue, @hippy/vue-next are linked to `packages` > `[different package]` > `dist`(not node_modules), so if you have changed js package source code and want to make it take effect in target example, please call `npm run build` at root directory again.
>
> More details for debugging can be read in [Hippy Debug Document](https://hippyjs.org/#/guide/debug).

### Build the js production demo

1. Follow [Build the iOS simulator with js demo](https://github.com/Tencent/Hippy#build-the-ios-simulator-with-js-demo) or [Build the Android app with js demo](https://github.com/Tencent/Hippy#build-the-android-app-with-js-demo) first to build the App.
2. `cd` to examples `hippy-react-demo` or `hippy-vue-demo`.
2. `cd` to examples `hippy-react-demo` or `hippy-vue-demo` or `hippy-vue-next-demo`.
3. Run `npm install` to install demo js dependencies.
4. Run `npm run hippy:vendor` and `npm run hippy:build` in sequence to build the production `vendor.[android|ios].js` and `index.[android|ios].js`.

Expand Down Expand Up @@ -136,12 +136,15 @@ Hippy
├── examples # Demo code for frontend or native developer.
│   ├── hippy-react-demo # hippy-react js demo code.
│   ├── hippy-vue-demo # hippy-vue js demo code.
│   ├── hippy-vue-next-demo # hippy-vue-next js demo code.
│   ├── ios-demo # iOS native demo code.
│   └── android-demo # Android native demo code.
├── packages # npm packages.
│   ├── hippy-react # React binding for Hippy.
│   ├── hippy-react-web # Web adapter for hippy-react.
│   ├── hippy-vue-next-style-parser # style parser for Hippy vue-next.
│   ├── hippy-vue # Vue binding for Hippy.
│   ├── hippy-vue-next # Vue-next binding for Hippy.
│   ├── hippy-vue-css-loader # Webpack loader for convert CSS text to JS AST.
│   ├── hippy-vue-loader # Forked from vue-loader to do some hippy customization.
│   ├── hippy-vue-native-components # Native components extensions for hippy-vue.
Expand Down
Binary file added docs/assets/img/hippy-vue-next-arch-cn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/en-us/guide/debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,6 @@ Set Host App debugMode to true and pass in the bundleUrl generated by front-end

Both hippy-react and hippy-vue will output the information of communicating with native, including the js-native node operations, events sent/received. These logs are actually very helpful for business debugging, allowing developers to understand how the front-end framework translates code into a syntax that the native can understand. When you encounter problems, please first check the framework communication logs, as they can basically locate most of the problems.

If you need to turn off the logs, you can add `silent: true` to hippy-react's `new Hippy` startup parameters, or turn on `Vue.config.silent = true;` in hippy-vue project entry file.
If you need to turn off the logs, you can add `silent: true` to hippy-react's `new Hippy` startup parameters, or turn on `Vue.config.silent = true;` in hippy-vue project entry file, or add `silent: true` to hippy-vue-next's `createApp` init options.

<img src="../assets/img/inspectDebugInfo.png" alt="Communication Info" width="60%"/>
Loading