From 002f98ef7e33e0a395072aa42d33086fc49f918a Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Mon, 22 Jul 2013 22:32:05 -0700 Subject: [PATCH] Clean up docs --- Makefile | 73 +---------------- docs/adapter.md | 2 - docs/changelog.md | 87 -------------------- docs/connector.md | 5 ++ docs/{schema.md => data-source.md} | 0 docs/footer.html | 66 ---------------- docs/ga.html | 10 --- docs/index.txt | 33 +------- docs/loopback-data.md | 123 +---------------------------- docs/roadmap.md | 31 -------- package.json | 12 +-- scripts/doc.sh | 30 ------- 12 files changed, 14 insertions(+), 458 deletions(-) delete mode 100644 docs/adapter.md delete mode 100644 docs/changelog.md create mode 100644 docs/connector.md rename docs/{schema.md => data-source.md} (100%) delete mode 100644 docs/footer.html delete mode 100644 docs/ga.html delete mode 100644 docs/roadmap.md delete mode 100755 scripts/doc.sh diff --git a/Makefile b/Makefile index 747e8bd3..0ab5736b 100644 --- a/Makefile +++ b/Makefile @@ -17,78 +17,9 @@ about-testing: @echo " make test-verbose # Run all tests in verbose mode" @echo " make testing # Run tests continuously" -## DOCS - -MAN_DOCS = $(shell find docs -name '*.md' \ - |sed 's|.md|.3|g' \ - |sed 's|docs/|docs/man/|g' ) - -HTML_DOCS = $(shell find docs -name '*.md' \ - |sed 's|.md|.3.html|g' \ - |sed 's|docs/|docs/html/|g' ) \ - docs/html/index.html - -docs/man/%.3: docs/%.md scripts/doc.sh - scripts/doc.sh $< $@ - -docs/html/%.3.html: docs/%.md scripts/doc.sh docs/footer.html - scripts/doc.sh $< $@ - -docs/html/index.html: docs/loopback-data.md scripts/doc.sh docs/footer.html - scripts/doc.sh $< $@ - -man: $(MAN_DOCS) -html: $(HTML_DOCS) - -build: man - -about-docs: - @echo "\n## DOCS\n" - @echo " make man # Create docs for man" - @echo " make html # Create docs in html" - -## WORKFLOW - -GITBRANCH = $(shell git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/') - -REPO = marcusgreenwood/hatchjs -TARGET = origin -FROM = $(GITBRANCH) -TO = $(GITBRANCH) - -pull: - git pull $(TARGET) $(FROM) - -safe-pull: - git pull $(TARGET) $(FROM) --no-commit - -push: test - git push $(TARGET) $(TO) - -feature: - git checkout -b feature-$(filter-out $@,$(MAKECMDGOALS)) - git push -u $(TARGET) feature-$(filter-out $@,$(MAKECMDGOALS)) -%: - @: - -version-build: - @echo "Increasing version build, publishing package, then push, hit Ctrl+C to skip before 'three'" - @sleep 1 && echo 'one...' - @sleep 1 && echo 'two...' - @sleep 1 && echo 'three!' - @sleep 1 - npm version build && npm publish && git push - -about-workflow: - @echo "\n## WORKFLOW\n" - @echo " make pull # Pull changes from current branch" - @echo " make push # Push changes to current branch" - @echo " make feature {name} # Create feature branch 'feature-name'" - @echo " make pr # Make pull request" - @echo " make version-build # Create new build version" ## HELP -help: about-testing about-docs about-workflow +help: about-testing -.PHONY: test docs +.PHONY: test diff --git a/docs/adapter.md b/docs/adapter.md deleted file mode 100644 index 95feee79..00000000 --- a/docs/adapter.md +++ /dev/null @@ -1,2 +0,0 @@ -loopback-data-adapter(3) - Adapter API explained. -==================== diff --git a/docs/changelog.md b/docs/changelog.md deleted file mode 100644 index 3eaaac0a..00000000 --- a/docs/changelog.md +++ /dev/null @@ -1,87 +0,0 @@ -loopback-connector-changelog(3) - The History of LoopbackData -=================================================== - -## HISTORY - -### upcoming release 0.3.0 - -* Documentation: - Available in [web](http://www.strongloop.com/products/loopback) and man [loopback-data(3)] - -* **Hooks**: - Changed format of update and save hooks. Hook accept data as second argument. - This data could be modified and it will be saved to database after hook done. - **NOTE**: this change could break some code. - -* **Datatypes**: - Now object casts type of member on assignment. It may cause issues if - mongodb's ObjectID was manually used as type for property. Solution: not use - it as type directly, and specify wrapper instead. - -### 0.2.1 - -* Introduced `include` method -* Use semver -* Added WebService adapter for client-side compound -* Added array methods to List -* Code cleanup and documenation amends -* Custom type registration -* Browserify-friendly core - -### 0.2.0 - -* Namespace adapter packages (should start with "loopback-connector-") -* Added [nano][loopback-connector-nano] adapter -* Adapters removed from core to separate packages - -### 0.1.27 - -* `autoupdate` fixes for MySQL -* Added `schema.isActual` to check whether migration necessary -* Redis adapter refactored and optimized (fully rewritten) -* Introduce sort-only indexes in redis -* Introduce List API (type: []) -* Update to MySQL 2.0 - -### 0.1.13 - -* Validations: sync/async, custom, bugfixes -* MySQL adapter enhancementsenhancements -* DB sync: autoupdate/automigrate -* Ability to overwrite getters/setters -* Resig-style model constructors -* Added [postgres][loopback-connector-postgres] adapter -* Added [sqlite3][loopback-connector-postgres] adapter -* Added [mongodb][loopback-connector-mongodb] adapter -* Redis adapter filter/sort rewriting -* Added `findOne` method -* Custom table names in sqlite, mysql and postgres -* Sequelize adapter removed -* Support `upsert` method -* Delayed db calls (wait for `.on('connected')`) - -### 0.0.6 - -* Tests -* Logging in MySQL and Redis - -### 0.0.4 - -* MySQL adapter -* Indexes in redis -* Neo4j cypher query support - -### 0.0.2 (16 Oct 2011) - -* Built-in adapters: [redis][loopback-connector-redis], mongoose, sequelize, neo4j -* Scopes -* Conditional validations, null checks everywhere -* Defaults applied on create - -### 0.0.1 - -Package extracted from [RailwayJS MVC](http://railwayjs.com) - -## SEE ALSO - -loopback-connector-roadmap(3) diff --git a/docs/connector.md b/docs/connector.md new file mode 100644 index 00000000..f1d51e07 --- /dev/null +++ b/docs/connector.md @@ -0,0 +1,5 @@ +# loopback-connector + +Loopback data sources are backed by connectors that communicates with backend systems including databases, REST APIs +and other services. + diff --git a/docs/schema.md b/docs/data-source.md similarity index 100% rename from docs/schema.md rename to docs/data-source.md diff --git a/docs/footer.html b/docs/footer.html deleted file mode 100644 index c0eb710d..00000000 --- a/docs/footer.html +++ /dev/null @@ -1,66 +0,0 @@ - - diff --git a/docs/ga.html b/docs/ga.html deleted file mode 100644 index fce662ed..00000000 --- a/docs/ga.html +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/docs/index.txt b/docs/index.txt index 91229d77..d3cf385a 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -1,33 +1,6 @@ -# man pages -loopback-data(3) index -loopback-connector-changelog(3) changelog.3 -loopback-connector-roadmap(3) roadmap.3 -loopback-connector-validations(3) validations.3 -loopback-connector-hooks(3) hooks.3 -loopback-connector-schema(3) schema.3 -loopback-connector-model(3) model.3 -loopback-connector-adapter(3) adapter.3 - # adapters github -loopback-connector-nano https://github.com/loopback-data/nano-adapter -loopback-connector-mysql https://github.com/loopback-data/mysql-adapter -loopback-connector-firebird https://github.com/loopback-data/firebird-adapter -loopback-connector-sqlite3 https://github.com/loopback-data/sqlite3-adapter -loopback-connector-postgres https://github.com/loopback-data/postgres-adapter -loopback-connector-redis https://github.com/loopback-data/redis-adapter -loopback-connector-mongodb https://github.com/loopback-data/mongodb-adapter - -# adapters npm -nano-adapter-npm https://npmjs.org/package/loopback-connector-nano -mysql-adapter-npm https://npmjs.org/package/loopback-connector-mysql -firebird-adapter-npm https://npmjs.org/package/loopback-connector-firebird -sqlite3-adapter-npm https://npmjs.org/package/loopback-connector-sqlite3 -postgres-adapter-npm https://npmjs.org/package/loopback-connector-postgres -redis-adapter-npm https://npmjs.org/package/loopback-connector-redis -mongodb-adapter-npm https://npmjs.org/package/loopback-connector-mongodb +loopback-connector-mongodb https://github.com/strongloop/loopback-connector-mongodb +loopback-connector-oracle https://github.com/strongloop/loopback-connector-oracle +loopback-connector-mysql https://github.com/strongloop/loopback-connector-mysql # external resources -github.com/loopback-data https://github.com/loopback-data -github.com/1602/loopback-data https://github.com/1602/loopback-data -issues https://github.com/1602/loopback-data/issues?state=open -jsdoc.info/1602/loopback-data http://jsdoc.info/1602/loopback-data diff --git a/docs/loopback-data.md b/docs/loopback-data.md index e32dbc3c..74417c83 100644 --- a/docs/loopback-data.md +++ b/docs/loopback-data.md @@ -1,124 +1,7 @@ -LoopbackData(3) - cross-database ORM for nodejs and browser -========================================================= +# loopback-data -## DESCRIPTION - -LoopbackData is a cross-db ORM for nodejs, providing **common interface** to access -most popular database formats. Currently supported db formats are: mysql, sqlite3, -postgres, couchdb, mongodb, redis, neo4j and in-memory-storage. - -LoopbackData also works on client-side (using WebService and Memory adapters), -which allow to write rich client-side apps talking to server using JSON API. - - -## INSTALLATION - -Use npm to install core package: - - npm install loopback-data --save - -Alternatively you can install loopback-data core from github: - - npm install 1602/loopback-data - -Then install adapter for specific database, for example `loopback-connector-redis`: - - npm install loopback-connector-redis - -See [ADAPTERS][] for list of available adapters. - -## DOCUMENTATION - -Autogenerated documentation available at [jsdoc.info/1602/loopback-data]. -Human-written manual sections are: - -* loopback-connector-schema(3): - Everything about schema, data types and model definition. - -* loopback-connector-model(3): - Model methods, features and internals. - -* loopback-connector-validations(3): - Built-in validators, creating custom validations, syncronous and asyncronous - object validation. - -* loopback-connector-hooks(3): - Hooks and object lifecycle. - -* loopback-connector-adapter(3): - Adapter API explained. - -## ADAPTERS - -All adapters available as separate packages at -[github.com/loopback-data] and published in npm. - -* MySQL: [github][loopback-connector-mysql] [npm][mysql-adapter-npm] -* SQLite3: [github][loopback-connector-sqlite3] [npm][sqlite3-adapter-npm] -* Postgres: [github][loopback-connector-postgres] [npm][postgres-adapter-npm] -* Redis: [github][loopback-connector-redis] [npm][redis-adapter-npm] -* MongoDB: [github][loopback-connector-mongodb] [npm][mongodb-adapter-npm] -* CouchDB/nano: [github][loopback-connector-nano] [npm][nano-adapter-npm] -* Firebird: [github][loopback-connector-firebird] [npm][firebird-adapter-npm] - -## CONTRIBUTION - -You can take part in improvement of loopback-data codebase and documents. If you see that some improvements can be done to loopback-data, then fork repository, make proposed changes and then create new pull request. -Please remember that your contribution is highly supported. Be sure to follow the discussion in google group and see [github issues][issues] before you make changes. It preferable that you post new comment in google group or in github before you make changes and create pull request. - -## FUTURE - -See loopback-connector-roadmap(3) and [github issues][issues] to catch up current -development and see how you can help loopback-data to grow up. - -## BUGS - -When you find issues, please report them: - -* github/core: - -* github/adapters: - -* email: - - -Provide test case for reproducing error. When reporting issue to core mention -adapter where problem could be reproduced. - -## HISTORY - -See loopback-connector-changelog(3) - -## COPYRIGHT - -LoopbackData is Copyright (C) 2011 Anatoliy Chakkaev http://anatoliy.in - -## AUTHOR - -* [blog](http://anatoliy.in/) -* [github/1602](https://github.com/1602/) -* [github/anatoliychakkaev](https://github.com/anatoliychakkaev/) -* [twitter@1602](http://twitter.com/1602) -* - -## CONTRIBUTORS - -### core contributors (more than 1%) - 410 Anatoliy Chakkaev 73.9% - 31 Sebastien Drouyer 5.6% - 25 1602 4.5% - 9 Muneeb Samuels 1.6% - 6 Henri Bergius 1.1% - -### adapters maintainers - -* [loopback-connector-nano] - [Nicholas Westlake](https://github.com/nrw) -* [loopback-connector-mysql] - [dgsan](https://github.com/dgsan) -* [loopback-connector-firebird] - [Henri Gourvest](https://github.com/hgourvest) - -*NOTE:* Other adapters waits for their maintainers, drop a line to - if you want to maintain some adapter on regular basis. +Loopback-data provides ORM and data connectivity for Node.js. ## SEE ALSO -loopback-connector-schema(3) +loopback-connector diff --git a/docs/roadmap.md b/docs/roadmap.md deleted file mode 100644 index 4f2eae07..00000000 --- a/docs/roadmap.md +++ /dev/null @@ -1,31 +0,0 @@ -loopback-connector-roadmap - The Future of LoopbackData -============================================= - -## DOCUMENTATION - -### ENGINE - -* web -* man - -### SECTIONS - -* hooks -* validations -* schema -* model -* adapters -* testing - -## MODEL CORE - -* schema switching -* common transaction support -* virtual attributes -* object presentation modes -* mass-assignment protection -* destroy by query - -## SCHEMA - -* models merging diff --git a/package.json b/package.json index ce98d9bb..3a008088 100644 --- a/package.json +++ b/package.json @@ -8,18 +8,8 @@ }, "main": "index.js", "scripts": { - "test": "make test", - "prepublish": "make build" + "test": "make test" }, - "man": [ - "./docs/man/loopback-data.3", - "./docs/man/schema.3", - "./docs/man/model.3", - "./docs/man/hooks.3", - "./docs/man/validations.3", - "./docs/man/roadmap.3", - "./docs/man/changelog.3" - ], "engines": [ "node >= 0.6" ], diff --git a/scripts/doc.sh b/scripts/doc.sh deleted file mode 100755 index dc57e0b1..00000000 --- a/scripts/doc.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -src=$1 -dest=$2 - -if ! [ `which ronn` ]; then - echo 'ronn rubygem is not installed, run "gem install ronn"' - exit 0 -fi - -mkdir -p $(dirname $dest) - -# VERSION=$(grep version package.json | perl -pi -e 's/[^-\d\.]//g') - -case $dest in - *.[13]) - ronn --roff $1 --pipe --organization=1602\ Software --manual=LoopbackData > $2 - exit $? - ;; - - *.html) - (ronn -5 $1 --pipe\ - --style='print toc'\ - --organization=1602\ Software\ - --manual=LoopbackData &&\ - cat docs/ga.html &&\ - cat docs/footer.html) > $2 - exit $? - ;; -esac