pouchdb / express-pouchdb

⚠️⚠️⚠️ THIS REPO HAS MOVED ⚠️⚠️⚠️
143 stars 52 forks source link

Upgrade Fauxton #413

Closed nshoes closed 7 years ago

nshoes commented 7 years ago

This issue will track the upgrade of Fauxton and and the surrounding discussions.

janl commented 7 years ago

Instructions from @garrensmith on Slack

You just need to create a new module and add it to the settings.json file. See any of the other addons as examples. Then create a less file for style overrides.

The “other addons” live here: https://github.com/apache/couchdb-fauxton/tree/master/app/addons

Maybe start by copy and pasting on of those with a new name and try editing the resulting .less file.

@garrensmith is it possible to use an npm dependency as an addon? That way we could do a fauxton-addon-pouchdb-express module with the required files, and get that in without having to edit the Fauxton settings file?

garrensmith commented 7 years ago

This is awesome. Here is a more detailed explanation on how to do this: This can be done in either the express-pouchdb repo or another. I would recommend doing it in another repo and then putting the completed built artifacts in express-pouchdb (or maybe in another folder of express-pouchdb):

  1. Clone fauxton we will need it for building pouchdb-fauxton
  2. Create a repo and copy the settings.json.default from fauxton. Remove any addons you don't need - config, cluster setup etc. Rename the file to settings.json.
  3. Create another folder to use as your override styles folder e.g pouchdb-styles.
  4. Add that folder to the settings.json but include its directory relative from the fauxton folder e.g
    {
    "name": "pouchdb-style",
    "path": "../pouchdb-fauxton/addons/pouchdb-style"
    }
  5. In the styles folder create an assets/less/styles.less and a base.js. In the base.js do a require('...path/to/styles.less');. Also create an initialise function to export. See any other base.js file for an example.
  6. Then copy the settings.json file to fauxton directory. Run npm run dev this should load your module and pouchdb-fauxton on port 8000. Have pouchdb-server/express-pouchdb on port 5984 and it should all work.
  7. automate the copy process using make or whatever you prefer.
  8. Read the fauxton readme for building, testing etc.
  9. Let me know on this PR if you need help. I'm on leave so not actively at my desk to help but will try when I have time.
nolanlawson commented 7 years ago

Upgraded!