Signed-off-by: liujuan <liujuan76@h-partners.com>

Changes to be committed:
This commit is contained in:
liujuan 2023-08-09 14:28:47 +08:00
parent 8601b70101
commit 0d000b325d
23 changed files with 165 additions and 2321 deletions

View File

@ -60,10 +60,14 @@
<filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
<filteritem type="filename" name="*.json5" desc="json file"/>
<filteritem type="filename" name="publicity.xml" desc="Build Files"/>
<filteritem type="filename" name="hvigorw" desc="Build Files"/>
<filteritem type="filename" name="hvigorw.bat" desc="Build Files"/>
</filefilter>
<filefilter name="defaultPolicyFilter" desc="Filters for LICENSE file policies">
<filteritem type="filename" name="*.json5" desc="json file"/>
<filteritem type="filename" name="publicity.xml" desc="Build Files"/>
<filteritem type="filename" name="hvigorw" desc="Build Files"/>
<filteritem type="filename" name="hvigorw.bat" desc="Build Files"/>
</filefilter>
</filefilterlist>
</oatconfig>

7
common/oh-package.json5 Normal file
View File

@ -0,0 +1,7 @@
{
"name": "@ohos/common",
"description": "a npm package which contains common function",
"main": "index.ts",
"version": "1.0.0",
"dependencies": {}
}

View File

@ -1,5 +0,0 @@
{
"name": "@ohos/common",
"version": "1.0.0",
"lockfileVersion": 1
}

View File

@ -1,13 +0,0 @@
{
"name": "@ohos/common",
"version": "1.0.0",
"description": "a npm package which contains common function",
"ohos": {
"org": "huawei",
"buildTool": "hvigor",
"directoryLevel": "module"
},
"main": "index.ts",
"dependencies": {},
"type": "module"
}

View File

@ -1,15 +1,9 @@
{
"name": "@ohos/browser",
"description": "a npm package which contains browser feature",
"ohos": {
"org": "huawei",
"buildTool": "hvigor",
"directoryLevel": "module"
},
"version": "1.0.0",
"main": "index.ts",
"version": "1.0.0",
"dependencies": {
"@ohos/common": "../../common"
},
"type": "module"
}
}
}

View File

@ -1,11 +0,0 @@
{
"name": "@ohos/browser",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@ohos/common": {
"version": "file:../../common"
}
}
}

View File

@ -1,15 +1,9 @@
{
"name": "@ohos/editor",
"version": "1.0.0",
"ohos": {
"org": "huawei",
"buildTool": "hvigor",
"directoryLevel": "module"
},
"description": "a npm package which contains editor feature",
"main": "index.ts",
"version": "1.0.0",
"dependencies": {
"@ohos/common": "../../common"
},
"type": "module"
}
}
}

View File

@ -1,11 +0,0 @@
{
"name": "@ohos/editor",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@ohos/common": {
"version": "file:../../common"
}
}
}

View File

@ -1,15 +1,9 @@
{
"name": "@ohos/formability",
"version": "1.0.0",
"ohos": {
"org": "huawei",
"buildTool": "hvigor",
"directoryLevel": "module"
},
"description": "a npm package which contains formAbility feature",
"main": "index.ts",
"version": "1.0.0",
"dependencies": {
"@ohos/common": "../../common"
},
"type": "module"
}
}
}

View File

@ -1,11 +0,0 @@
{
"name": "@ohos/formability",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@ohos/common": {
"version": "file:../../common"
}
}
}

View File

@ -0,0 +1,10 @@
{
"name": "@ohos/thirdselect",
"description": "a npm package which contains thirdSelect feature",
"main": "index.ts",
"version": "1.0.0",
"dependencies": {
"@ohos/browser": "../browser",
"@ohos/common": "../../common"
}
}

View File

@ -1,22 +0,0 @@
{
"name": "@ohos/thirdselect",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@ohos/browser": {
"version": "file:../browser",
"requires": {
"@ohos/common": "file:../../common"
},
"dependencies": {
"@ohos/common": {
"version": "file:../../common"
}
}
},
"@ohos/common": {
"version": "file:../../common"
}
}
}

View File

@ -1,16 +0,0 @@
{
"name": "@ohos/thirdselect",
"version": "1.0.0",
"ohos": {
"org": "huawei",
"buildTool": "hvigor",
"directoryLevel": "module"
},
"description": "a npm package which contains thirdSelect feature",
"main": "index.ts",
"dependencies": {
"@ohos/common": "../../common",
"@ohos/browser": "../browser"
},
"type": "module"
}

View File

@ -1,15 +1,9 @@
{
"name": "@ohos/timeline",
"version": "1.0.0",
"ohos": {
"org": "huawei",
"buildTool": "hvigor",
"directoryLevel": "module"
},
"description": "a npm package which contains timeline feature",
"main": "index.ts",
"version": "1.0.0",
"dependencies": {
"@ohos/common": "../../common"
},
"type": "module"
}
}
}

View File

@ -1,11 +0,0 @@
{
"name": "@ohos/timeline",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@ohos/common": {
"version": "file:../../common"
}
}
}

View File

@ -1,6 +1,6 @@
{
"hvigorVersion": "1.6.0-rc.58.s",
"hvigorVersion": "2.1.1",
"dependencies": {
"@ohos/hvigor-ohos-plugin": "1.6.0-rc.58.s"
"@ohos/hvigor-ohos-plugin": "2.1.1"
}
}

File diff suppressed because one or more lines are too long

48
hvigorw Normal file
View File

@ -0,0 +1,48 @@
#!/bin/bash
# ----------------------------------------------------------------------------
# Hvigor startup script, version 1.0.0
#
# Required ENV vars:
# ------------------
# NODE_HOME - location of a Node home dir
# or
# Add /usr/local/nodejs/bin to the PATH environment variable
# ----------------------------------------------------------------------------
HVIGOR_APP_HOME=$(dirname $(readlink -f $0))
HVIGOR_WRAPPER_SCRIPT=${HVIGOR_APP_HOME}/hvigor/hvigor-wrapper.js
warn() {
echo ""
echo -e "\033[1;33m`date '+[%Y-%m-%d %H:%M:%S]'`$@\033[0m"
}
error() {
echo ""
echo -e "\033[1;31m`date '+[%Y-%m-%d %H:%M:%S]'`$@\033[0m"
}
fail() {
error "$@"
exit 1
}
# Determine node to start hvigor wrapper script
if [ -n "${NODE_HOME}" ];then
EXECUTABLE_NODE="${NODE_HOME}/bin/node"
if [ ! -x "$EXECUTABLE_NODE" ];then
fail "ERROR: NODE_HOME is set to an invalid directory,check $NODE_HOME\n\nPlease set NODE_HOME in your environment to the location where your nodejs installed"
fi
else
EXECUTABLE_NODE="node"
which ${EXECUTABLE_NODE} > /dev/null 2>&1 || fail "ERROR: NODE_HOME is not set and not 'node' command found in your path"
fi
# Check hvigor wrapper script
if [ ! -r "$HVIGOR_WRAPPER_SCRIPT" ];then
fail "ERROR: Couldn't find hvigor/hvigor-wrapper.js in ${HVIGOR_APP_HOME}"
fi
# start hvigor-wrapper script
exec "${EXECUTABLE_NODE}" \
"${HVIGOR_WRAPPER_SCRIPT}" "$@"

64
hvigorw.bat Normal file
View File

@ -0,0 +1,64 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Hvigor startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
set WRAPPER_MODULE_PATH=%APP_HOME%\hvigor\hvigor-wrapper.js
set NODE_EXE=node.exe
goto start
:start
@rem Find node.exe
if defined NODE_HOME goto findNodeFromNodeHome
%NODE_EXE% --version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH.
echo.
echo Please set the NODE_HOME variable in your environment to match the
echo location of your NodeJs installation.
goto fail
:findNodeFromNodeHome
set NODE_HOME=%NODE_HOME:"=%
set NODE_EXE_PATH=%NODE_HOME%/%NODE_EXE%
if exist "%NODE_EXE_PATH%" goto execute
echo.
echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH.
echo.
echo Please set the NODE_HOME variable in your environment to match the
echo location of your NodeJs installation.
goto fail
:execute
@rem Execute hvigor
"%NODE_EXE%" %WRAPPER_MODULE_PATH% %*
if "%ERRORLEVEL%" == "0" goto hvigorwEnd
:fail
exit /b 1
:hvigorwEnd
if "%OS%" == "Windows_NT" endlocal
:end

11
oh-package.json5 Normal file
View File

@ -0,0 +1,11 @@
{
"license": "ISC",
"devDependencies": {
"@ohos/hypium": "1.0.6"
},
"name": "photos",
"description": "example description",
"repository": {},
"version": "1.0.0",
"dependencies": {}
}

View File

@ -1,17 +0,0 @@
{
"name": "photos",
"version": "1.0.0",
"ohos": {
"org": "huawei",
"buildTool": "hvigor",
"directoryLevel": "project"
},
"description": "example description",
"repository": {},
"license": "ISC",
"dependencies": {
"@ohos/hypium": "1.0.2",
"@ohos/hvigor-ohos-plugin": "1.4.0",
"@ohos/hvigor": "1.4.0"
}
}

View File

@ -1,17 +1,13 @@
{
"name": "photos",
"description": "",
"version": "1.0.0",
"ohos": {
"org": "huawei",
"buildTool": "hvigor",
"directoryLevel": "module"
},
"dependencies": {
"@ohos/common": "../../common",
"@ohos/browser": "../../feature/browser",
"@ohos/editor": "../../feature/editor",
"@ohos/formAbility": "../../feature/formAbility",
"@ohos/browser": "../../feature/browser",
"@ohos/thirdselect": "../../feature/thirdselect",
"@ohos/formAbility": "../../feature/formAbility",
"@ohos/common": "../../common",
"@ohos/timeline": "../../feature/timeline"
}
}
}

View File

@ -1,78 +0,0 @@
{
"name": "photos",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@ohos/browser": {
"version": "file:../../feature/browser",
"requires": {
"@ohos/common": "file:../../common"
},
"dependencies": {
"@ohos/common": {
"version": "file:../../common"
}
}
},
"@ohos/common": {
"version": "file:../../common"
},
"@ohos/editor": {
"version": "file:../../feature/editor",
"requires": {
"@ohos/common": "file:../../common"
},
"dependencies": {
"@ohos/common": {
"version": "file:../../common"
}
}
},
"@ohos/formAbility": {
"version": "file:../../feature/formAbility",
"requires": {
"@ohos/common": "file:../../common"
},
"dependencies": {
"@ohos/common": {
"version": "file:../../common"
}
}
},
"@ohos/thirdselect": {
"version": "file:../../feature/thirdselect",
"requires": {
"@ohos/browser": "file:../../feature/browser",
"@ohos/common": "file:../../common"
},
"dependencies": {
"@ohos/browser": {
"version": "file:../../feature/browser",
"requires": {
"@ohos/common": "file:../../common"
},
"dependencies": {
"@ohos/common": {
"version": "file:../../common"
}
}
},
"@ohos/common": {
"version": "file:../../common"
}
}
},
"@ohos/timeline": {
"version": "file:../../feature/timeline",
"requires": {
"@ohos/common": "file:../../common"
},
"dependencies": {
"@ohos/common": {
"version": "file:../../common"
}
}
}
}
}