Skip to content

Commit 360e2cf

Browse files
committed
added script to generate .npmignore
Don't need to package the docs folder for NPM.
1 parent d0d7d21 commit 360e2cf

File tree

3 files changed

+92
-1
lines changed

3 files changed

+92
-1
lines changed

.npmignore

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (https://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# TypeScript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env
59+
60+
# parcel-bundler cache (https://parceljs.org/)
61+
.cache
62+
63+
# next.js build output
64+
.next
65+
66+
# nuxt.js build output
67+
.nuxt
68+
69+
# vuepress build output
70+
.vuepress/dist
71+
72+
# Serverless directories
73+
.serverless
74+
75+
# FuseBox cache
76+
.fusebox/
77+
78+
# Local Dev Files
79+
*.bat
80+
test/
81+
82+
# npm ignore
83+
docs/

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"url": "https://github.com/BrianWendt/json-schema-md-doc"
1414
},
1515
"scripts": {
16-
"doc": "./node_modules/.bin/jsdoc -R ./README.md -c ./scripts/jsdoc_config.json"
16+
"doc": "./node_modules/.bin/jsdoc -R ./README.md -c ./scripts/jsdoc_config.json",
17+
"npm": "node ./scripts/npm.js"
1718
},
1819
"homepage": "https://brianwendt.github.io/json-schema-md-doc",
1920
"public": true,

scripts/npm.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const fs = require('fs');
2+
3+
var ignore = fs.readFileSync('./.gitignore');
4+
ignore += "\n";
5+
ignore += "# npm ignore\n";
6+
ignore += "docs/\n";
7+
fs.writeFileSync('./.npmignore', ignore);

0 commit comments

Comments
 (0)