0.2.0 • Published 3 years ago
miseen v0.2.0
mise en package
A node library to create folders and change files permission using config files only
Instalation
npm i miseen --save-devHow to create a folter
# package.json
{
"scripts": {
"create-folder": "miseen mkdir"
},
"miseen": {
"mkdir": [
{
"path": "temp-folder"
}
],
}
}Now run npm run create-folder and a "temp-folder" will be created at the root of your repository.
mkdir - options
You must add a configuration either within package.json, or creating a .miseenrc
Using package.json
{
"miseen": {
"mkdir": [
{
"path": "temp-folder"
}
{
"path": "nest-folder/inner-folder"
}
],
}
}Using .miseenrc
mkdir:
-
path: temp
-
path: nest-folder/inner-folderHow to change files permissiont
# package.json
{
"scripts": {
"change-files-permission": "miseen chmod"
},
"miseen": {
"chmod": [
{
"path": "temp-folder",
"mode": 777
}
],
}
}Now run npm run change-files-permission and every file inside "/temp-folder" will receive 777 as their permission mode.
chmod - options
You must add a configuration either within package.json, or creating a .miseenrc
Using package.json
{
"miseen": {
"chmod": [
{
"path": "temp-folder",
"mode": 777,
}
{
"path": "nest-folder/inner-folder",
"mode": 775,
}
],
}
}Using .miseenrc
chmod:
-
path: "temp-folder"
mode: 777
-
path: "nest-folder/inner-folder"
mode: 775Command line
If you run miseen without any parameter, it will run both mkdir and chmod, if they have valid configurations.\
This way, you can combine routine to better suit your needs.