The package to accelerate development on WSH (Windows Script Host). Works in a pure Windows environment.
Works on JScript in Windows.
(1) Create a directory of your WSH project.
D:\> mkdir MyWshProject
D:\> cd MyWshProject
(2) Download this ZIP and unzip or Use the following git
command.
> git clone https://github.com/tuckn/WshBasicPackage.git ./WshModules/WshBasicPackage
or
> git submodule add https://github.com/tuckn/WshBasicPackage.git ./WshModules/WshBasicPackage
(3) Create your JScript (.js) file. For Example,
D:\MyWshProject\
├─ MyScript.js <- Your JScript code will be written in this.
└─ WshModules\
└─ WshBasicPackage\
└─ dist\
└─ bundle.js
I recommend JScript (.js) file encoding to be UTF-8 [BOM, CRLF].
(4) Create your WSF packaging scripts file (.wsf).
D:\MyWshProject\
├─ Run.wsf <- WSH entry file
├─ MyScript.js
└─ WshModules\
└─ WshBasicPackage\
└─ dist\
└─ bundle.js
And you should include .../dist/bundle.js into the WSF file. For Example, The content of the above Run.wsf is
<package>
<job id = "run">
<script language="JScript" src="./WshModules/WshBasicPackage/dist/bundle.js"></script>
<script language="JScript" src="./MyScript.js"></script>
</job>
</package>
I recommend this WSH file (.wsf) encoding to be UTF-8 [BOM, CRLF].
Awesome! This WSH configuration allows you to use the following functions in JScript (.\MyScript.js).
Now, your JScript can use many helper functions that are defined in the following modules.
- tuckn/WshPolyfill
- tuckn/WshUtil
- tuckn/WshPath
- tuckn/WshOS
- tuckn/WshFileSystem
- tuckn/WshProcess
- tuckn/WshChildProcess
- tuckn/WshNet
- tuckn/WshModeJs
See all specifications here and also below.
- WshPolyfill
- WshUtil
- WshPath
- WshOS
- WshFileSystem
- WshProcess
- WshChildProcess
- WshNet
- WshModeJs
- WshCommander
- WshConfigStore
- WshDotEnv
- WshLogger
MIT
Copyright (c) 2020 Tuckn