이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

WP Compiler

설명

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.

When you’re ready to launch a new site, just turn off Dev Mode, and your styles and javascript will be compiled & minimized and comments & source maps will be removed. With Dev mode disabled, Compiler will stop watching source directories, so there is no effect on site performance, but you can still apply a quick change at any time, by clicking the compile button in the admin toolbar.

WP Compiler relies on scssphp, lessphp, and minify.
Specific issues with the underlying compilation libraries should be submitted to their respective developers.

스크린샷

  • The admin bar interface of WP Compiler
  • The admin bar interface of WP Compiler, in dev mode
  • The settings page

설치

  1. Download the plugin file to your system and unzip it
  2. Using an FTP program, or your hosting control panel, upload the unzipped plugin folder to your WordPress installations wp-content/plugins/ directory
  3. Activate the plugin from the Plugins menu within the WordPress admin
  4. Go to Settings -> Compiler Settings
  5. Set the paths to your source CSS and JS files and the targets they compile to
  6. Turn on Dev Mode and get coding!

FAQ

How can I combine multiple JavaScript files?

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.

How can I make sure JavaScript files are minified in a specific order?

WP Compiler supports .manifest files for JavaScript. This is a custom file format in which each line consists of a relative file path to a JS file, a relative path to a directory containing JS, or a relative path to another .manifest file. for clarity, lines beginning with a hash symbol (#) are treated as comments.

Here is an example of a manifest file:

# <js.manifest>
# This is a sample JavaScript manifest file for WP Compiler
# all paths are relative to the current manifest file
# First we are going to load specific files that have to come first
test-script.js
test-script2.js
# Now let’s load a sub-manifest
partials/js.manifest
# Finally, let’s load a folder whose contents
# don’t need to be in a specific order
external-scripts/

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.

후기

2019년 9월 23일
I was looking for a way to compile scss directly on the server and have a compilation there without installing Gulp on the server. From today I don't have to watch and send files locally. Plugin works very good, Thanks!
2019년 9월 21일
I use this plugin successfully. Good job! It has a wide application for me. I have only one problem - if I use 'production mode', sass is compiled and compressed correctly, but JS (using js.manifest) generates an empty file. I will note that in the "development mode", everything works fine! I look forward to new releases and hope to implement transpilation from ES6 to ES5 in the near future 🙂
2019년 9월 17일
I used this with the understrap theme to compile a customized bootstrap along with my own SCSS. This plugin is focused om it's task to help you during development with the excellent auto-compilation when you turn on DEV MODE. You can just forget about it and edit your files and they will be compiled on save. The plugin has no impact on a production site. Thank You!
2019년 7월 22일
I have been manually compiling my LESS style-sheets for a few years now, then tried a few other automatic compilers from other sources with no luck. Many other methods are slow, and do not include the "Dev Mode" which this plugin includes. This plugin is simple to use, and does what it should without error. The Dev Mode feature is very nice when you need to test style-sheet changes to live site without deploying a staging site. Thank you again!
2019년 7월 6일
I use UIKit, and this plugin makes it incredibly easy to incorporate the .less source files into my own stylesheets and compile it all on the fly when changes are made. Thank you for making a great plugin.
2019년 3월 18일
A very useful tool for developers. Helps you keep your js/css clean and structured into files, for easy access. Works like a charm! Exactly what I was looking for. A true time saver. The .manifest feature is golden.
모든 6 평가 읽기

기여자 & 개발자

“WP Compiler”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “WP Compiler”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.0

  • Initial Release