A simple generator for creating default files in a directory
This package should be installed globally or linked using npm link
npm install create-defaults --global
$ defaults
$ defaults file-name1 file-name2
specified files that aren't in .defaults
will be ignored
Configuration settings are determined by the closest .defaults
file to the current directory
{
"writeFiles": [
{
"name": "",
"value": [],
"update" true | false
},
...
]
}
example:
{
"writeFiles": [
{
"name": ".gitignore",
"value": ["node_modules", ".vscode"],
"update": true
},
{
"name": "src/components/index.js"
}
]
}
-
update: true
will update and override.gitignore
with default values (should be used with caution) -
src/components/index.js
will recursively createsrc/
andcomponents/
(if it doesn't already exist) and then createindex.js