props

props

Replace ${} expressions with application properties.

Make sure you already setup 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

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..

  • babel: Ecma6 now via Babel.

  • rollup: rollup.js the next-generation ES6 module bundler.

  • ng-annotate: Add, remove and rebuild AngularJS dependency injection annotations.

  • closure-compiler: Google JavaScript optimizer and minifier.

  • uglify: uglify.js optimizer.

  • requirejs: r.js optimizer.

  • yui-js: YUI JS optimizer.

Share