ember-learn/ember-jsonapi-docs

not seeing 3.14 option version in dropdown

Opened this issue · 6 comments

@sivakumar-kailasam @Gaurav0
I am continuing the discussion from emberjs/data#6449
I would like to test that PR locally but seem to only see versions up to 3.12 listed in the left navigation.

steps

Following the steps in the README.md.
I have local clones of ember.js, ember-data, and ember-api-docs in the parent directory.

  1. yarn gen --project ember-data --version 3.14.0
logs

yarn run v1.17.3
$ node -r esm generate-local.js --project ember-data --version 3.14.0
Running 'yarn'
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.




Running 'yarn build:production'
$ yarn workspace ember-data build:production
$ ember build --environment=production
info: Scanning for yuidoc.json file.
info: Loading package.json data from: somepath/ember/data/packages/-ember-data/package.json
info: Loading yuidoc.json data from: somepath/ember/data/packages/-ember-data/yuidoc.json
Environment: production
info: YUIDoc Starting from: ../../node_modules/ember-inflector/addon,../adapter/addon,../model/addon,../serializer/addon,../store/addon,../store/addon/-private/system,addon
info: Making out dir: /var/folders/r6/1tb0c_rn22xdhm39d62y6rfh0000gn/T/broccoli-20081dKVz20Kt71mF/out-211-broccoli_yuidoc/docs
info: Parsed 186 files in 0.249 seconds
info: Building..
info: Compiling Templates
info: Making default directories: classes,elements,modules,files
info: Copying Assets
info: Rendering and writing 6 modules pages.
info: Loading theme from somepath/ember/data/node_modules/yuidocjs/themes/default/theme.json
info: Preparing index.html
info: Writing API Meta Data
info: Writing index.html
info: Finished writing module files
info: Rendering and writing 45 class pages.
info: Rendering and writing 0 class pages.
info: Finished writing element files
info: Rendering and writing 95 source files.
info: Finished writing class files
info: Rendering and writing 95 source files.
info: Finished writing source files
info: Finished writing source files
info: Finished writing 242 files in 1.286 seconds
cleaning up...
Built project successfully. Stored in "dist/".
File sizes:
 - dist/assets/dummy.css: 0 B
 - dist/assets/dummy.js: 6.42 KB (1.54 KB gzipped)
 - dist/assets/vendor.css: 0 B
 - dist/assets/vendor.js: 611.45 KB (164.16 KB gzipped)
 - dist/docs/api.js: 5.71 KB (2.1 KB gzipped)
 - dist/docs/assets/css/main.css: 17.77 KB (4.88 KB gzipped)
 - dist/docs/assets/js/api-filter.js: 1.53 KB (604 B gzipped)
 - dist/docs/assets/js/api-list.js: 6.61 KB (2.05 KB gzipped)
 - dist/docs/assets/js/api-search.js: 2.86 KB (976 B gzipped)
 - dist/docs/assets/js/apidocs.js: 10.25 KB (2.99 KB gzipped)
 - dist/docs/assets/js/yui-prettify.js: 482 B (253 B gzipped)
 - dist/docs/assets/vendor/prettify/prettify-min.css: 675 B (322 B gzipped)
 - dist/docs/assets/vendor/prettify/prettify-min.js: 17.39 KB (7.06 KB gzipped)

$ node index.js --project ember-data --version 3.14.0 --ignorePreviouslyIndexedDoc
Downloading docs for ember-data. For version 3.14.0
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
✨  Done in 41.65s.

  1. run yarn server
  2. in the parent directory of ember-api-docs, run ember serve

I can navigate to the docs app fine but I only see 3.12 listed in the dropdown but would expect to see 3.14:
Screen Shot 2019-09-19 at 16 39 49

Is this expectation correct? Or have I missed a step somewhere?

I reread the README and I was missing yarn start:local which points to the local server listening on port 5050. If I run yarn start:local in ember-api-docs, however, I get another error because ember-api-docs cannot find the ember.json payload:
Screen Shot 2019-09-19 at 16 54 12

I would expect to preview just ember-data API documentation locally but could be wrong there as well.

If you need the entire docs to show up, then run yarn start without any args. The additional params is required when you're trying to build a specific version of ember/ember-data to view its output.

This isn't a great UX atm. This app is going to be rewritten over the next month to simplify it & to add new features from https://github.com/ember-learn/ember-jsonapi-docs/projects/1, so at the end of that, these kind of issues should be sorted out.

If you need the entire docs to show up, then run yarn start without any args. The additional params is required when you're trying to build a specific version of ember/ember-data to view its output.

Ah, I think this makes more sense. So I would only want to run that command to work with the YUI doc output directly, not to run in the full api docs app.

Sounds great about upcoming UX improvements. Feel free to ping me for some user testing.

So I'm guessing I cannot build a single projects version of the documentation?
I cannot run yarn start because I do not have the S3 credentials:

yarn start
yarn run v1.17.3
$ node index.js
Downloading docs for ember & ember-data
Error: Command failed with exit code 1 (EPERM): aws s3 sync s3://api-docs.emberjs.com/rev-index tmp/rev-index

Any valid s3 credential (even your own) can be used for the setup. The readme has details around it.

Interesting. Apparently my S3 credentials don't work 😆:

 aws s3 ls s3://api-docs.emberjs.com/rev-index/

An error occurred (AccessDenied) when calling the ListObjectsV2 operation: Access Denied

Thanks for the help too. I will see about trying later with other S3 credentials.