0.0.1 • Published 10 months ago

@scriptify-vscode/handlebars v0.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

@scriptify-vscode/handlebars

This script is designed to be used with the "Scriptify" extension for VS Code.

Configuration

To configure the script, open your scriptify.json file and add the following configuration:

"@scriptify-vscode/handlebars": {
    "enabled": true,
    "out": "file",
    "env": {
        "templateFolderPath": "./tpl"
    }
}

In this configuration, make sure to set the templateFolderPath environment variable to the location of your Handlebars templates.

Example

Consider the following Handlebars template located at ./tpl/helloworld.hbs:

Hello {{#if name}}{{name}}{{else}}world !{{/if}}

To apply the script, select the JSON data you want to process. For example, let's assume we have the following JSON:

{ "name" : "John DOE" }

After selecting the JSON data, apply the script using the Scriptify extension. The script will process the selected JSON data with the Handlebars template and generate the corresponding output.

References

0.0.1

10 months ago