grunt-mount

0.2.5 • Public • Published

grunt-mount Build Status NPM version Dependencies

Grunt task to mount/unmount a network share

Provides two tasks: mount and unmount.

Installation

npm install --save-dev grunt-mount

Configuration

grunt.initConfig({
  mount: {
    share: {
      options: {
        windows: {                      // windows specific options
          driveLetter: "X"
        },
        '*nix': {                       // *nix specific options
          fileSystem: "smbfs",          // equivalent to 'mount -t [smbfs|cifs|nfs]'
        },
        share: {
          host: "my.server.com",
          folder: "/path/on/server"     // paths can be windows or *nix style (will be normalised)
        },
        mountPoint: "./share",          // path to mount the share (can be windows or unix style)
        username: "someuser",
        password: "password"
      }
    }
  },
  unmount: {
    share: {
      options: {
        windows:{                    // windows specific options
          driveLetter: "X"
        },
        mountPoint: "./share"
      }
    }
  }
});
 
grunt.loadNpmTasks('grunt-mount');

On *nix systems, the share will be mounted at the specified mount-point. On Windows, the share will be mounted on the specified drive letter, and a symlink will be created at the mount-point.

Limitations:

  • Only works for Linux, MacOS and Windows (FreeBSD and SunOS coming)
  • Must specify a drive letter for Windows
  • MountPoint must be relative path in order for Windows compatibility

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.2.50latest

Version History

VersionDownloads (Last 7 Days)Published
0.2.50
0.2.40
0.2.30
0.2.20
0.2.10
0.2.02
0.1.00
0.0.10

Package Sidebar

Install

npm i grunt-mount

Weekly Downloads

1

Version

0.2.5

License

none

Last publish

Collaborators

  • acolchado
  • arnoldzokas
  • matteofigus
  • ryantomlinson
  • andyroyle