public class Replace extends AssetProcessor
Replace strings in files while bundling them.
assets {
fileset {
home: ...
}
pipeline {
dist: [replace]
}
replace {
process.env.NODE_ENV: "\"production\""
"\"development\"": "\"production\""
}
}
| Constructor and Description |
|---|
Replace() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
matches(MediaType type) |
String |
process(String filename,
String source,
com.typesafe.config.Config conf,
ClassLoader loader)
Method that processes the provided source and returns the processed contents, with access to the ClassLoader.
|
excludes, get, optionspublic boolean matches(MediaType type)
matches in class AssetProcessorpublic String process(String filename, String source, com.typesafe.config.Config conf, ClassLoader loader)
AssetProcessorprocess in class AssetProcessorfilename - name of the filesource - contents of the fileconf - application configurationloader - loader to use if any additional files need to be loaded from diskCopyright © 2018. All rights reserved.