Before you start
Installing a minification tool
- To install UglifyJS
Open the built-in JetBrains Rider Terminal () and type
npm install uglify-jsor
npm install uglify-js@<version>. Learn more from UglifyJS Official website.
- To install YUI Compressor
Follow the instructions on YUI Compressor Official website.
- To install Closure Compiler
Follow the instructions on Closure Compiler Official website.
Integrating a minification tool with JetBrains Rider
To use integration in JetBrains Rider, you need to configure minifier as a File Watcher. For each supported minifier, JetBrains Rider provides a predefined File Watcher template. Predefined File Watcher templates are available at the JetBrains Rider level. To run a minifier in a project, create a project-specific File Watcher based on the relevant template.
- Open the File Watchers page by choosing for Windows and Linux or for macOS.
- Click and choose the tool-specific File Watcher template from the list:
- In the New Watcher Dialog that opens, specify the path to the relevant executable file or
.jararchive in the Program field:
- Optionally, customize the behaviour of the File Watcher.
- Make sure the check box next to the File Watcher is selected, which indicates that the File Watcher is enabled.
Running a minification tool