Use from TypeScript¶
i18n4v bundles .d.ts
file and it is registered at types
field of package.json
.
You can download library from npm and use it without any settings.
Download and Use¶
$ npm install i18n4v
// use via require
import i18n = require("i18n4v");
console.log(i18n("Hello World"));
Build with Browserify¶
$ browserify -p tsify -o main.js main.ts
Build with WebPack¶
module.exports = {
entry: [
'./main.ts'
],
output: {
path: 'dist',
filename: 'bundle.js'
},
resolve: {
extensions: ['', '.tsx', '.ts', '.js']
},
module: {
loaders: [
{ test: /\.ts(x?)$/, loader: 'ts-loader' }
]
}
};
{}
$ webpack