Closed nshoes closed 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?
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):
settings.json.default
from fauxton. Remove any addons you don't need - config, cluster setup etc
. Rename the file to settings.json
.pouchdb-styles
.{
"name": "pouchdb-style",
"path": "../pouchdb-fauxton/addons/pouchdb-style"
}
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.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.Upgraded!
This issue will track the upgrade of Fauxton and and the surrounding discussions.