0.1.1 • Published 9 years ago

grunt-contrib-deb v0.1.1

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

grunt-contrib-deb

grunt task for creating .deb packages for linux. Can be run from Windows too.

Getting started

This plugin requires Grunt >=0.4.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-contrib-deb --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-contrib-deb');

Deb task

Run this task with the grunt deb command.

Task targets, files and options may be specified according to the grunt Configuring tasks guide.

Usage

grunt.initConfig({
  deb: {
    mytask: {
      options: {
        package: grunt.file.readJSON('./package.json'), // needed for extracting project info
        info: {
          rev: '512', // optional revision number
          arch: 'amd64', // optional architecture type
          targetDir: './dist', // optional folder where to build the .deb package
          tmpPath: './tmp', // optional temporary files path
          dependencies: ['dpkg', 'dep1', 'dep2'], // optional dependencies
          scripts: {
            preinst: './deb/scripts/preinst', // optional pre install script
            postinst: './deb/scripts/postinst', // optional post install script
            prerem: './deb/scripts/prerem', // optional pre remove script
            postrem: './deb/scripts/postrem', // optional post remove script
          }
        }
      },
      files: [{
        src: ['src/**', '!tests/**'],
        dest: '/srv/myproject',
        cwd: './server',
        expand: true
      }, { // add configuration files (init scripts, logrotate, systemd, etc...)
        src: ['**'],
        dest: '/etc',
        cwd: './config',
        expand: true
      }]
    }
  }
});

grunt.loadNpmTasks('deb');

// ...

grunt.registerTask('deploy', ['deb']);

License

MIT

0.1.1

9 years ago

0.1.0

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago