DOCUMENTS 5 Project Template using Typescript
This template is currently a WIP. If you know what you're doing you can already use it!
This template is meant to be used with Visual Studio Code and Otris's Plugin for JANUS based Applications.
- Clone:
git clone https://github.com/FabianTe/documents5-ts-project-template - (Optional but recommended) Remove the original remote:
git remote rm origin - Install all workspace recommended plugins which include Otris's plugin.
- Install dependencies
npm i. - Download the lates PortalScriptings from here to
./typings/server. Alternatively you can download them with a right click on the server folder and selecting Install Intellisense Files if you have Otris's extension installed.
Alternatively you could also delete the hidden .git folder and use git init later if you want to start completely clean.
The most important files are inside the ./src folder:
./src/servercontains the Typescript scripts that will be compiled into PortalScripting compatible scripts../src/clientcontains everything that you would like to serve on client side via ext. res., for example the html / css an iframe could server via a gadget or a script return of typehtml
There are the following gulp options available you can customize in ./gulpfile.js:
build--client- Call all gulpfiles that build the client modules--server- Build all server scripts (PortalScripting)
deploy--client- Copy client files to ext. res and so on.--server- Upload PortalScripts to DOCUMENTS server
These commands can be run like this from the project root: gulp [build|deploy] [options] where options can be those in the list above.
- Call
gulp build --serverin project root. - Upload script from
./build/server
Not every build option is implemented right now! Feel free to contribute to this repository :)