Warp-menu
Inside this repository lies the code for the Cloudogu warp-menu used to switch between single Dogus in the browser.
Quick start
- Install dependencies with npm
npm install
(Node v12.22.9 works) - Execute gulp
gulp
- Copy the target directory to
/var/www/warp
- Enable mod_substitute with
a2enmod substitute
-
Create the following substitute configuration:
cat > /etc/apache2/conf.d/substitute.conf << EOF <Location /> AddOutputFilterByType SUBSTITUTE text/html Substitute "s|</body>|<script \"text/javascript\">(function(){var s = document.createElement('script');s.type = 'text/javascript';s.async = true;s.src = '/warp/warp.js';var x = document.getElementsByTagName('script')[0];x.parentNode.insertBefore(s, x);})();</script></body>|in </Location> EOF
Development
- Install dependencies with npm
npm install
(Node v12.22.9 works) - start web server with livereload on port 8000 with
gulp serve
- execute jshint by typing
gulp jshint
- release build with
gulp