Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support prebuild mirrors config #45

Closed
fengmk2 opened this issue Mar 8, 2016 · 2 comments · Fixed by #47
Closed

Support prebuild mirrors config #45

fengmk2 opened this issue Mar 8, 2016 · 2 comments · Fixed by #47
Assignees
Milestone

Comments

@fengmk2
Copy link
Member

fengmk2 commented Mar 8, 2016

https://github.com/mafintosh/prebuild/blob/master/util.js#L37

Take leveldown for example:

leveldown's package.json

  "scripts": {
    "install": "prebuild --install",
    "test": "mocha --expose-gc --slow 2000 --timeout 600000"
  },
$ npminstall -c

/path/to/prebuild-mirror-config.json example:

{
  "leveldown": {
    "binary": {
      "host": "https://npm.taobao.org/mirrors/leveldown"
    }
  },
  "couchbase": {
    "binary": {
      "host": "https://npm.taobao.org/mirrors/couchbase"
    }
  },
  ...
}
@fengmk2 fengmk2 added this to the 1.x milestone Mar 8, 2016
@fengmk2 fengmk2 self-assigned this Mar 8, 2016
@fengmk2
Copy link
Member Author

fengmk2 commented Mar 8, 2016

cnpm/mirrors#91

@fengmk2
Copy link
Member Author

fengmk2 commented Mar 8, 2016

This can also work for node-pre-gyp https://github.com/mapbox/node-pre-gyp/blob/master/lib/util/versioning.js#L277

https://github.com/mapbox/node-sqlite3/blob/master/package.json#L52

"scripts": {
        "prepublish":"npm ls",
        "install": "node-pre-gyp install --fallback-to-build",
        "pretest": "node test/support/createdb.js",
        "test": "mocha -R spec --timeout 480000"
    },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant