mirror of
https://github.com/chenasraf/simple-scaffold.git
synced 2026-05-18 01:29:09 +00:00
Compare commits
3 Commits
v1.8.0-pre
...
v1.8.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f666c357f4 | ||
| f5d55f234a | |||
|
|
746f924a22 |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,5 +1,19 @@
|
||||
# Change Log
|
||||
|
||||
## [1.8.0](https://github.com/chenasraf/simple-scaffold/compare/v1.7.2...v1.8.0) (2023-11-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **config:** fn config load ([457c904](https://github.com/chenasraf/simple-scaffold/commit/457c90470b0f138862469ff878c7e061c7afd18a)), closes [#63](https://github.com/chenasraf/simple-scaffold/issues/63)
|
||||
|
||||
## [1.8.0-pre.1](https://github.com/chenasraf/simple-scaffold/compare/v1.7.2...v1.8.0-pre.1) (2023-11-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **config:** fn config load ([457c904](https://github.com/chenasraf/simple-scaffold/commit/457c90470b0f138862469ff878c7e061c7afd18a)), closes [#63](https://github.com/chenasraf/simple-scaffold/issues/63)
|
||||
|
||||
## [1.7.2](https://github.com/chenasraf/simple-scaffold/compare/v1.7.1...v1.7.2) (2023-08-20)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "simple-scaffold",
|
||||
"version": "1.7.2",
|
||||
"version": "1.8.0",
|
||||
"description": "Generate any file structure - from single components to entire app boilerplates, with a single command.",
|
||||
"homepage": "https://chenasraf.github.io/simple-scaffold",
|
||||
"repository": "https://github.com/chenasraf/simple-scaffold.git",
|
||||
|
||||
@@ -45,7 +45,7 @@ interface ScaffoldConfig {
|
||||
If you want to supply functions inside the configurations, you must use a `.js` file as JSON does
|
||||
not support non-primitives.
|
||||
|
||||
A `.js` file is just like a `.json` file, make sure to export the final configuration:
|
||||
A `.js` file can be just like a `.json` file, make sure to export the final configuration:
|
||||
|
||||
```js
|
||||
/** @type {import('simple-scaffold').ScaffoldConfigFile} */
|
||||
@@ -57,6 +57,23 @@ module.exports = {
|
||||
}
|
||||
```
|
||||
|
||||
Another feature of using a JS file is you can export a function which will be loaded with the CMD
|
||||
config provided to Simple Scaffold. The `extras` key contains any values not consumed by built-in
|
||||
flags, so you can pre-process your args before outputting a config:
|
||||
|
||||
```js
|
||||
/** @type {import('simple-scaffold').ScaffoldConfigFile} */
|
||||
module.exports = (config) => {
|
||||
console.log("Config:", config)
|
||||
return {
|
||||
component: {
|
||||
templates: ["templates/component"],
|
||||
output: "src/components",
|
||||
},
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Using a config file
|
||||
|
||||
Once your config is created, you can use it by providing the file name to the `--config` (or `-c`
|
||||
|
||||
Reference in New Issue
Block a user