Skip to content

Commit 4419877

Browse files
committed
added packaging changes
1 parent 943193d commit 4419877

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ docs
2525
sonar-project.properties
2626

2727
# Webstrom files
28-
.idea/
28+
.idea/
29+
dist/

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22
"name": "hapi-signed-url",
33
"version": "1.0.0",
44
"description": "A hapijs plugin to generate signed url for response objects",
5-
"main": "src/index.js",
5+
"main": "dist/src/index.js",
6+
"types": "dist/src/index.d.ts",
67
"engines": {
78
"node": "14.x",
89
"npm": "6.x.x"
910
},
1011
"scripts": {
1112
"start": "npx ts-node src/index.ts",
1213
"pretty": "npx prettier '**/*.{json,js,ts,md}' --write",
13-
"test": "npx mocha -p --require ts-node/register test/*.spec.ts"
14+
"test": "npx mocha -p --require ts-node/register test/*.spec.ts",
15+
"prebuild": "tsc",
16+
"build": "npm run test"
1417
},
1518
"repository": {
1619
"type": "git",

tsconfig.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@
4444
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
4545

4646
/* Emit */
47-
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
47+
"declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */,
4848
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
4949
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
5050
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
5151
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
52-
// "outDir": "./", /* Specify an output folder for all emitted files. */
52+
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
5353
// "removeComments": true, /* Disable emitting comments. */
5454
// "noEmit": true, /* Disable emitting files from a compilation. */
5555
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
@@ -99,5 +99,6 @@
9999
/* Completeness */
100100
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
101101
"skipLibCheck": true /* Skip type checking all .d.ts files. */
102-
}
102+
},
103+
"exclude": ["node_modules", "dist"]
103104
}

0 commit comments

Comments
 (0)