Skip to content

Commit

Permalink
Merge pull request #2791 from Automattic/docs-switch
Browse files Browse the repository at this point in the history
Docs switch
  • Loading branch information
vkarpov15 committed Mar 25, 2015
2 parents 3846944 + 06ee56c commit 73d7dc6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
23 changes: 11 additions & 12 deletions Makefile
Expand Up @@ -2,7 +2,8 @@
DOCS_ = $(shell find lib/ -name '*.js')
DOCS = $(DOCS_:.js=.json)
DOCFILE = docs/source/_docs
STABLE_BRANCH = 3.8.x
STABLE_BRANCH = master
LEGACY_BRANCH = 3.8.x

test:
@MONGOOSE_DISABLE_STABILITY_WARNING=1 ./node_modules/.bin/mocha $(T) --async-only test/*.test.js
Expand All @@ -13,10 +14,8 @@ test-short:
test-long:
@MONGOOSE_DISABLE_STABILITY_WARNING=1 ./node_modules/.bin/mocha $(T) -g LONG --async-only test/**/*.test.js

docs: ghpages merge_stable docclean gendocs
docs_all: docs_unstable docs
docs_from_current_branch: docclean gendocs
docs_unstable: master docclean_unstable gendocs copytmp gitreset ghpages copyunstable
docs: ghpages docclean gendocs
docs_legacy: legacy docclean_legacy gendocs copytmp gitreset ghpages copylegacy

gendocs: $(DOCFILE)

Expand All @@ -36,15 +35,15 @@ merge_stable:
ghpages:
git checkout gh-pages

master:
git checkout master
legacy:
git checkout $(LEGACY_BRANCH)

docclean:
rm -f ./docs/*.{1,html,json}
rm -f ./docs/source/_docs

docclean_unstable:
rm -rf ./docs/unstable/*
docclean_legacy:
rm -rf ./docs/$(LEGACY_BRANCH)/*
rm -f ./docs/source/_docs

copytmp:
Expand All @@ -61,9 +60,9 @@ gitreset:
git checkout -- ./docs
git checkout -- ./index.html

copyunstable:
mkdir -p ./docs/unstable
cp -R ./tmp/* ./docs/unstable/
copylegacy:
mkdir -p ./docs/$(LEGACY_BRANCH)
cp -R ./tmp/* ./docs/$(LEGACY_BRANCH)/
rm -rf ./tmp

.PHONY: test test-short test-long ghpages site docs docclean gendocs docs_from_master docs_unstable master copytmp copyunstable gitreset docclean_unstable
Expand Down
7 changes: 5 additions & 2 deletions lib/types/embedded.js
Expand Up @@ -187,11 +187,13 @@ EmbeddedDocument.prototype.invalidate = function (path, err, val, first) {
};

/**
* Marks a path as valid, causing validation to succeed
* Marks a path as valid, removing existing validation errors.
*
* @param {String} path the field to mark as valid
* @api public
* @method $markValid
* @api private
*/

EmbeddedDocument.prototype.$markValid = function(path) {
if (!this.__parent) {
return;
Expand All @@ -208,6 +210,7 @@ EmbeddedDocument.prototype.$markValid = function(path) {
* Checks if a path is invalid
*
* @param {String} path the field to check
* @method $isValid
* @api private
*/

Expand Down

0 comments on commit 73d7dc6

Please sign in to comment.