miseen

0.2.0 • Public • Published

mise en package

npm version

A node library to create folders and change files permission using config files only

Instalation

npm i miseen --save-dev

How 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-folder

How 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: 775

Command 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.

Package Sidebar

Install

npm i miseen

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

12.2 kB

Total Files

13

Last publish

Collaborators

  • vinik