parcel-plugin-sjt
v1.0.0
Published
Parcel plugin for .sjt files
Maintainers
Readme
Parcel Plugin SJT
Description
What this plugin do:
- transform
.sjttemplate files to JSON object using environment variables - output a
.jsfile that exports the previous JSON object
More about SJT files here.
Example:
src/demo.sjt input file :
{
"abc": [
{
"$keepIf": "var1 is keepFirst",
"$replaceByValue": "first"
},
{
"$dropIf": "var1 is keepFirst",
"$replaceByValue": "second"
}
],
"def": {
"$replaceByVariable": "var2"
}
}build command:
var1=keepSecond var2=123 parcel build src/demo.sjtoutputing the result:
console.log(require('./dist/demo.js')){
"abc": [
"second"
],
"def": "123"
}About
author: Clément Saccoccio
contact: [email protected]
licence: GPL-3.0-or-later

