Skip to content

jaredgalanis/ember-jsonapi-docs

 
 

Repository files navigation

Ember JSON API Docs Build Status

This app is for turning ember API doc build output into json api compliant data for use in various applications seeking to use the Ember API.

The script pulls yuidoc build output from all Ember versions from Amazon S3, converts it to json api format and creates an archive.

Running the app

  1. Fork/Clone ember-jsonapi-docs

  2. Run yarn or npm install (Needs node 6+)

  3. Set up AWS access

    export AWS_ACCESS_KEY=xxxxxx
    export AWS_SECRET_KEY=xxxxx

    The app accesses builds.emberjs.com (an Amazon S3 bucket) in read-only mode, which is public. This requires any valid AWS credentials.

    You can get your credentials by logging into your AWS console and navigating to "My Security Credentials" under your profile name. You can generate a new pair under the "Access Keys (Access Key ID and Secret Access Key)" section.

  4. To test your changes in the app run, node index.js Once complete, if no errors you should see a docs.tar file inside the tmp folder. The app tries to process all ember & ember-data versions since 1.0 which takes high memory & time to complete. If you intend it, then run node --max_old_space_size=8192 index.js. You are setting your node max heap space to 8GB, so make sure you have that much space available on your machine.

To Generate docs for a specific project and/or version for development

You can do this by passing --project ember/ember-data --version 2.11.1 as an argument to the index script. e.g., yarn start -- --project ember --version 2.11.0. Setting export SKIP_S3_SYNC=yes will stop the generator from syncing s3 content. You need an additional flag AWS_SHOULD_PUBLISH=true for publishing the docs.

Generating API Documentation and Testing API Docs Locally

  1. Clone the following 3 repositories into a single parent directory
  2. Set up the project according to the instructions above in Running the app.
  3. From the ember-jsonapi-docs directory, run ./generate-local.sh yui ember 2.16.0. This command runs the Ember documentation build, generates jsonapi output, and copies it to the ember-api-docs directory.
  4. Run the API app with the newly generated local data by running API_HOST=http://localhost:4200 ember s in the ember-api-docs directory.

About

fixes up the ember docs generated by YUIDoc to be in JSONAPI format + some other niceties

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 96.8%
  • Shell 3.2%