Go to file
openharmony_ci ec0645ab14
!608 相机类型悬浮窗及模态窗口相关接口
Merge pull request !608 from ZhengJiangliang/master
2022-07-30 11:02:57 +00:00
runtime !608 相机类型悬浮窗及模态窗口相关接口 2022-07-30 11:02:57 +00:00
test [jsfw]remove i18n UT 2022-01-26 15:46:33 +08:00
.babelrc zhongjianfei@huawei.com 2021-09-14 15:38:47 +08:00
.eslintrc zhongjianfei@huawei.com 2021-09-14 15:38:47 +08:00
.gitattributes update jsfw code for wgr 2021-12-22 18:13:34 +08:00
.gitignore IssueNo: #I59PQL 2022-05-28 14:45:10 +08:00
BUILD.gn Switch component ark_ts2abc to arkcompiler_ets_frontend 2022-07-07 19:55:19 +08:00
build.js White screen fix 2022-07-07 15:16:41 +08:00
bundle.json feat: add bundle.json 2022-01-18 18:56:54 +08:00
gen_snapshot.sh zhongjianfei@huawei.com 2021-09-14 15:38:47 +08:00
js_framework_build.sh adapter the prebuilts path to root_build_dir 2022-06-29 02:43:03 -07:00
LICENSE update OpenHarmony 2.0 Canary 2021-06-02 02:29:46 +08:00
NOTICE add interrupt js mock api 2022-06-07 11:55:46 +08:00
OAT.xml update jsfw code for wgr 2021-12-22 18:13:34 +08:00
package-lock.json fix npm install/build issues caused by huaweicloud mirror site 2022-06-27 10:48:06 +08:00
package.json fix npm install/build issues caused by huaweicloud mirror site 2022-06-27 10:48:06 +08:00
prebuild_env.sh fix npm install/build issues caused by huaweicloud mirror site 2022-06-27 10:48:06 +08:00
README.md update OpenHarmony 2.0 Canary 2021-06-02 02:29:46 +08:00
README.OpenSource update OpenHarmony 2.0 Canary 2021-06-02 02:29:46 +08:00
tsconfig.json update OpenHarmony 2.0 Canary 2021-06-02 02:29:46 +08:00
tslint.json zhongjianfei@huawei.com 2021-09-14 15:38:47 +08:00

JSFramework

The JSFramework is a framework for building mobile cross-platform UI written in TypeScript.

File Structure

  • runtime/all source code
    • ./main/JS bundle parsing, data methods, event methods, reactivity, etc.
    • ./preparation/JS framework initialization
    • ./utils/some utils
    • ./vdom/VM compilation
  • test/ut/unit test file
  • .eslintrceslint configure
  • BUILD.gncompiling file of JS UI framework for NinjaJS
  • build.jsbuild JS framework
  • js_framework_build.shscript file for JS framework building
  • LICENSEApache License
  • NOTICEthird party open source software notice
  • package.jsondefine what libraries will be installed into node_modules when you run npm install
  • tsconfig.jsonthe compiler options required to compile the project

Usage

Here are simplified instructions to how to get started. The following commands are the same both on Windows and Mac platforms.

1. Prerequisites

Please make sure that the following commands work before trying to build:

> npm -v
  6.14.8
> node -v
  v12.18.3

Your npm and node should be of a later version. You can upgrade them to the latest stable version.

2. Installing

RollUp tool for packaging has been configured in build.js. So after the preceding conditions are met, we can start installing right now.

First, we go to the root directory of the project:

cd ..
cd third_party/jsframework/

And then install the dependencies:

npm install

Note: If some errors occur, delete the generated package node_modules and run npm install again.

3. Building

There are two ways for building JS framework:

1. npm run build
2. in the root dir: run the build.sh script, which is built by gn

ESLint

You can config more babel and ESLint plugins in .eslintrc. You'd better make sure there are no errors of esLint rules after you change them.