You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2018/04/05 21:21:18 UTC
[couchdb-documentation] branch migrate-working-with-forms updated
(7ed6ab4 -> 560fe00)
This is an automated email from the ASF dual-hosted git repository.
wohali pushed a change to branch migrate-working-with-forms
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git.
omit 7ed6ab4 Start JS development tips doc
new 560fe00 Start JS development tips doc
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (7ed6ab4)
\
N -- N -- N refs/heads/migrate-working-with-forms (560fe00)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
To stop receiving notification emails like this one, please contact
wohali@apache.org.
[couchdb-documentation] 01/01: Start JS development tips doc
Posted by wo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wohali pushed a commit to branch migrate-working-with-forms
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git
commit 560fe00e4479d4d7ca9543f825e76b3e21139663
Author: Joan Touzet <jo...@atypical.net>
AuthorDate: Thu Apr 5 16:50:32 2018 -0400
Start JS development tips doc
---
.travis.yml | 2 +-
src/best-practices/index.rst | 1 +
src/best-practices/jsdevel.rst | 35 +++++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index ff8d8b0..4eba051 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
language: python
python:
- 2.7
- - 3.4
+ - 3.6
install:
- pip install sphinx sphinx_rtd_theme
diff --git a/src/best-practices/index.rst b/src/best-practices/index.rst
index 40d1e4d..0ea8c7a 100644
--- a/src/best-practices/index.rst
+++ b/src/best-practices/index.rst
@@ -25,3 +25,4 @@ system.
:maxdepth: 2
forms
+ jsdevel
diff --git a/src/best-practices/jsdevel.rst b/src/best-practices/jsdevel.rst
new file mode 100644
index 0000000..f10c618
--- /dev/null
+++ b/src/best-practices/jsdevel.rst
@@ -0,0 +1,35 @@
+.. Licensed under the Apache License, Version 2.0 (the "License"); you may not
+.. use this file except in compliance with the License. You may obtain a copy of
+.. the License at
+..
+.. http://www.apache.org/licenses/LICENSE-2.0
+..
+.. Unless required by applicable law or agreed to in writing, software
+.. distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+.. WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+.. License for the specific language governing permissions and limitations under
+.. the License.
+
+.. _best-practices/jsdevel:
+
+===========================
+JavaScript development tips
+===========================
+
+Working with Apache CouchDB's JavaScript environment is a lot different than
+working with traditional JavaScript development environments. Here are some
+tips and tricks that will ease the difficulty.
+
+.. rst-class:: open
+
+- Remember that CouchDB's JavaScript engine is old, only supporting the
+ ECMA-262 5th edition ("ES5") of the language. ES6/2015 and newer constructs
+ cannot be used.
+
+- The ``log()`` function will log output to the CouchDB log file or stream.
+ You can log strings, objects, and arrays directly, without first converting
+ to JSON. Use this in conjunction with a local CouchDB instance for best
+ results.
+
+- Be sure to guard all document accesses to avoid exceptions when fields
+ or subfields are missing: ``if (doc && doc.myarray && doc.myarray.length)...``
--
To stop receiving notification emails like this one, please contact
wohali@apache.org.