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/08/10 02:00:58 UTC

[couchdb-documentation] branch master updated: Add info on JS transpiling with link to Babel's in-browser repl-editor

This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git


The following commit(s) were added to refs/heads/master by this push:
     new e07be92  Add info on JS transpiling with link to Babel's in-browser repl-editor
e07be92 is described below

commit e07be92ab5af6f1cbcc7f6b51778c00f869e75e6
Author: Dave Willenberg <da...@detroit-english.de>
AuthorDate: Fri Aug 10 00:52:32 2018 +0200

    Add info on JS transpiling with link to Babel's in-browser repl-editor
---
 src/best-practices/jsdevel.rst | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/best-practices/jsdevel.rst b/src/best-practices/jsdevel.rst
index f10c618..a19563f 100644
--- a/src/best-practices/jsdevel.rst
+++ b/src/best-practices/jsdevel.rst
@@ -26,6 +26,13 @@ tips and tricks that will ease the difficulty.
   ECMA-262 5th edition ("ES5") of the language. ES6/2015 and newer constructs
   cannot be used.
 
+  Fortunately, there are many tools available for transpiling modern JavaScript
+  into code compatible with older JS engines. The `Babel Project website
+  <http://babeljs.io/repl>`_, for example, offers an in-browser text editor
+  which transpiles JavaScript in real-time. Configuring CouchDB-compatibility
+  is as easy as enabling the ``ENV PRESET`` option, and typing "firefox 4.0"
+  into the *Browsers* field.
+
 - 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