Harness the power of pre-processed CSS and minified JS in your theme or plugin, without any complicated installs or build tools. Simply tell WP Compiler where to find your source files and where to put the compiled results, then throw your install into Dev Mode. WP Compiler watches your source folders for you, and recompiles your CSS and JS on any file change. WP Compiler supports both SCSS and LESS precompilers for CSS, to suit anyone’s preference.
- Download the plugin file to your system and unzip it
- Using an FTP program, or your hosting control panel, upload the unzipped plugin folder to your WordPress installationís wp-content/plugins/ directory
- Activate the plugin from the Plugins menu within the WordPress admin
- Go to Settings -> Compiler Settings
- Set the paths to your source CSS and JS files and the targets they compile to
- Turn on Dev Mode and get coding!
The easiest way to compile your JS is to store it all in a single directory. If you set your compilation source to be the directory path, all JS files in the directory will be combined and minified.
WP Compiler supports
.manifestfile. for clarity, lines beginning with a hash symbol (#) are treated as comments.
Here is an example of a manifest file:
# all paths are relative to the current manifest file
# First we are going to load specific files that have to come first
# Now let’s load a sub-manifest
# Finally, let’s load a folder whose contents
# don’t need to be in a specific order
- What about AutoPrefixing, JS Transpiling, NPM includes, Require.js, Custom Task Runners or ?
Unfortunately, there is a limit to how many of the immense number of node.js build processes available can be replicated in native PHP. Please let us know about which features you’d most like to see tackled next.
Contributors & Developers
“WP Compiler” is open source software. The following people have contributed to this plugin.Contributors
- Initial Release