From e99aefb50ca63e2dbcc95841efbb53cea90151d8 Mon Sep 17 00:00:00 2001 From: Tim Baumann Date: Sat, 23 Sep 2017 22:02:01 +0200 Subject: Add compile step that bundles and compresses JS files (#684) * Add compile step that bundles and compresses JS files Also, manage dependencies on third-party JS libraries using NPM. * Compile JS from TypeScript * Enable 'noImplicitAny' in TypeScript * QuickJump: use JSX syntax * Generate source maps from TypeScript for easier debugging * TypeScript: more accurate type * Separate quick jump css file from ocean theme --- haddock-api/resources/html/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 haddock-api/resources/html/README.md (limited to 'haddock-api/resources/html/README.md') diff --git a/haddock-api/resources/html/README.md b/haddock-api/resources/html/README.md new file mode 100644 index 00000000..0552f6fd --- /dev/null +++ b/haddock-api/resources/html/README.md @@ -0,0 +1,16 @@ +# Compiling + +* Install [node](https://nodejs.org/) and [npm](https://www.npmjs.com) +* Run `npm install` and `npm install gulp-cli -g` in this directory. +* Run `gulp` in this directory. This rebuilds the minified JS files. + +# Development and manual testing + +Generate Haddock docs for some Haskell project. Start an HTTP server in the Haddock docs directory. +(The `file://` protocol doesn't work since it doesn't allow AJAX requests.) + +After each change to the TypeScript sources, compile and copy the generated files (JS and sourcemaps for better debugging) to the Haddock directory: + +``` +gulp && cp *.min.js path-to/generated-haddock-docs && cp *.js.map path-to/generated-haddock-docs +``` \ No newline at end of file -- cgit v1.2.3