{"action":"created","issue":{"url":"https://api.github.com/repos/npm/npm/issues/3055","labels_url":"https://api.github.com/repos/npm/npm/issues/3055/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/3055/comments","events_url":"https://api.github.com/repos/npm/npm/issues/3055/events","html_url":"https://github.com/npm/npm/issues/3055","id":9928868,"number":3055,"title":"run `prepublish` for git url packages","user":{"login":"isaacs","id":9287,"avatar_url":"https://avatars.githubusercontent.com/u/9287?v=3","gravatar_id":"","url":"https://api.github.com/users/isaacs","html_url":"https://github.com/isaacs","followers_url":"https://api.github.com/users/isaacs/followers","following_url":"https://api.github.com/users/isaacs/following{/other_user}","gists_url":"https://api.github.com/users/isaacs/gists{/gist_id}","starred_url":"https://api.github.com/users/isaacs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isaacs/subscriptions","organizations_url":"https://api.github.com/users/isaacs/orgs","repos_url":"https://api.github.com/users/isaacs/repos","events_url":"https://api.github.com/users/isaacs/events{/privacy}","received_events_url":"https://api.github.com/users/isaacs/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/npm/npm/labels/feature-request","name":"feature-request","color":"ACE1AF"},{"url":"https://api.github.com/repos/npm/npm/labels/git","name":"git","color":"F34E31"},{"url":"https://api.github.com/repos/npm/npm/labels/patch-welcome","name":"patch-welcome","color":"e102d8"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/npm/npm/milestones/1","html_url":"https://github.com/npm/npm/milestones/first-class%20git","labels_url":"https://api.github.com/repos/npm/npm/milestones/1/labels","id":243804,"number":1,"title":"first-class git","description":"Make git remote install things more first-class so that they behave in less unpredictable ways.","creator":{"login":"isaacs","id":9287,"avatar_url":"https://avatars.githubusercontent.com/u/9287?v=3","gravatar_id":"","url":"https://api.github.com/users/isaacs","html_url":"https://github.com/isaacs","followers_url":"https://api.github.com/users/isaacs/followers","following_url":"https://api.github.com/users/isaacs/following{/other_user}","gists_url":"https://api.github.com/users/isaacs/gists{/gist_id}","starred_url":"https://api.github.com/users/isaacs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isaacs/subscriptions","organizations_url":"https://api.github.com/users/isaacs/orgs","repos_url":"https://api.github.com/users/isaacs/repos","events_url":"https://api.github.com/users/isaacs/events{/privacy}","received_events_url":"https://api.github.com/users/isaacs/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":3,"state":"closed","created_at":"2013-01-14T00:13:40Z","updated_at":"2014-08-28T22:57:21Z","due_on":null,"closed_at":"2014-08-28T22:57:21Z"},"comments":27,"created_at":"2013-01-14T00:18:32Z","updated_at":"2015-09-02T17:35:04Z","closed_at":null,"body":"After installing a git url package, perhaps the `prepublish` script should be run, since git repos will typically not keep around any built artifacts that the prepublish script generates.\r\n\r\nHowever, `prepublish` scripts also typically require the use of `devDependencies` packages, so it might not be possible to do this in a good way.  (In which case, it'll just be on the users of git url packages to run whatever scripts are necessary to make them ready to use.)"},"comment":{"url":"https://api.github.com/repos/npm/npm/issues/comments/137181679","html_url":"https://github.com/npm/npm/issues/3055#issuecomment-137181679","issue_url":"https://api.github.com/repos/npm/npm/issues/3055","id":137181679,"user":{"login":"maxkorp","id":1302526,"avatar_url":"https://avatars.githubusercontent.com/u/1302526?v=3","gravatar_id":"","url":"https://api.github.com/users/maxkorp","html_url":"https://github.com/maxkorp","followers_url":"https://api.github.com/users/maxkorp/followers","following_url":"https://api.github.com/users/maxkorp/following{/other_user}","gists_url":"https://api.github.com/users/maxkorp/gists{/gist_id}","starred_url":"https://api.github.com/users/maxkorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxkorp/subscriptions","organizations_url":"https://api.github.com/users/maxkorp/orgs","repos_url":"https://api.github.com/users/maxkorp/repos","events_url":"https://api.github.com/users/maxkorp/events{/privacy}","received_events_url":"https://api.github.com/users/maxkorp/received_events","type":"User","site_admin":false},"created_at":"2015-09-02T17:35:04Z","updated_at":"2015-09-02T17:35:04Z","body":"Just to start, here is my understanding of the order of things when installing inside the local dir, in case I have something wrong.\r\nIf you don't have install scripts: \r\n - Install dependencies\r\n - Compile\r\n - Run prepublish script\r\nIf you do have install scripts:\r\n - Run preinstall script\r\n - Install dependencies\r\n - Run install script\r\n - Run postinstall script\r\n - Run prepublish script\r\n - Run preinstall script\r\n\r\nBecause i need the code that would be run as prepublish to run BEFORE install, because the code generated by that script is the actual code being compiled. I'm not generating javascript from coffee, \r\nI'm generating the actual C++ native addon code from templates.\r\n\r\nWhat I need is this order:\r\n - Install dependencies\r\n - Run some post-dependency-install-pre-compilation script (to do what you're proposing I use prepublish for, if I understand correctly)\r\n - Run install script\r\n - Run postinstall script\r\n\r\nCurrently, during install I run `npm install --ignore-scripts` to get all my dependencies, then run the same script called by prepublish. Then we shell out to a build tool (pangyp, specifically) to do the compilation. A separate but related issue would be that if we could have a preinstall script do something like the generation i need, while allowing NPM to continue compilation, rather than having to manually take over. I realize that this is an oddball situation and most people are not generating any of (much less the majority of) their C++ code, so it might not be an issue everybody wants to worry about, since I can work around it, and I can totally respect that. However, It seems like an issue that keeps coming up for other people as well in various forms, so if the work is going to be done anyways, I figure I ought to at least push to get our scenario handled as well. \r\nI might as well push to make sure my "}}