@echo off
Set "Rms_sourcepath=%~dp0"
Set "Rms_codebuilder=%rms_sourcepath%bin\tool\codebuilder\chm. Tool.CodeBuilder.exe "
Set "Rms_uglifyjs=%rms_sourcepath%bin\tool\uglifyjs.cmd"
Set "Rms_enumcs=%rms_sourcepath%pdw.afe.common\enums\autoenum.cs"
Set "RMS_MODELCS=%RMS_SOURCEPATH%PDW. AFE. Models\datamodel "
Set "RMS_GRIDJS=%RMS_SOURCEPATH%PDW. Scm. Web\resource\scripts\page\common\grid.js "
Set "RMS_FORMJS=%RMS_SOURCEPATH%PDW. Scm. Web\resource\scripts\page\common\form.js "
Set "RMS_ENUMJS=%RMS_SOURCEPATH%PDW. AFE. Web\resource\src\data\enum-externd.js "
Set "RMS_TABLEJS=%RMS_SOURCEPATH%PDW. Scm. Web\resource\scripts\page\common\tables.js "
echo Generate AutoEnum.cs file start
"%rms_codebuilder%" Enumcs "%rms_enumcs%" PDW.AFE.Common.Enums
Echo Generated AutoEnum.cs file complete
echo Generate Datamodel file start
"%rms_codebuilder%" Modelcs "%rms_modelcs%" PDW. AFE. Models.datamodel
Echo Generated Datamodel file complete
REM echo Generate JS script start
REM "%rms_codebuilder%" Gridjs%rms_gridjs%
REM "%rms_codebuilder%" Formjs%rms_formjs%
"%rms_codebuilder%" Enumvuejs%rms_enumjs%
REM "%rms_codebuilder%" Tablejs%rms_tablejs%
REM echo Generate JS script complete
REM Echo starts compressing the business module JS script
REM cd/d "%RMS_SOURCEPATH%PDW. Scm. Web\resource\scripts\page "
REM copy. \core\extjs\ext-lang-zh_cn.js+. \core\extjs\ux\data\pagingmemoryproxy.js+. \core\extjs\ux\tabclosemenu.js+. \core\extjs\ux\form\multiselect.js+. \core\extjs\ux\util\hashmap.js+. \core\jquery\jquery.min.js+. \core\arttemplate\template.js+. \core\highcharts\highcharts.js+resourcemanager.js+validatorcustom.js+common\md5.js+common\tabclosemenu.js+ Main.js+moduletemplate\panelbase.js+moduletemplate\panelgrid.js+moduletemplate\windowbase.js+moduletemplate\ windowbasenew.js+moduletemplate\windowform.js+moduletemplate\casebase.js+moduletemplate\businesscasebase.js+ moduletemplate\meberrptbase.js+moduletemplate\membercasebase.js+moduletemplate\membercasepanel.js+ moduletemplate\radiocolumn.js+moduletemplate\radiogroupcolumn.js+moduletemplate\checkboxgroupcolumn.js+common\ itemselecter.js+common\autocomplete.js+common\buttonextend.js+common\combogrid.js+common\combogridremote.js+ common\formcommon.js+common\inputcommon.js+common\pdwwidget.js+common\recyclecontrol.js+common\enumexternd.js+ Common\filtercontrol.js+common\filtergridselect.js+common\form.js+common\grid.js+common\tables.js+common\ Filterconfig.js+multimerchant\+storemanagement\ PFE. Util.js/b
REM call "%rms_uglifyjs%" PFE. Util.js-m-O PFE. Util.min.js
REM Echo End compression compression Business Module JS script
REM Echo starts compressing the login module JS script
REM copy common\enumexternd.js+login.js+resourcemanager.js+common\formcommon.js PFE. Login.js/b
REM call "%rms_uglifyjs%" PFE. Login.js-m-O PFE. Login.min.js
REM Echo End Compression Login Module JS script
: End
----------------------------------------
@echo off
echo *
echo *
Echo * *. Check ENV
Echo. NPM Update
Echo. AFE Build
Echo. AFE Dev
Echo. GMS Build
Echo *6. GMS Dev
echo *
echo *
choice/c:123456/m "Please enter the digital selection function"
if%errorlevel% = = 1 goto check
if%errorlevel% = = 2 Goto npmupdate
if%errorlevel% = = 3 Goto afebuild
if%errorlevel% = = 4 Goto Afedev
if%errorlevel% = = 5 Goto gmsbuild
if%errorlevel% = = 6 Goto Gmsdev
: Check
REM Check whether administrator rights, may not be allowed, if prompted, please comment the following code
:: If "%cd%" = = "%systemroot%\system32" (Echo Check admin rights complete) Else (goto error)
CD/D%~dp0
Echo.
echo Check check the Package.json in PDW.GMS.Web.
If not exist Package.json (Mklink Package.json Public\package.json) Else (@echo Normal)
Echo.
Echo Check node environment
If not exist node_modules NPM install
Echo.
Echo checks the node_modules in PDW.AFE.Web.
If not exist PDW. AFE. Web\resource\node_modules (mklink/d PDW. AFE. Web\resource\node_modules. \.. \node_modules) Else (@echo Normal)
Echo.
echo, check the components in PDW.AFE.Web.
If not exist PDW. AFE. Web\resource\src\components (mklink/d PDW. AFE. Web\resource\src\components. \.. \.. \webcomponents) Else (@echo Normal)
Echo.
Echo Check the AFE framework in the PDW.AFE.WEB
If not exist PDW. AFE. Web\resource\src\afe (mklink/d PDW. AFE. Web\resource\src\afe. \.. \.. \public\afe) Else (@echo Normal)
Echo.
Echo. Check the node_modules in PDW.GMS.Web.
If not exist PDW. Gms. Web\resource\node_modules (mklink/d PDW. Gms. Web\resource\node_modules. \.. \node_modules) Else (@echo Normal)
Echo.
echo, check the components in PDW.GMS.Web.
If not exist PDW. Gms. Web\resource\src\components (mklink/d PDW. Gms. Web\resource\src\components. \.. \.. \webcomponents) Else (@echo Normal)
Echo.
Echo Check the AFE framework in the PDW.GMS.WEB
If not exist PDW. Gms. Web\resource\src\afe (mklink/d PDW. Gms. Web\resource\src\afe. \.. \.. \public\afe) Else (@echo Normal)
Echo.
echo Check Check the PDW.AFE.Web. BABELRC
If not exist PDW. AFE. WEB\RESOURCE\.BABELRC (Mklink PDW. AFE. WEB\RESOURCE\.BABELRC. \.. \PUBLIC\.BABELRC) Else (@echo Normal)
Echo.
echo Check Check the PDW.GMS.Web. BABELRC
If not exist PDW. Gms. WEB\RESOURCE\.BABELRC (Mklink PDW. Gms. WEB\RESOURCE\.BABELRC. \.. \PUBLIC\.BABELRC) Else (@echo Normal)
Echo.
echo Check Check check the webcomponents in B. BABELRC
If not exist WEBCOMPONENTS\.BABELRC (Mklink WEBCOMPONENTS\.BABELRC. \PUBLIC\.BABELRC) Else (@echo Normal)
Echo.
echo Check Check the PDW.AFE.Web. Editorconfig
If not exist PDW. AFE. Web\resource\.editorconfig (Mklink PDW. AFE. Web\resource\.editorconfig. \.. \public\.editorconfig) Else (@echo Normal)
Echo.
echo Check Check the PDW.GMS.Web. Editorconfig
If not exist PDW. Gms. Web\resource\.editorconfig (Mklink PDW. Gms. Web\resource\.editorconfig. \.. \public\.editorconfig) Else (@echo Normal)
Echo.
echo Check Check the webcomponents. Editorconfig
If not exist Webcomponents\.editorconfig (Mklink webcomponents\.editorconfig. \public\.editorconfig) Else (@echo Normal)
Echo.
echo Check Check the PDW.AFE.Web. eslintrc.js
If not exist PDW. AFE. Web\resource\.eslintrc.js (Mklink PDW. AFE. Web\resource\.eslintrc.js. \.. \public\.eslintrc.js) Else (@echo Normal)
Echo.
echo Check Check the PDW.GMS.Web. eslintrc.js
If not exist PDW. Gms. Web\resource\.eslintrc.js (Mklink PDW. Gms. Web\resource\.eslintrc.js. \.. \public\.eslintrc.js) Else (@echo Normal)
Echo.
echo Check check the Package.json in PDW.AFE.Web.
If not exist PDW. AFE. Web\resource\package.json (Mklink PDW. AFE. Web\resource\package.json. \.. \public\package.json) Else (@echo Normal)
Echo.
echo Check check the Package.json in PDW.GMS.Web.
If not exist PDW. Gms. Web\resource\package.json (Mklink PDW. Gms. Web\resource\package.json. \.. \public\package.json) Else (@echo Normal)
Goto END
: Npmupdate
CD/D%~dp0
NPM Update
Goto END
: Afebuild
CD%~DP0\PDW. AFE. Web\resource
NPM Run Build & Pause
Goto END
: Afedev
CD%~DP0\PDW. AFE. Web\resource
NPM Run Dev
Goto END
: Gmsbuild
CD/D%~dp0
CD%~DP0\PDW. Gms. Web\resource
NPM Run Build & Pause
Goto END
: Gmsdev
CD%~DP0\PDW. Gms. Web\resource
NPM Run Dev
Goto END
: Error
Echo.
Echo.
echo Please execute the script with administrator privileges
Echo.
Echo.
: End
@pause
Batch Scripting Learning