Skip to content

Commit 0a1b7a4

Browse files
authored
Merge pull request #57 from martinheidegger/full-icu-bin
adding binary that automatically sets the full icu
2 parents b927992 + 73bb9f7 commit 0a1b7a4

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

node-full-icu.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env node
2+
const { spawn } = require('child_process')
3+
const data = require('./full-icu')
4+
const env = data.icu_small ? {
5+
...process.env,
6+
NODE_ICU_DATA: data.datPath()
7+
} : process.env
8+
9+
spawn('/usr/bin/env', ['node', ...process.argv.slice(2)], { env, stdio: 'inherit' })

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"icu4c"
1111
],
1212
"bin": {
13+
"full-icu": "./node-full-icu.js",
1314
"node-full-icu-path": "./node-icu-data.js"
1415
},
1516
"main": "full-icu.js",

0 commit comments

Comments
 (0)