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

refactor: export module #16

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Squashed commit of the following:
commit 3a6daa9
Author: yuki akiyama <[email protected]>
Date:   Wed Aug 14 17:24:38 2019 +0900

    refactor: explicit export

commit 5f482f8
Author: yuki akiyama <[email protected]>
Date:   Wed Aug 14 15:31:34 2019 +0900

    update package

commit d825afa
Author: yuki akiyama <[email protected]>
Date:   Wed Aug 14 15:22:43 2019 +0900

    refactor: add index.ts and explicit export
you21979 committed Aug 14, 2019
commit 8674a48c72aabdba15609283389828cbfbfc685d
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -2,10 +2,10 @@
"name": "bip174",
"version": "1.0.0",
"description": "",
"main": "src/lib/psbt.js",
"types": "src/lib/psbt.d.ts",
"main": "src/index.js",
"types": "src/index.d.ts",
"files": [
"src/lib"
"src"
],
"engines": {
"node": ">=8.0.0"
6 changes: 6 additions & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Psbt } from './lib/psbt';
import * as utils from './lib/utils';
import * as varint from './lib/converter/varint';
export { Psbt, utils, varint };
export * from './lib/interfaces';
export * from './lib/typeFields';
12 changes: 12 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict';
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, '__esModule', { value: true });
const psbt_1 = require('./lib/psbt');
exports.Psbt = psbt_1.Psbt;
const utils = require('./lib/utils');
exports.utils = utils;
const varint = require('./lib/converter/varint');
exports.varint = varint;
__export(require('./lib/typeFields'));
7 changes: 7 additions & 0 deletions ts_src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Psbt } from './lib/psbt'
import * as utils from './lib/utils'
import * as varint from './lib/converter/varint';

export { Psbt, utils, varint }
export * from './lib/interfaces'
export * from './lib/typeFields'