1.3.6 • Published 9 years ago

shipit-assets v1.3.6

Weekly downloads
22
License
MIT
Repository
github
Last release
9 years ago

shipit-assets

Asset syncing tasks for Shipit.

Features:

Install

npm install shipit-assets

Usage

Example shipitfile.js

module.exports = function (shipit) {
  require('shipit-assets')(shipit);

  shipit.initConfig({
    default: {
      assets: {
        paths: ['public/storage'],
        options: {
          ignores: ['cache']
        },
      }
    },
  });
};

Push your local assets to remote:

shipit staging assets:push

Pull your remote assets to local:

shipit staging assets:pull

Example Gruntfile.js

grunt.initConfig({
    shipit: {
      options: {
        workspace: '/tmp/github-monitor',
        deployTo: '/tmp/deploy_to',
        repositoryUrl: 'https://github.com/user/repo.git',
        ignores: ['.git', 'node_modules'],
        keepReleases: 2,
        key: '/path/to/key',
        shallowClone: true,
        assets: {
          'paths': [
            'public/uploads',
            'backup'
          ]
        },
      },
      staging: {
        servers: 'user@myserver.com'
      }
    }
  });

  grunt.loadNpmTasks('grunt-shipit');
  grunt.loadNpmTasks('shipit-deploy');
  grunt.loadNpmTasks('shipit-assets');

To run shipit-assets you have to call: grunt shipit:staging assets:push

Options (shipit.config.assets)

assets.paths

Type: Array

Paths to sync between remote and local. Paths are relative to project root.

assets.localPaths

Type: Array

If your local paths are mapped differently than remote, you may specify here. If specified, the array must have the same length as assets.paths. Default: assets.paths

assets.options

Options to pass to shipit.remoteCopy.

Workflow tasks

  • assets:push
    • Push assets from local to remote.
    • Emit event "assetsPush".
  • assets:pull
    • Pull assets from remote to local.
    • Emit event "assetsPull".

License

MIT

1.3.6

9 years ago

1.3.5

10 years ago

1.3.4

10 years ago

1.3.3

10 years ago

1.3.2

10 years ago

1.3.1

10 years ago

1.3.0

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago