Skip to content

Commit

Permalink
Merge pull request #57 from martinheidegger/full-icu-bin
Browse files Browse the repository at this point in the history
adding binary that automatically sets the full icu
  • Loading branch information
srl295 authored Sep 28, 2021
2 parents b927992 + 73bb9f7 commit 0a1b7a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions node-full-icu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env node
const { spawn } = require('child_process')
const data = require('./full-icu')
const env = data.icu_small ? {
...process.env,
NODE_ICU_DATA: data.datPath()
} : process.env

spawn('/usr/bin/env', ['node', ...process.argv.slice(2)], { env, stdio: 'inherit' })
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"icu4c"
],
"bin": {
"full-icu": "./node-full-icu.js",
"node-full-icu-path": "./node-icu-data.js"
},
"main": "full-icu.js",
Expand Down

0 comments on commit 0a1b7a4

Please sign in to comment.