Create `dustr` tool to render templates on the command line
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.9k
- Forks
- 461
- PR merge metrics
- No merged PRs in 30d
Description
Replaces #354 since we removed the old `dustc` tool.
We will create a command-line tool that accepts a template and context, and renders the result to stdout or a file.
Use case: Generating static sites using Dust as a generator. Unit testing your app that uses Dust.
API examples:
```
$ dustr foo.dust --context=context.js
$ dustr tmpl/foo.dust --context=context.js --pwd=tmpl --output=site/foo.html
$ dustr tmpl/*.dust --output=site # split is automatic with dustr, creates site/foo.html, site/bar.html
$ dustr foo.dust --whitespace=true # no context required
```
`dustr` will implement an `onLoad` function to load and compile partials in the same way that `dustc` compiles them.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the removed dustc tool and issue #354 to understand the existing compilation behavior, then trace how Dust templates and partials are currently loaded. Done means a dustr command accepts the described template, context, whitespace, working-directory, and output options, renders to stdout or files, expands globs, and loads partials through onLoad.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100