Webpack
Webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, but it is also capable of transforming, bundling, or packaging just about any resource or asset. It is made primarily for JavaScript, but it can transform front-end assets such as HTML, CSS, and images if the corresponding loaders are included.
Webpack start
- Download the latest theme source from the marketplace
- Download and install Node.js from Nodejs. The suggested version to install is
14.16.x LTSor up to the latest available version. - Unpack/extract the downloaded theme
- Start a command prompt window or terminal and change directory to
[unpacked path]/dashly/theme/.cd dashly/theme/ - Install the latest NPM:
npm install -g npm@latest - Install the dependencies:
npm install - Run the build task to build the theme. The command below will compile all the assets (Sass, JavaScript, media) to the
dashly/theme/dist/assets/folder and the HTML/Handlebars files to thedashly/theme/dist/folder.or open a local dev server to make changes on the theme. This command starts the localhost server and the webpack real-time watcher. This task watches thenpm run buildSass, JavaScript and HTML/Handlebarsfiles and automatically recompiles whenever the source files are changed.npm run start