jharding / grunt-exec

Grunt plugin for executing shell commands.
https://npmjs.org/package/grunt-exec
Other
248 stars 47 forks source link

Added config-less commands #41

Closed kirbysayshi closed 10 years ago

kirbysayshi commented 10 years ago

This is in response to #40!

Now commands can be simple strings, to optimize for the case where all the defaults will suffice.

Please let me know if there is something you'd like changed.

jharding commented 10 years ago

Thanks, this was a great pull request. This change has been published as v0.4.4.

kirbysayshi commented 10 years ago

Cool, thanks for publishing!

What do you think about including https://github.com/grncdr/npm-exec functionality? That would shorten cases like

{
  browserify: './node_modules/browserify/cmd.js > bundle.js'
}

to

{
  browserify: 'browserify > bundle.js'
}
kirbysayshi commented 10 years ago

Also, I just took a look, and it seems like 0.4.4 isn't published, just 0.4.3. Did you forget to bump the package.json file?

jharding commented 10 years ago

It's published, seems like the npm grunt-exec page hasn't been updated yet. If you run npm show grunt-exec, you should see:

{ name: 'grunt-exec',
  description: 'Grunt task for executing shell commands.',
  'dist-tags': { latest: '0.4.4' },
  versions: 
   [ '0.1.0',
     '0.1.1',
     '0.2.0',
     '0.2.1',
     '0.3.0',
     '0.4.0-rc1',
     '0.4.0',
     '0.4.1',
     '0.4.2',
     '0.4.3',
     '0.4.4' ],
  maintainers: 'jharding <jacob.s.harding@gmail.com>',
  time: 
   { '0.1.0': '2012-04-08T11:19:35.834Z',
     '0.1.1': '2012-04-16T22:36:50.806Z',
     '0.2.0': '2012-08-24T06:19:06.155Z',
     '0.2.1': '2012-09-15T06:18:33.327Z',
     '0.3.0': '2012-09-15T06:46:43.210Z',
     '0.4.0': '2013-02-18T19:52:59.969Z',
     '0.4.1': '2013-05-24T23:24:20.482Z',
     '0.4.2': '2013-06-25T00:10:55.607Z',
     '0.4.3': '2013-12-25T19:37:49.450Z',
     '0.4.4': '2014-02-11T19:25:05.453Z',
     '0.4.0-rc1': '2013-02-18T19:48:53.207Z' },
  author: 'Jake Harding <jacob.s.harding@gmail.com>',
  repository: { type: 'git', url: 'git://github.com/jharding/grunt-exec.git' },
  users: { jharding: true },
  readmeFilename: 'README.md',
  version: '0.4.4',
  homepage: 'https://github.com/jharding/grunt-exec',
  bugs: { url: 'https://github.com/jharding/grunt-exec/issues' },
  licenses: 
   { type: 'MIT',
     url: 'https://github.com/jharding/grunt-exec/blob/master/LICENSE-MIT' },
  main: 'Gruntfile.js',
  engines: { node: '>=0.8.0' },
  scripts: { test: '/usr/bin/env node test/test.js' },
  peerDependencies: { grunt: '~0.4' },
  devDependencies: { grunt: '~0.4', 'grunt-contrib-jshint': '~0.1' },
  keywords: [ 'grunt', 'gruntplugin', 'shell' ],
  dist: 
   { shasum: '92616e8760a1ba075e54efb983f2480af7107861',
     tarball: 'http://registry.npmjs.org/grunt-exec/-/grunt-exec-0.4.4.tgz' },
  directories: {} }
jharding commented 10 years ago

What do you think about including https://github.com/grncdr/npm-exec functionality?

I'd like to keep grunt-exec as simple as possible, so for now, I'd prefer not to do that.

kirbysayshi commented 10 years ago

I think there's something wrong with npm right now. I've tried from two different machines, cleared all caches, and I still can't find 0.4.4. A coworker just visited npmjs.org and saw 0.4.3 there, while I can see 0.4.4 there. But no matter what I do I can't get 0.4.4 to appear using npm.

Could you try publishing the same version one more time? I wonder if something failed in replication...

jharding commented 10 years ago

I unpublished 0.4.4, but when I try to publish it now I get the following error:

npm ERR! Error: conflict Document update conflict.: grunt-exec
npm ERR!     at RegClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:275:14)
npm ERR!     at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:123:22)
npm ERR!     at Request.EventEmitter.emit (events.js:98:17)
npm ERR!     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:893:14)
npm ERR!     at Request.EventEmitter.emit (events.js:117:20)
npm ERR!     at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:844:12)
npm ERR!     at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:920:16
npm ERR!     at process._tickCallback (node.js:415:13)

Searching through the npm issues, it seems like others have experienced a similar issue. I haven't been able to find a solution yet though. I don't have time to debug this right now, but I'll try and get to it soon. In the meantime, if you want 0.4.4, you can do:

npm install git://github.com/jharding/grunt-exec.git#v0.4.4
kirbysayshi commented 10 years ago

Yeah, it seems like it was a CDN or replication issue of some sort. Visiting npmjs.org would show 0.4.3, then a refresh would show 0.4.4... bouncing back and forth.

For now it might be best to just publish a 0.4.5 version

jharding commented 10 years ago

Bad news, I get the same error trying to publish 0.4.5. I also removed the 0.4.4 tag, so change my previous code snippet to:

npm install git://github.com/jharding/grunt-exec.git#v0.4.5

I'm watching a handful of npm issues regarding this problem, I'll circle back when a solution is available.

jharding commented 10 years ago

http://blog.npmjs.org/post/76571505280/publishing-issues-2014-02-12

jharding commented 10 years ago

v0.4.5 should now be published.