Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-pg

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-pg

Grunt plugin to help with administering Postgres.

  • 0.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

grunt-pg

Grunt plugin to help with administering Postgres.

Installation

If you haven't used grunt before, be sure to check out the Getting Started guide.

From the same directory as your project's Gruntfile and package.json, install this plugin with the following command:

npm install --save-dev grunt-pg

Once that's done, add this line to your project's Gruntfile:

grunt.loadNpmTasks('grunt-pg');

If the plugin has been installed correctly, running grunt --help at the command line should list the newly-installed plugin's task or tasks. In addition, the plugin should be listed in package.json as a devDependency, which ensures that it will be installed whenever the npm install command is run.

Synopsis

Firstly, an example of using the pgcreate task:

grunt.initConfig({
  pgcreatedb: {
    project1: {
      // Target-specific file lists and/or options go here.
      name: 'project1', // will be created
      connection: {
        user: 'postgres',
        database: 'template1',
      },
    },
  },
})

Tasks

There are 5 tasks in grunt-pg: pgcreateuser, pgdropuser, pgcreatedb, pgowner, pgdropdb and pgsqlfile. Each task is a multitask.

Each works similarly as the example above shows. The connection credentials must be a user who is privieleged enough to be able to perform these operations. For example, using the 'postgres' user to the 'template1' database should be sufficient.

The connection object can also specify anything that node-pg understands: user, database, password, port and host.

Each task also requires the following:

  • pgcreateuser: user
  • pgdropuser: user
  • pgcreatedb: name
  • pgdropdb: name
  • pgowner: name, user

Release History

2013-01-16: 0.1.0 - 

Authors

  • Andrew Chilton (chilts).
  • Nicholas Faiz (nicholasf).

Licence

Copyright (c) 2013 Moneytribe. MIT.

Keywords

FAQs

Package last updated on 18 Jan 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc