Objection.js: Convert documentation to vuepress

Created on 16 May 2018  Â·  41Comments  Â·  Source: Vincit/objection.js

Hey, sorry if I'm out of line here. I've been using Objection.js for a little while and I love it. I have almost no complaints. The library is well designed and the documentation is usually clear and comprehensive.

However, it takes about 10 seconds to become interactive on my extremely modern (6 months old) computer built for computation. Ctrl-F takes forever and isn't that helpful because 9/10 whatever I'm looking for is used in every other example.

I don't know that the right thing to do would be to split it up into multiple pages, but it seems no one has brought this problem up yet, at least in the issues. Could be an area of improvement. I wouldn't be offended if this issue is closed because it's not something the team is particularly interested in improving. It's definitely usable at the moment, but it's a bit of a time suck.

docs enhancement

Most helpful comment

The new docs are finally slowly coming together! Here's a preview http://vincit.github.io/objection.js/new-docs/

All 41 comments

This was at least partly inspired by the fact that it took me like 10 minutes to find the typo again in #923.

I actually like the documentation, a lot, having written my own documentation and having had to wade through many, many others'. I would say it covers 90% of normal use cases with clear examples.

I do not have trouble scrolling through the docs on my computer and do not notice any sort of slow-down - are you sure it's not a browser issue?

My specs:
https://pcpartpicker.com/b/8zFtt6
Running Safari in macOS.

To be clear, I'm definitely not criticizing the content in any way whatsoever. I love the content and the search feature seems quite nice.

As for scrolling, it definitely takes me at least 5 seconds before the page will even acknowledge the scroll. It could be a "browser issue" for some definition of the term, but I don't really have this issue on any other pages, including non-static pages. It's not really mysterious, in my opinion. document.querySelectorAll('*').length yields 28125 on the Objection documentation and 4456 on Facebook, which should probably be a more demanding application.

My specs are in this image:

2018-05-16_14-51-46

on Ubuntu 16.04 / Chrome.

Though it's worth noting I'm always running tons of programs (current free memory is hovering around 2/16GB). A competent, relatively unburdened computer should be able to handle the documentation in a reasonable amount of time, but the question in my mind isn't really "Should my computer be able to handle this?" but "Should my computer need to be able to handle this?".

@rivertam Yeah I know. It runs some super heavy useless javascript indexing when it loads, probably for the search feature. The site uses slate and I have never found time to try to figure out how to fix the slowness. The site itself is just one static html blob, and it should load in a split second. I'll see what I can do. The only easy solution is probably to remove the search feature.

I've only ever experienced slowness when loading the page, never after that. If you have a five second delay when scrolling, you could be dealing with something else too.

@koskimas Hmm... At the risk of sounding contrarian, I'd argue the search feature is more important than load speed because Ctrl-F is mostly useless.

I don't know anything about slate, but some solutions that occur to me are offloading the indexing to a web-worker and caching the index serverside so it doesn't have to be calculated in realtime.

I don't experience slowness after the load. As I mentioned, my memory is always hanging pretty low, so I'm rarely able to have a lot of tabs open at once (and I work on a lot of applications), so I pretty much have to open the docs up every time I look stuff up and close it after I find the answer.

@rivertam TBH I wasn't even aware there was a search feature, thanks! I've been using Ctrl+F (well Cmd+F) this whole time.. and not to discount your experience but I was perfectly able to find the section you created a PR for when Cmd+F'ing transaction.

Reading through the slate docs, this seems like this issue might be better suited for slate than here, unless we want to move off of slate (which seems like it'd be more trouble than it would be worth).

@heisian Yeah, I definitely should have clarified here. Finding the typo on the documentation was actually quite easy. Finding it on GitHub on the inline editor was more difficult because Ctrl-F wasn't working (not sure why, but this is obviously a flaw in GitHub) and the documentation is simply enormous. My point there was more that maintaining one gigantic documentation file (or, in this case, 3-4 gigantic documentation files) is potentially harder than maintaining multiple documentation files named by their feature. I see now, however, that it would be better to tackle this (relatively minor) issue by splitting up the main docs into their own includes, but that wouldn't affect the runtime performance.

Actually the culprit seems to be the jquery plugin that generates the table of content on the left side :smile: No idea how that could be so slow. Need to investigate some more. When I disable that, the load time goes from 4 seconds to 0.3

I'd like to swap slate to a better alternative, but that would be an enormous task. Even if we select a site generator that takes markdown files as input, the files would need to be mostly rewritten because the formatting is specific to slate (because of the "split-screen" layout).

The jquery plugin seems to be beyond repair. There's nothing that can be easily done. Splitting the site to separate pages would be one option, but the biggest selling point of slate is that everything is on the same page. There's no way to configure slate to use separate pages.

We should just ditch slate and select a better site generator, but that would take all my objection time for a couple of months.

@koskimas Do you really think it would take a couple of months? I have no problem donating some time (Objection.js is one of my favorite projects, and I love documentation, especially when I'm just organizing it, not writing it), but if it would really take months, that might be out of scope for my benevolence. :stuck_out_tongue:

I don't mean two months full time :smile: I'm using something like 8 hours a week on objection, so by couple of months I mean more like 60 hours.

With slate, the examples are on the right side and not mixed in with the text. The text never mentions anything in the examples because of that. I'd like to mix the examples within the documentation text and that would require the text to be mostly rewritten (while keeping all the content).

Another thing that probably needs to be changed is the argument and return value formatting.

In addition to that, even getting the new site running will take the first 8 hours or so.

We could probably do this in stages though. The first version could have the current content in some semi-sensible layout. Then we could refactor it piece by piece.

vuepress seems like a good modern alternative that uses markdown files.

I enjoy writing documentation as well and would be willing to pitch in, but I'm ultimately not convinced that Objection needs new docs. Finding good documentation "frameworks" can be difficult too, but some of the better ones I've seen are the widely-popular Sphinx and apidocjs.com (which may not work for this since it's more focused on REST APIs?).

IMO the most readable and aesthetically-pleasing docs ever reside at:
https://laravel.com/docs/5.6
https://hexdocs.pm/phoenix/Phoenix.html
(although, notice how slowly some of the Phoenix doc pages scroll...)

I started moving to vuepress, and my estimate of 60 hours of work is probably pretty accurate. In addition to the things I mentioned, we need to update every single link in the documentation to match the new place. There is no way to automate that because in the current site, everything is an anchor.

Harsh. Are you doing this in a branch? Sounds like a lot of gruntwork I might be able to help with over the next couple of weeks.

Awesome! I'll push it in a branch asap with instructions how to build it. Vuepress seems super nice to work with!

@rivertam There's now a branch called new-docs. simply checkout that branch, run npm install and then npm run docs:dev and start writing some markdown in newDoc folder. npm run docs:dev serves the site at port 8080 and automatically rebuilds on the go.

I added some initial structure to the site. If you have time to help, you could start porting the API documentation to the new site? How does that sound? I could start porting other parts of the docs. I added some thoughts in nedDoc/api/model.md using <!-- html comments --> about how I'd like the new API documentation to be structured.

Will definitely get started tonight if possible. Can't make any promises on time commitments for the next couple of weeks (moving apartments and getting ready for a demo at the same time!), but I'll try to commit/PR frequently.

Any help is greatly appreciated! Don't worry if you don't find time, I completely understand. I'll leave the API part alone for now anyway. It's going to take at least a couple of weeks of my time to get the other parts ported.

@rivertam Hopefully I'll be able to join the effort next week as well, do you think this work is splittable well?

@igor-savin-ht :heart: This task is easily splittable! You could for example start by porting the recipes section, but let's see where we are if/when you can join in.

@igor-savin-ht I see no reason why not. Maybe we'll just post in this thread what we're about to convert and make sure no one's already claimed it. I'm going to try to go as granularly as possible, so it'll be along the lines of

  1. Sit down
  2. Claim Section A
  3. Rewrite Section A
  4. Commit and push Section A
  5. GOTO step 2 (or break)

If I get interrupted during step 3, I'll just edit my comment to say "actually, didn't get to this".

I see no reason the cycle should take more than 5 minutes, so interruptions should be fairly infrequent.

ya'll are on it! this is great.

Digging in now, starting with models.md. I think I'm going to stray away from your outline a little bit to better match the current documentation. Namely, I'm going to use ## for larger sections than individual members ("Overview", "Methods") because the current documentation does that more often.

I'd also like to see if it's possible to make the examples collapsible. Not sure what your opinion on that is.

I'd also like to see if it's possible to make the examples collapsible. Not sure what your opinion on that is.

I like this idea! I thought about it myself. We probably need to use a custom component, but that's possible with vuepress.

I'm going to use ## for larger sections than individual members ("Overview", "Methods") because the current documentation does that more often.

This is ok, but I think we lose the actual method names from the TOC this way? Or maybe it is possible to have more than two levels in the TOC? Without the method names being in the TOC, I fear they are difficult to find.

More TOC levels can be added by writing

sidebarDepth: 2
---

to the beginning of the .md file.

So I've been working on a different example custom component, which is a component that lets you provide essentially ES2017 and ESNext translations. it seems like a really common thing on the current documentation, but including both takes up a lot of vertical space (it did before, too). So I introduced a janky hack for tabbed examples a la W3Schools.

It's pretty weirdly implemented, and I explain the logic in the commit message (will link in a second), but one thing that's nice about it is it will be dead simple to make the examples collapsible from here. It will take a little bit of design.

Unfortunately, I didn't do that much actual documentation. :stuck_out_tongue:

edit: I'm referring to #928

@rivertam Nice!

@rivertam I'm done with the other parts and will move on to port the API docs now. Let me know if you are working on something there so that we don't get a merge conflict hell.

Okay awesome. Sorry, the move has been more taxing than expected. Not working on anything atm.

@koskimas I can start contributing to this issue; any parts that are available for pickup at this moment?

@kibertoad Great! I haven't yet started porting the API reference, so you can just start there if you want. I've ported the main page, guide, and recipe book. Only thing missing is the API reference.

@kibertoad Have you started working on something? I could start porting the API docs now and I don't want to redo the stuff you've done.

@koskimas Got sidetracked and never got to that, sorry. When I get portable computer at a new job I could get back to that, though, which hopefully should be this week.

I'm unable to get anything to serve on localhost:8080 after running npm run docs:dev..

Console output

~/Web/objection [new-docs|✔] 
11:06 $ npm run docs:dev

> [email protected] docs:dev /Users/ethos/Web/objection
> vuepress dev newDoc


Compiling


  VuePress dev server listening at http://localhost:8080/

âš  ï½¢wdmï½£: Hash: 3a4b6420a8017f61e662
Version: webpack 4.13.0
Time: 22645ms
Built at: 2018-06-28 11:06:31
                         Asset       Size  Chunks             Chunk Names
                assets/js/0.js   16.6 KiB       0  [emitted]  
assets/img/search.83621669.svg  216 bytes          [emitted]  
              assets/js/app.js   1.94 MiB     app  [emitted]  app
                assets/js/1.js   22.7 KiB       1  [emitted]  
                assets/js/2.js   34.4 KiB       2  [emitted]  
                assets/js/3.js    182 KiB       3  [emitted]  
                assets/js/4.js   15.3 KiB       4  [emitted]  
                assets/js/5.js   70.3 KiB       5  [emitted]  
                assets/js/6.js   14.7 KiB       6  [emitted]  
                assets/js/7.js   35.7 KiB       7  [emitted]  
                assets/js/8.js   33.2 KiB       8  [emitted]  
                assets/js/9.js   85.1 KiB       9  [emitted]  
               assets/js/10.js   17.2 KiB      10  [emitted]  
               assets/js/11.js    263 KiB      11  [emitted]  
               assets/js/12.js   70.9 KiB      12  [emitted]  
               assets/js/13.js    659 KiB      13  [emitted]  
               assets/js/14.js    127 KiB      14  [emitted]  
               assets/js/15.js    201 KiB      15  [emitted]  
               assets/js/16.js   80.4 KiB      16  [emitted]  
               assets/js/17.js   61.9 KiB      17  [emitted]  
               assets/js/18.js   38.5 KiB      18  [emitted]  
               assets/js/19.js   65.7 KiB      19  [emitted]  
               assets/js/20.js   76.9 KiB      20  [emitted]  
               assets/js/21.js   25.2 KiB      21  [emitted]  
               assets/js/22.js    129 KiB      22  [emitted]  
               assets/js/23.js   94.9 KiB      23  [emitted]  
               assets/js/24.js   28.9 KiB      24  [emitted]  
               assets/js/25.js   38.6 KiB      25  [emitted]  
               assets/js/26.js   77.4 KiB      26  [emitted]  
               assets/js/27.js   40.7 KiB      27  [emitted]  
               assets/js/28.js   26.9 KiB      28  [emitted]  
               assets/js/29.js   56.4 KiB      29  [emitted]  
               assets/js/30.js   57.7 KiB      30  [emitted]  
               assets/js/31.js   69.4 KiB      31  [emitted]  
               assets/js/32.js    155 KiB      32  [emitted]  
               assets/js/33.js   54.8 KiB      33  [emitted]  
               assets/js/34.js    162 KiB      34  [emitted]  
               assets/js/35.js   23.4 KiB      35  [emitted]  
               assets/js/36.js    579 KiB      36  [emitted]  
                    index.html  287 bytes          [emitted]  
Entrypoint app = assets/js/app.js
[./node_modules/register-service-worker/index.js] 3.38 KiB {app} [built]
[./node_modules/vuepress/lib/app/.temp/polyfill.js] 90 bytes {app} [built]
[./node_modules/vuepress/lib/app/.temp/routes.js] 11.3 KiB {app} [built]
[./node_modules/vuepress/lib/app/.temp/siteData.js] 12.7 KiB {app} [built]
[./node_modules/vuepress/lib/app/ClientOnly.js] 301 bytes {app} [built]
[./node_modules/vuepress/lib/app/Content.js] 366 bytes {app} [built]
[./node_modules/vuepress/lib/app/app.js] 2.29 KiB {app} [built]
[./node_modules/vuepress/lib/app/clientEntry.js] 2.05 KiB {app} [built]
[./node_modules/vuepress/lib/app/dataMixin.js] 2.31 KiB {app} [built]
[./node_modules/webpack-hot-client/client/hot.js] (webpack)-hot-client/client/hot.js 4.91 KiB {app} [built]
[./node_modules/webpack-hot-client/client/index.js?cde2340a-9b19-4a3c-855f-7c548ead9ee7] (webpack)-hot-client/client?cde2340a-9b19-4a3c-855f-7c548ead9ee7 1.86 KiB {app} [built]
[./node_modules/webpack-hot-client/client/log.js] (webpack)-hot-client/client/log.js 2.4 KiB {app} [built]
[./node_modules/webpack-hot-client/client/socket.js] (webpack)-hot-client/client/socket.js 1.39 KiB {app} [built]
[0] multi ./node_modules/vuepress/lib/app/clientEntry.js 28 bytes {app} [built]
[1] multi webpack-hot-client/client?cde2340a-9b19-4a3c-855f-7c548ead9ee7 ./node_modules/vuepress/lib/app/clientEntry.js 40 bytes {app} [built]
    + 249 hidden modules

WARNING in ./newDoc/api/model.md
Module Warning (from ./node_modules/vuepress/lib/webpack/markdownLoader.js):

File for relative link "#tojson/" does not exist.
(Resolved file: /Users/ethos/Web/objection/newDoc/api/#tojson/README.md)

 @ ./node_modules/vuepress/lib/app/.temp/routes.js 24:8-64
 @ ./node_modules/vuepress/lib/app/app.js
 @ ./node_modules/vuepress/lib/app/clientEntry.js
 @ multi ./node_modules/vuepress/lib/app/clientEntry.js

WARNING in ./newDoc/guide/query-examples.md
Module Warning (from ./node_modules/vuepress/lib/webpack/markdownLoader.js):

File for relative link "/api/query-builder.html/#allowinsert" does not exist.
(Resolved file: /Users/ethos/Web/objection/newDoc/api/query-builder.html/README.md)

 @ ./node_modules/vuepress/lib/app/.temp/routes.js 124:8-75
 @ ./node_modules/vuepress/lib/app/app.js
 @ ./node_modules/vuepress/lib/app/clientEntry.js
 @ multi ./node_modules/vuepress/lib/app/clientEntry.js

WARNING in ./newDoc/guide/query-examples.md
Module Warning (from ./node_modules/vuepress/lib/webpack/markdownLoader.js):

File for relative link "/api/query-builder.html/#allowinsert" does not exist.
(Resolved file: /Users/ethos/Web/objection/newDoc/api/query-builder.html/README.md)

 @ ./node_modules/vuepress/lib/app/.temp/routes.js 124:8-75
 @ ./node_modules/vuepress/lib/app/app.js
 @ ./node_modules/vuepress/lib/app/clientEntry.js
 @ multi ./node_modules/vuepress/lib/app/clientEntry.js

WARNING in ./newDoc/guide/query-examples.md
Module Warning (from ./node_modules/vuepress/lib/webpack/markdownLoader.js):

File for relative link "/api/query-builder.html/#allowinsert" does not exist.
(Resolved file: /Users/ethos/Web/objection/newDoc/api/query-builder.html/README.md)

 @ ./node_modules/vuepress/lib/app/.temp/routes.js 124:8-75
 @ ./node_modules/vuepress/lib/app/app.js
 @ ./node_modules/vuepress/lib/app/clientEntry.js
 @ multi ./node_modules/vuepress/lib/app/clientEntry.js

WARNING in ./newDoc/guide/query-examples.md
Module Warning (from ./node_modules/vuepress/lib/webpack/markdownLoader.js):

File for relative link "/api/query-builder.html/#allowinsert" does not exist.
(Resolved file: /Users/ethos/Web/objection/newDoc/api/query-builder.html/README.md)

 @ ./node_modules/vuepress/lib/app/.temp/routes.js 124:8-75
 @ ./node_modules/vuepress/lib/app/app.js
 @ ./node_modules/vuepress/lib/app/clientEntry.js
 @ multi ./node_modules/vuepress/lib/app/clientEntry.js

WARNING in ./newDoc/guide/query-examples.md
Module Warning (from ./node_modules/vuepress/lib/webpack/markdownLoader.js):

File for relative link "/api/query-builder.html/#delete" does not exist.
(Resolved file: /Users/ethos/Web/objection/newDoc/api/query-builder.html/README.md)

 @ ./node_modules/vuepress/lib/app/.temp/routes.js 124:8-75
 @ ./node_modules/vuepress/lib/app/app.js
 @ ./node_modules/vuepress/lib/app/clientEntry.js
 @ multi ./node_modules/vuepress/lib/app/clientEntry.js
Child html-webpack-plugin for "index.html":
         Asset      Size  Chunks  Chunk Names
    index.html  1.38 MiB       0  
    Entrypoint undefined = index.html
    [./node_modules/lodash/lodash.js] 527 KiB {0} [built]
    [./node_modules/vuepress-html-webpack-plugin/lib/loader.js!./node_modules/vuepress/lib/app/index.dev.html] 421 bytes {0} [built]
    [./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {0} [built]
  [11:06:31] ✔ successfully compiled.
âš  ï½¢wdmï½£: Hash: c1e4ce22902b00d8c386
Version: webpack 4.13.0
Time: 11124ms
Built at: 2018-06-28 11:06:31
                               Asset       Size  Chunks             Chunk Names
                      assets/js/0.js   16.6 KiB       0             
a222a8814c59fc677480.hot-update.json   44 bytes          [emitted]  
                     assets/js/18.js   38.5 KiB      18             
                    assets/js/app.js   1.94 MiB     app  [emitted]  app
                      assets/js/1.js   22.7 KiB       1             
                      assets/js/2.js   34.4 KiB       2             
                      assets/js/3.js    182 KiB       3             
                      assets/js/4.js   15.3 KiB       4             
                      assets/js/5.js   70.3 KiB       5             
                      assets/js/6.js   14.7 KiB       6             
                      assets/js/7.js   35.7 KiB       7             
                      assets/js/8.js   33.2 KiB       8             
                      assets/js/9.js   85.1 KiB       9             
                     assets/js/10.js   17.2 KiB      10             
                     assets/js/11.js    263 KiB      11             
                     assets/js/12.js   70.9 KiB      12             
                     assets/js/13.js    659 KiB      13             
                     assets/js/14.js    127 KiB      14             
                     assets/js/15.js    201 KiB      15             
                     assets/js/16.js   80.4 KiB      16             
                     assets/js/17.js   61.9 KiB      17             
      assets/img/search.83621669.svg  216 bytes                     
                     assets/js/19.js   65.7 KiB      19             
                     assets/js/20.js   76.9 KiB      20             
                     assets/js/21.js   25.2 KiB      21             
                     assets/js/22.js    129 KiB      22             
                     assets/js/23.js   94.9 KiB      23             
                     assets/js/24.js   28.9 KiB      24             
                     assets/js/25.js   38.6 KiB      25             
                     assets/js/26.js   77.4 KiB      26             
                     assets/js/27.js   40.7 KiB      27             
                     assets/js/28.js   26.9 KiB      28             
                     assets/js/29.js   56.4 KiB      29             
                     assets/js/30.js   57.7 KiB      30             
                     assets/js/31.js   69.4 KiB      31             
                     assets/js/32.js    155 KiB      32             
                     assets/js/33.js   54.8 KiB      33             
                     assets/js/34.js    162 KiB      34             
                     assets/js/35.js   23.4 KiB      35             
                     assets/js/36.js    579 KiB      36             
3a4b6420a8017f61e662.hot-update.json   35 bytes          [emitted]  
                          index.html  287 bytes          [emitted]  
Entrypoint app = assets/js/app.js
[./node_modules/register-service-worker/index.js] 3.38 KiB {app}
[./node_modules/vuepress/lib/app/.temp/polyfill.js] 90 bytes {app}
[./node_modules/vuepress/lib/app/.temp/routes.js] 11.3 KiB {app}
[./node_modules/vuepress/lib/app/.temp/siteData.js] 12.7 KiB {app}
[./node_modules/vuepress/lib/app/ClientOnly.js] 301 bytes {app}
[./node_modules/vuepress/lib/app/Content.js] 366 bytes {app}
[./node_modules/vuepress/lib/app/app.js] 2.29 KiB {app}
[./node_modules/vuepress/lib/app/clientEntry.js] 2.05 KiB {app}
[./node_modules/vuepress/lib/app/dataMixin.js] 2.31 KiB {app}
[./node_modules/webpack-hot-client/client/hot.js] (webpack)-hot-client/client/hot.js 4.91 KiB {app}
[./node_modules/webpack-hot-client/client/index.js?cde2340a-9b19-4a3c-855f-7c548ead9ee7] (webpack)-hot-client/client?cde2340a-9b19-4a3c-855f-7c548ead9ee7 1.86 KiB {app}
[./node_modules/webpack-hot-client/client/log.js] (webpack)-hot-client/client/log.js 2.4 KiB {app}
[./node_modules/webpack-hot-client/client/socket.js] (webpack)-hot-client/client/socket.js 1.39 KiB {app}
[0] multi ./node_modules/vuepress/lib/app/clientEntry.js 28 bytes {app}
[1] multi webpack-hot-client/client?cde2340a-9b19-4a3c-855f-7c548ead9ee7 ./node_modules/vuepress/lib/app/clientEntry.js 40 bytes {app}
    + 249 hidden modules

WARNING in ./newDoc/api/model.md
Module Warning (from ./node_modules/vuepress/lib/webpack/markdownLoader.js):

File for relative link "#tojson/" does not exist.
(Resolved file: /Users/ethos/Web/objection/newDoc/api/#tojson/README.md)

 @ ./node_modules/vuepress/lib/app/.temp/routes.js 24:8-64
 @ ./node_modules/vuepress/lib/app/app.js
 @ ./node_modules/vuepress/lib/app/clientEntry.js
 @ multi ./node_modules/vuepress/lib/app/clientEntry.js

WARNING in ./newDoc/guide/query-examples.md
Module Warning (from ./node_modules/vuepress/lib/webpack/markdownLoader.js):

File for relative link "/api/query-builder.html/#allowinsert" does not exist.
(Resolved file: /Users/ethos/Web/objection/newDoc/api/query-builder.html/README.md)

 @ ./node_modules/vuepress/lib/app/.temp/routes.js 124:8-75
 @ ./node_modules/vuepress/lib/app/app.js
 @ ./node_modules/vuepress/lib/app/clientEntry.js
 @ multi ./node_modules/vuepress/lib/app/clientEntry.js

WARNING in ./newDoc/guide/query-examples.md
Module Warning (from ./node_modules/vuepress/lib/webpack/markdownLoader.js):

File for relative link "/api/query-builder.html/#allowinsert" does not exist.
(Resolved file: /Users/ethos/Web/objection/newDoc/api/query-builder.html/README.md)

 @ ./node_modules/vuepress/lib/app/.temp/routes.js 124:8-75
 @ ./node_modules/vuepress/lib/app/app.js
 @ ./node_modules/vuepress/lib/app/clientEntry.js
 @ multi ./node_modules/vuepress/lib/app/clientEntry.js

WARNING in ./newDoc/guide/query-examples.md
Module Warning (from ./node_modules/vuepress/lib/webpack/markdownLoader.js):

File for relative link "/api/query-builder.html/#allowinsert" does not exist.
(Resolved file: /Users/ethos/Web/objection/newDoc/api/query-builder.html/README.md)

 @ ./node_modules/vuepress/lib/app/.temp/routes.js 124:8-75
 @ ./node_modules/vuepress/lib/app/app.js
 @ ./node_modules/vuepress/lib/app/clientEntry.js
 @ multi ./node_modules/vuepress/lib/app/clientEntry.js

WARNING in ./newDoc/guide/query-examples.md
Module Warning (from ./node_modules/vuepress/lib/webpack/markdownLoader.js):

File for relative link "/api/query-builder.html/#allowinsert" does not exist.
(Resolved file: /Users/ethos/Web/objection/newDoc/api/query-builder.html/README.md)

 @ ./node_modules/vuepress/lib/app/.temp/routes.js 124:8-75
 @ ./node_modules/vuepress/lib/app/app.js
 @ ./node_modules/vuepress/lib/app/clientEntry.js
 @ multi ./node_modules/vuepress/lib/app/clientEntry.js

WARNING in ./newDoc/guide/query-examples.md
Module Warning (from ./node_modules/vuepress/lib/webpack/markdownLoader.js):

File for relative link "/api/query-builder.html/#delete" does not exist.
(Resolved file: /Users/ethos/Web/objection/newDoc/api/query-builder.html/README.md)

 @ ./node_modules/vuepress/lib/app/.temp/routes.js 124:8-75
 @ ./node_modules/vuepress/lib/app/app.js
 @ ./node_modules/vuepress/lib/app/clientEntry.js
 @ multi ./node_modules/vuepress/lib/app/clientEntry.js
Child html-webpack-plugin for "index.html":
                                   Asset      Size  Chunks             Chunk Names
                              index.html  1.38 MiB       1             
    a222a8814c59fc677480.hot-update.json  44 bytes          [emitted]  
    Entrypoint undefined = index.html
    [./node_modules/lodash/lodash.js] 527 KiB {1}
    [./node_modules/vuepress-html-webpack-plugin/lib/loader.js!./node_modules/vuepress/lib/app/index.dev.html] 421 bytes {1}
    [./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {1}


Webpack builds correctly (with warnings) but no connection can be established when navigating to localhost:8080, 0.0.0.0:8080, or 127.0.0.1:8080.

I edited the newDocs/.vuepress/config.js:

module.exports = {
  ...otherStuff, // pseudo code

  host: '0.0.0.0',
  port: 9099,
}

and got it working.

I do not have any other servers running on the default 8080 but it's possible there are permissions restraints on that port.. typically that's only the case for ports below 8000, so not sure what the deal was.

Anyways, I think I will do a bit of doc'cing.

@heisian @rivertam @kibertoad Thanks for offering to help with this, but I ended up making big changes to the documentation and it's just easier for me to port it to the new site than to explain the changes to everyone.

The new docs are finally slowly coming together! Here's a preview http://vincit.github.io/objection.js/new-docs/

The search is still quite crappy. It will be replaced with a full text search before I release the docs.

Done! Search will be improved once objection is accepted by algolia people https://community.algolia.com/docsearch/

Was this page helpful?
0 / 5 - 0 ratings