It should be ensured that all scripts listed in https://github.com/easydigitaldownloads/easy-digital-downloads/tree/test/webpack/assets/js are loaded on their necessary pages.
Webpack is currently the bundler of choice for Gutenberg (all hail) and the majority of the principles for how it is being used in this PR are based off that. Webpack works with standard Node packages which means any of the existing Grunt-wrapper packages can easily be converted to their native libraries in the future (removing dependencies).
To make this implementation easier to test and to avoid changing the development process of the repository further, minified scripts and sourcemaps have been committed to this branch. This means if a user downloads the repository they will have access to a working plugin because all scripts are included. The committed scripts are automatically in development mode and their sourcemaps will allow for easy user debugging.
In my opinion it would be more ideal in the future to remove these scripts from the repository and require developers who work directly from the repository to run the necessary build scripts. This will ensure a better developer experience (cleaner diffs, up to date scripts, and locked dependencies) while ensuring the repository remains a development-only resource. Users will still be able to download built packages from tagged releases.
tl;dr Everything should work exactly how it was before. This creates no functional or visual changes.
A `npm run package-plugin` command will run a Webpack build and the rest of the Grunt tasks to create a .zip
…ingle file for keeping compatibility until further testing.
…r safely using jQuery.
…igital-downloads into test/webpack
…r hook. Also rename jQuery Credit Card Validator to camelCase as needed by some case-sensitive environments. This ensures that webpack'ed scripts are adaptable and enqueued in the places and ways that are the most predictable.
* Move custom Chosen styling into `edd-admin-chosen.css` * Revert camelCase of Credit Card Validator JS - enqueue process abstracts this * Add jQuery Flot Time back in for back-compat support * Remove suffix logic from Graph classes (these always use minified versions) * Introduce `edd_doing_script_debug()` to abstract `SCRIPT_DEBUG` constant check * Update Webpack and Grunt config files as needed See #6977.