build: faster build for less/css & without grunt

this slices our first build step out of the monolithic grunt build.

improvements:

 - faster less build
 - no useless css files for modules in debug folder, just one
   `index.css`
 - multiple targets possible (so we don't need to build from
   `dist/debug` in the future

performance for less build & concat:

```
old:
 - 762ms -- 757ms + 5ms (separate concat)

new:
 - 597ms
```

why is it faster?

1. previous buildstep wrote css files on the disk to read & concat
it later

2. grunt.readfile / grunt.readjson are slow compared to the native
require function which also supports caching

needs node 4.x like our travis builds

PR: #586
PR-URL: https://github.com/apache/couchdb-fauxton/pull/586
Reviewed-By: Benjamin Keen <ben.keen@gmail.com>
4 files changed
tree: da976ae2a1895971ed6dce0e2c9cdca2f67091a1
  1. app/
  2. assets/
  3. bin/
  4. build-helper/
  5. tasks/
  6. test/
  7. .eslintignore
  8. .eslintrc
  9. .gitignore
  10. .travis.yml
  11. code-layout.md
  12. CONTRIBUTING.md
  13. couchapp.js
  14. extensions.md
  15. favicon.ico
  16. Gruntfile.js
  17. i18n.json.default.json
  18. index.js
  19. LICENSE
  20. package.json
  21. readme.md
  22. settings.json.default.json
  23. settings.json.sample_external
  24. styleguide.md
  25. tests.md
  26. writing_addons.md
readme.md

Fauxton

Fauxton is the new Web UI for CouchDB. To get it running in development on your machine. Follow the steps below.

Install via NPM

You can use the latest release of Fauxton via npm:

npm install -g fauxton
fauxton

See fauxton --help for extra options.

Setting up Fauxton

Please note that a recent installation of node.js and npm is required.

  1. make sure you have CouchDB installed. Instructions on how to install it can be
    found here
  2. fork this repo: https://github.com/apache/couchdb-fauxton.git and make sure you have a cloned local copy
  3. add upstream to the main git repo: git remote add git-repo https://github.com/apache/couchdb-fauxton.git
  4. add upstream to the private apache repo: git remote add upstream http://git-wip-us.apache.org/repos/asf/couchdb-fauxton.git
  5. go to your cloned copy of the repo (usually couchdb-fauxton) and type npm install to download all dependencies
  6. install the grunt-cli (grunt command line interface)

In case you don't have the Grunt command line interface installed, run the following command:

npm install -g grunt-cli

If you run into a permissions problem, run that last command as an administrator:

sudo npm install -g grunt-cli

Running Fauxton

NOTE: Before you run Fauxton, don't forget to start CouchDB!

The Dev Server

Using the dev server is the easiest way to use Fauxton, especially when developing for it. In the cloned repo folder, type:

grunt dev

Wait until you see the “Fauxton” ascii art on your command line, then you should be able to access Fauxton at http://localhost:8000

Preparing a Fauxton Release

Follow the “Setting up Fauxton” section above, then edit the settings.json variable root where the document will live, e.g. /_utils/. Then type:

grunt couchdb

This will install the latest version of Fauxton into /share/www/

To Deploy Fauxton

To deploy to your local CouchDB instance:

grunt couchapp_deploy

(Optional) To avoid a npm global install

# Development mode, non minified files
npm run couchdebug

# Or fully compiled install
npm run couchdb

More information

Check out the following pages for a lot more information about Fauxton:


-- The Fauxton Team