Skip to content

Commit 874a049

Browse files
committed
Move test dependencies, stop ignoring node_modules
Previously, `node_modules` was in `.gitignore` because there was a lot of dependencies for the tests that don't need to be committed. However, npm is also used to manage the primer dependency, which _does_ need to be committed so GitHub Pages can build the website. At some point, someone (whose name rhymes with "Landon Creepers") thought it'd be fine to just type `git add -f node_modules/primer*` to commit the primer dependencies and leave everything else ignored. This works…until you want to update primer. Any update requires that the author knows about this awful `.gitignore` setup, and uses the dreadful `-f` flag. This commit: - Moves the dependencies needed for tests into `test/package.json` - Adds `test/node_modules` to `.gitignore` - Removes `node_modules` from `.gitignore`
1 parent f612a1d commit 874a049

File tree

5 files changed

+36
-32
lines changed

5 files changed

+36
-32
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ _site/
44
.jekyll-metadata
55
.sass-cache/
66
bin
7-
node_modules
7+
test/node_modules
88
/vendor
99
Gemfile.lock
1010
css/main.scss

package.json

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,8 @@
22
"name": "open-source-guide",
33
"private": true,
44
"scripts": {
5-
"test": "script/test"
6-
},
7-
"devDependencies": {
8-
"async": "^2.0.0",
9-
"download": "^5.0.3",
10-
"ebrew": "^0.1.1",
11-
"fastmatter": "^1.1.1",
12-
"glob": "^7.0.5",
13-
"ignore": "^3.1.3",
14-
"js-yaml": "^3.6.1",
15-
"kindlegen": "^1.1.0",
16-
"mkdirp": "^0.5.1",
17-
"remark-lint": "^5.0.0",
18-
"remark-parse": "^2.0.0",
19-
"remark-retext": "^2.0.0",
20-
"remark-stringify": "^2.0.0",
21-
"retext-english": "^2.0.0",
22-
"retext-equality": "^2.3.2",
23-
"retext-quotes": "^1.0.0",
24-
"retext-readability": "^3.0.0",
25-
"retext-repeated-words": "^1.0.0",
26-
"retext-sentence-spacing": "^1.0.0",
27-
"retext-simplify": "^3.0.0",
28-
"retext-words": "bkeepers/retext-words",
29-
"slug": "^0.9.1",
30-
"to-vfile": "^2.1.0",
31-
"unified": "^5.0.0",
32-
"unist-util-visit": "^1.1.1",
33-
"vfile-reporter": "^3.0.0",
34-
"vfile-statistics": "^1.0.0"
5+
"test": "script/test",
6+
"postinstall": "cd test && npm install"
357
},
368
"dependencies": {
379
"primer-core": "6.0.0",

script/test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ set -e
55
script/build --config _config.yml,test/_config.yml
66
bundle exec rake
77
script/html-proofer
8-
script/test-prose
8+
test/prose

test/package.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"private": true,
3+
"devDependencies": {
4+
"async": "^2.0.0",
5+
"download": "^5.0.3",
6+
"ebrew": "^0.1.1",
7+
"fastmatter": "^1.1.1",
8+
"glob": "^7.0.5",
9+
"ignore": "^3.1.3",
10+
"js-yaml": "^3.6.1",
11+
"kindlegen": "^1.1.0",
12+
"mkdirp": "^0.5.1",
13+
"remark-lint": "^5.0.0",
14+
"remark-parse": "^2.0.0",
15+
"remark-retext": "^2.0.0",
16+
"remark-stringify": "^2.0.0",
17+
"retext-english": "^2.0.0",
18+
"retext-equality": "^2.3.2",
19+
"retext-quotes": "^1.0.0",
20+
"retext-readability": "^3.0.0",
21+
"retext-repeated-words": "^1.0.0",
22+
"retext-sentence-spacing": "^1.0.0",
23+
"retext-simplify": "^3.0.0",
24+
"retext-words": "bkeepers/retext-words",
25+
"slug": "^0.9.1",
26+
"to-vfile": "^2.1.0",
27+
"unified": "^5.0.0",
28+
"unist-util-visit": "^1.1.1",
29+
"vfile-reporter": "^3.0.0",
30+
"vfile-statistics": "^1.0.0"
31+
}
32+
}
File renamed without changes.

0 commit comments

Comments
 (0)