Skip to content

Commit

Permalink
use npm_package_name
Browse files Browse the repository at this point in the history
fixes #1
  • Loading branch information
srl295 committed Oct 10, 2015
1 parent d206cc3 commit 79dd531
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "full-icu",
"version": "0.0.1-ALPHA",
"version": "0.0.2-ALPHA",
"description": "install 'full-icu' data for your current node",
"scripts": {
"postinstall": "node postinstall.js"
Expand Down
6 changes: 4 additions & 2 deletions postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ if(!process || !process.versions || !process.versions.node) {
throw Error('Sorry- don’t know what version of Node you are on.');
}

var myname = process.env.npm_package_name || 'full-icu';

var nodever = process.versions.node;

var nodesplit = nodever.split('.');
Expand Down Expand Up @@ -71,7 +73,7 @@ var icupkg = "icu4c-data@" + icumaj+icuend;
var icudat = "icudt"+icumaj+icuend+".dat";

var cwd = fs.realpathSync('.');
var relpath = path.join('node_modules',"full-icu");
var relpath = path.join('node_modules',myname);

function advice() {
if(false /* nodever >= ### */) {
Expand Down Expand Up @@ -125,4 +127,4 @@ if(fs.existsSync(icudat)) {
});
//npm.registry.log.on("log", console.log);
});
}
}

0 comments on commit 79dd531

Please sign in to comment.