This guide provides developers with details on how to build, test, and contribute to Rslidy, the lightweight HTML presentation framework.
To install and build Rslidy from source, the repository must first be cloned. This can be done using SSH (recommended) or HTTPS. Using SSH (requires being logged in to GitHub and having an SSH key configured):
git clone git@github.com:tugraz-isds/rslidy.git
Alternatively, the repository can be cloned using HTTPS:
git clone https://github.com/tugraz-isds/rslidy.git
After cloning the repository, go to the rslidy/ directory and
install the project dependencies with:
pnpm install
Rslidy uses Gulp as a task runner and Webpack as a module bundler.
Together, these tools define a reproducible build pipeline that covers
TypeScript compilation, asset processing, bundling, optimisation,
minification, and local development support. All build logic is defined
in the gulpfile.js file.
All Gulp tasks should be executed via PNPM using pnpm exec gulp <task>.
While using the build and watch tasks is usually sufficient during
development, these tasks are composed of several smaller steps. The
complete set of Gulp tasks defined in the gulpfile.js is as follows:
-
clean
Removes build artifacts, including the TypeScript output insrc/ts/build/and the compiledbuild/directory. -
transpile
Transpiles all TypeScript source files into JavaScript and generates corresponding declaration files. -
webpack
Bundles the transpiled JavaScript into therslidy.jsfile and generates distributable builds for ESM, CommonJS, and UMD formats. -
css
Concatenates all CSS source files into a singlerslidy.cssfile. -
icons
Optimises SVG files located insrc/icons/and generates the correspondingicon-definitions.tsfile used by the TypeScript codebase. -
html
Copies example and test HTML files, including stress tests, into the build directory. -
minifyjs
Produces minified JavaScript bundles for all module formats. -
minifycss
Produces a minified version of the main CSS file and streams updates into BrowserSync during development. -
compress
Generates compressed variants of the minified JavaScript files to evaluate distribution size. -
copy
Copies the default ESM build and CSS files into all example and test folders. -
build
Executes the full build pipeline in a defined order. This includes a pre-step that updates version strings in source files before compilation, bundling, minification, compression, and copying. -
watch
Starts a local development server using BrowserSync and automatically rebuilds and reloads the browser when source files change. A specific slide deck can be served using the--slide(or-s) flag. -
updateVersionStringsUpdates version identifiers insrc/folder by replacingRslidy Version X.Y.Zand__VERSION__with the define version in thepackage.jsonfile.
After building, artifacts are stored in the build/library/ directory:
esm/rslidy.jsandesm/rslidy.min.js→ ES Modulescjs/rslidy.jsandcjs/rslidy.min.js→ CommonJS Modulesumd/rslidy.jsandumd/rslidy.min.js→ Universal Module Definition
Additionally, rslidy.css and rslidy.min.css are placed in the
library/ folder.
Also, the rslidy.min.js file from the ESM build is automatically
copied into every example and test folder, since it is the
recommended standard.
ESM modules must be served over HTTP(S) (for example via a local server or live-server) and will not work if opened directly from a folder in a browser. You can quickly start a local server in any directory using Python:
python3 -m http.server 8000
Then open your browser at:
http://localhost:8000
Rslidy does not rely on external runtime dependencies. The presentation
framework itself is distributed as prebuilt JavaScript and CSS files.
All additional packages are required exclusively for development,
building, and testing, and are defined in the package.json file.
These development dependencies support the build pipeline and can be categorised by their primary purpose:
-
Node.js, PNPM, and Gulp
Provide the execution environment and task runner used to define and orchestrate the build pipeline. -
TypeScript and gulp-typescript
Used to transpile the TypeScript source code into JavaScript and to generate declaration files for development and tooling support. -
Webpack and webpack-stream
Bundle the transpiled JavaScript modules into distributable builds in ESM, CommonJS, and UMD formats. -
BrowserSync
Provides a local development server and enables live reloading during thewatchtask whenever source files are modified. -
File system and utility tools
Packages such asdel,merge2,gulp-concat,gulp-rename, andgulp-replacesupport file management tasks, including cleaning build directories, concatenating assets, renaming outputs, and applying textual transformations. -
Minification and compression tools
gulp-terserandgulp-uglifycssare used to generate minified JavaScript and CSS files.gulp-gzipandgulp-brotliare used to create compressed versions and to evaluate compressed file sizes. -
Icon and encoding utilities
utf-8-validatesupports validation of encoded assets used in the build process. -
Command-line argument handling
yargsis used to parse command-line arguments passed to Gulp tasks, for example when specifying a custom slide deck via the--slideoption.**