runopencode / dm-js-compiler-plugin
dmJsCompilerPlugin - JavaScript compiler for Diem Extended project
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Type:symfony1-plugin
Requires
- composer/installers: dev-master
- runopencode/dm-common-helpers-plugin: dev-master
This package is auto-updated.
Last update: 2022-02-01 12:25:45 UTC
README
Author: TheCelavi
Version: 0.5
Stability: Stable
Date: June 24th, 2013
Courtesy of Run Open Code
License: Free for all
dmJsCompilerPlugin for Diem Extended is JavaScript compiler for Diem Extended projects. For now, it can be used via task from console, while integration with response object is work in progress.
The following commands are available:
php symfony js:compile
orphp symfony jsc
- Compiles the JavaScript files for project. If, per example, there is file calledexample.js
it will be compiled and stored at same directory under the nameexample.min.js
(depending on service settings, seeservices.yml
).php symfony js:delete-compiled
orphp symfony js:delc
- Deletes compiled JavaScript files from project. It does that according the file names (if in directory existsexample.min.js
orexample.compiled.js
- seeconfig.yml
- andexample.js
- the conclusion is that JavaScript file is compiled JavaScript file, so it will be removed).php symfony js:delete-source
- Deletes JavaScript source files from the project. Ought to be used ONLY in production server. Backup your project before using this command.
There are various settings for each task. They are explained here:
Settings for tasks:
###js:compile
:
plugin
: You can set which plugin will be searched for JavaScript files. Default is null, so whole project is searched for JavaScript files. Several predefined constant exists:- web: it will search
web/js
dir for JS files - core: searches in
diem-extended/dmCorePlugin/web
- admin: searches in
diem-extended/dmAdminPlugin/web
- front: searches in
diem-extended/dmFrontPlugin/web
- diem: searches in
diem-extended/dmAdminPlugin/web
,diem-extended/dmCorePlugin/web
,diem-extended/dmFrontPlugin/web
- plugins: searches in
plugins
dir - anyNameOfPlugin: searches in
project/plugins/anyNameOfPlugin
- NOTE: You can provide several search locations separating them with coma, example:
php symfony js:compile --plugin=web,front
- web: it will search
enabled-plugins-only
: When searching in plugins dir for plugins, should only enabled plugins in configuration be considered, default is falseforce
: It will force compiler to compile JavaScript files regardless of cache, default is falsewrite-empty
: If file is empty, or output is empty, it will be written anyway. Default is false.preserve-credits
: Should JavaScript comments before code be preserved or not in compiled JavaScript file, default is false. This does not work - I can not figure out how to do this.compiler-options
- you can pass in some compiler options asopt1:val1,opt2,val2
depending on used compiler. For now, only one compiler is implemented, see its docs for settings.
js:delete-compiled
plugin
: Same as forjs:compile
enabled-plugins-only
: Same as forjs:compile
js:delete-source
plugin
: Same as forjs:compile
enabled-plugins-only
: Same as forjs:compile