Skip to content

Commit 64f7f08

Browse files
authored
Merge pull request #76 from joliss/dist
Build into `dist` directory
2 parents 8caff2f + 4a36ff3 commit 64f7f08

5 files changed

Lines changed: 29 additions & 20 deletions

File tree

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,5 @@ test/fixtures/bar
77
test/fixtures/contains-cycle/symlink2
88
test/fixtures/contains-cycle/is-cycle
99
.vscode/
10-
*.js
11-
*.d.ts
12-
*.js.map
1310
!test/fixture
11+
/dist

.npmignore

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
/test
2-
/benchmark.js
3-
/appveyor.yml
4-
/.travis.yml
5-
/.npmignore
1+
# Publish only built artifacts from `dist/` via package.json "files".
2+
# Keep tests and repo-only files out of the tarball.
3+
test
4+
benchmark.js
5+
appveyor.yml
6+
.travis.yml
7+
.npmignore
8+
*.ts
9+
!dist/**/*.d.ts
10+
!dist/**/*.d.ts.map

package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"description": "Get an array of recursive directory contents",
44
"version": "3.0.0",
55
"author": "Jo Liss <joliss42@gmail.com>",
6-
"main": "index.js",
7-
"types": "index.d.ts",
6+
"main": "dist/index.js",
7+
"types": "dist/index.d.ts",
88
"license": "MIT",
99
"engines": {
1010
"node": "10.* || >= 12.*"
@@ -14,9 +14,7 @@
1414
"url": "https://github.com/joliss/node-walk-sync"
1515
},
1616
"files": [
17-
"index.js",
18-
"index.d.ts",
19-
"index.js.map"
17+
"dist/"
2018
],
2119
"dependencies": {
2220
"@types/minimatch": "^3.0.4",
@@ -35,9 +33,10 @@
3533
"typescript": "~4.3.2"
3634
},
3735
"scripts": {
38-
"prepare": "tsc -b .",
39-
"build": "tsc -b .",
40-
"clean": "tsc -b --clean .",
36+
"prepare": "yarn run build",
37+
"prepack": "yarn run build",
38+
"build": "tsc -p .",
39+
"clean": "rimraf dist",
4140
"test": "jest ."
4241
},
4342
"volta": {

test/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
import * as path from 'path';
4-
import * as walkSync from '../';
4+
import * as walkSync from '../index';
55
import * as fs from 'fs';
66
import {Volume, createFsFromVolume} from 'memfs'
77
import { Minimatch } from 'minimatch';

tsconfig.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
{
22
"compilerOptions": {
33
"declaration": true,
4+
"declarationMap": true,
45
"strict": true,
56
"moduleResolution": "node",
67
"module": "commonjs",
78
"target": "es2017",
8-
"sourceMap": true
9+
"sourceMap": true,
10+
"outDir": "./dist",
11+
"rootDir": "."
912
},
10-
"exclude": ["index.d.ts"],
11-
"include": ["index.ts", "test/test.ts"]
13+
"exclude": [
14+
"test/**"
15+
],
16+
"include": [
17+
"index.ts"
18+
]
1219
}

0 commit comments

Comments
 (0)