props
Replace ${}
expressions with application properties.
Make sure you’ve already set up the assets module in your project!
usage
assets {
fileset {
home: ...
}
pipeline {
dev: [props]
dist: [props]
}
}
example
application.conf:
foo = bar
app.js:
(function (foo) {
console.log(foo);
})("${foo}")
prints:
bar
options
delims
The delims
options allow you to change the default delimiters ${ }
:
assets {
...
props {
delims: [<%, %>]
}
}
ignoreMissing
Unresolved properties results in NoSuchElement
exception. Setting ignoreMissing
skip missing properties:
assets {
...
props {
ignoreMissing: true
}
}
see also
css processors
-
autoprefixer: parse CSS and add vendor prefixes to CSS rules via autoprefixer.
-
props: replace application properties in CSS files.
-
clean-css: minify css.
-
csslint: check and validate css rules.
-
sass: Sass support from Java Sass Compiler (libsass).
-
svg-sprites: Generates SVG and CSS sprites with PNG fallbacks via dr-svg-sprites.
-
svg-symbol: Generates SVG and CSS sprites using svg
symbols
. -
yui-css: YUI CSS optimizer.
js processors
-
props: replace application properties in JavaScript files.
-
jscs: JavaScript code style checker.
-
jshint: JavaScript linter, helps to detect errors and potential problems in code..
-
ng-annotate: Add, remove and rebuild AngularJS dependency injection annotations.
-
closure-compiler: Google JavaScript optimizer and minifier.
-
uglify: uglify.js optimizer.
-
replace: replace strings in files while bundling them.
-
requirejs: r.js optimizer.
-
yui-js: YUI JS optimizer.