Support has been changed to v18.0.0
or later to match the Node.js release cycle. This is the only breaking change.
This will be a major update with minimal impact on many users who use scaffdog as a CLI.
Support has been changed to v16.0.0
or later to match the Node.js release cycle. This is the only breaking change.
This package is now the Pure ESM package.
Please see sindresorhus/esm-package.md.
If you are using scaffdog as API, please migrate to ESM.
Users of scaffdog/vscode should use v0.1.0
or later version. This version supports ESM and CommonJS. If you are using a version less than v0.1.0
, you will not be able to load the ESM and an error will occur.
This Major update is hardly disruptive 👏
Support has been changed to v14.16.0
or later to match the Node.js release cycle. This is the only breaking change.
Syntax support has been added, whereas previously only variable definitions using the define
helper function were supported.
Before:
{{ inputs.value | camel | define "name" }}
After:
{{ name := inputs.value | camel }}
You can still use define
for some use cases.
scaffdog has reached its first major version 🎉
Configuration file is now required. To reproduce the same behavior as v0, write the following configuration in .scaffdog/config.js
.
module.exports = {
files: ['./*'],
};
The CLI options and subcommands have changed as follows:
From | To |
---|---|
--templateDir |
--project |
scaffdog template [name] |
scaffdog create [name] |
The message
field has been removed. Use the questions
field instead.
---
name: 'utility'
root: 'src/utils'
output: '**/*'
- message: 'Please enter a filename.'
+ questions:
+ value: 'Please enter a filename.'
---
The description
field has been removed.
---
name: 'utility'
- description: 'Generate utility function.'
root: 'src/utils'
output: '**/*'
questions:
value: 'Please enter a filename.'
---
The output
field is backwards compatible.
As a behavior addition, you can now also receive string arrays.
---
name: 'utility'
root: '.'
output: ['**/internal', 'utilities/**/*']
---
or
---
name: 'utility'
root: '.'
output: '(**/internal|utilities/**/*)'
---
The built-in variables of scaffdog have changed significantly. The changed variables are:
From | To |
---|---|
input |
inputs.XXX |
output |
output.path |
filename |
output.name |
dirname |
output.dir |
basename |
output.base |
extname |
output.ext |
root |
REMOVED |
Here is an example of variables migration.
---
name: 'utility'
root: 'src/utils'
output: '**/*'
ignore: []
questions:
name: 'Please enter a filename.'
---
- # `{{ input }}.js`
+ # `{{ inputs.name }}.js`
```javascript
- export const {{ input | camel }} = () => true;
+ export const {{ inputs.name | camel }} = () => true;
```