From 7e93e50d0c3e0d67604643d980068706a60fb4af Mon Sep 17 00:00:00 2001 From: Joel Kuzmarski Date: Mon, 10 Apr 2017 05:35:53 -0500 Subject: [PATCH 1/3] use local submodules except for necessary branches The submodules are first and foremost for getting at the documentation of the various plugins, and for being able to edit that documentation so as to be able to push changes, but we can also use the code in them for bit-docs as plugins by use of file: paths, so to avoid remote npm. For those plugin repos that have necessary branches that have not yet been merged into master, we pull from GitHub instead of checking out that branch in the local submodule so as to leave the submodule available for the explicit purpose of editing documentation. If the necessary branches were still in development, we could clone them locally anywhere and point the file: to that location as needed, thus having one copy of the plugin repo for editing documentation and another for developing the code of the plugin. --- package.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index e9717a1..c1ff6fb 100644 --- a/package.json +++ b/package.json @@ -31,21 +31,21 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "devDependencies": { - "bit-docs": "bit-docs/bit-docs", + "bit-docs": "bit-docs/bit-docs#file-pathed-deps", "gh-pages": "^0.12.0" }, "bit-docs": { "dependencies": { - "bit-docs-dev": "bit-docs/bit-docs-dev", - "bit-docs-generate-html": "bit-docs/bit-docs-generate-html", - "bit-docs-glob-finder": "bit-docs/bit-docs-glob-finder", - "bit-docs-html-toc": "bit-docs/bit-docs-html-toc", + "bit-docs-dev": "file:docs/modules/bit-docs-dev", + "bit-docs-generate-html": "bit-docs/bit-docs-generate-html#file-pathed-deps", + "bit-docs-glob-finder": "file:docs/modules/bit-docs-glob-finder", + "bit-docs-html-toc": "file:docs/modules/bit-docs-html-toc", "bit-docs-js": "bit-docs/bit-docs-js#remove-depend", - "bit-docs-prettify": "bit-docs/bit-docs-prettify", - "bit-docs-html-highlight-line": "bit-docs/bit-docs-html-highlight-line", - "bit-docs-process-mustache": "bit-docs/bit-docs-process-mustache", - "bit-docs-tag-demo": "bit-docs/bit-docs-tag-demo", - "bit-docs-tag-sourceref": "bit-docs/bit-docs-tag-sourceref" + "bit-docs-prettify": "file:docs/modules/bit-docs-prettify", + "bit-docs-html-highlight-line": "file:docs/modules/bit-docs-html-highlight-line", + "bit-docs-process-mustache": "file:docs/modules/bit-docs-process-mustache", + "bit-docs-tag-demo": "file:docs/modules/bit-docs-tag-demo", + "bit-docs-tag-sourceref": "file:docs/modules/bit-docs-tag-sourceref" }, "glob": { "pattern": "docs/**/*.{js,md,mustache}", From 5a782ba777000baee62a0c8be90726d1e30db881 Mon Sep 17 00:00:00 2001 From: Joel Kuzmarski Date: Mon, 10 Apr 2017 10:14:48 -0500 Subject: [PATCH 2/3] only do git submodule update once --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c1ff6fb..27d5d30 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "genc": "bit-docs -dc", "genf": "bit-docs -df", "gh-pages": "gh-pages -d gh-pages", - "postinstall": "git submodule update --init", + "preinstall": "[ -f docs/modules/bit-docs/package.json ] || git submodule update --init", "pub": "npm run gh-pages", "see": "http-server gh-pages", "test": "echo \"Error: no test specified\" && exit 1" From f941fe879b4a428fa5eb0ea72d36a008d9a44bc7 Mon Sep 17 00:00:00 2001 From: Joel Kuzmarski Date: Mon, 10 Apr 2017 05:43:53 -0500 Subject: [PATCH 3/3] ignore node_modules for docs/modules Although it is not necessary to run `npm install` in the docs/modules submodule repos to make and use code or documentation changes, one might still run `npm install` in order to run the tests for that submodule. --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 27d5d30..e82dfdb 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,8 @@ "**/*_test.js", "**/test_*.js", "**/test-*.md", - "**/test.js" + "**/test.js", + "**/node_modules/**/*" ] }, "parent": "BitDocs",