Migrate Gulp to Webpack
Although Gulp is still a supported build tool at this moment, it suffers from a large number of problems
- Dependencies must be hardcoded in the build file.
- Explicit tasks must be created for all kind of files.
- All kind of subprocesses must be used to finally get files ready for the browser.
- It is slow... Terribly slow.
Introducing Webpack. Webpack is specially created for bundling assets for usage in the browser. This branch introduces the whole Quizzard Front-end build using Webpack.
This branch introduces the following changes:
- A refresh and update of all front-end dependencies, including the newest PDFjs.
- The front-end code and all dependencies are bundled using Webpack. This also includes the less translation to CSS.
- The ESLint validation task is now performed by
npm run validate
, which runs ESLint CLI. - Building the documentation is now done by the asciidoctor CLI with
npm run doc
. - The build lifecycles are updated. NodeJS and NPM are now downloaded in the
initialize
lifecycle of Maven. The front-end is compiled during theprocess-resources
lifecycle and the documentation is now only built as part of theprepare-package
lifecycle, so it will no longer be built for tests! - Webpack can easily be executed by running
npm run dev
ornpm run build
. This can be done directly from IntelliJ by using the green play button on the corresponding lines of thepackage.json
file. - Contains extra optimisations for CI builds, as will be needed to make effective use of the efforts of !142 (merged) and to fully close issue #21 (closed)
Merging this branch would close #20 (closed) and #17 (closed) (and after merging !142 (merged) also #21 (closed))
Edited by Remco de Man