You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Ember JSON API Docs [](https://travis-ci.org/ember-learn/ember-jsonapi-docs)
2
2
3
-
If are looking for the app behind https://emberjs.com/api/, visit
3
+
If are looking for the app behind https://emberjs.com/api/, visit
4
4
[ember-api-docs](https://github.com/ember-learn/ember-api-docs) instead. This ember-jsonapi-docs
5
5
repository is internal tooling that is not required to run the ember-api-docs app locally.
6
6
@@ -11,42 +11,52 @@ The script pulls yuidoc build output from all Ember versions from Amazon S3, con
The app accesses builds.emberjs.com (an Amazon S3 bucket) in read-only mode, which is public. This requires any valid AWS credentials.
22
24
23
25
You can get your credentials by logging into your [AWS console](https://console.aws.amazon.com) 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.
24
-
1. To test your changes in the app run,
25
-
```node index.js```
26
-
Once complete, if no errors you should see a docs.tar file inside the `tmp` folder. The app tries to process all
27
-
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`.
28
-
You are setting your node max heap space to 8GB, so make sure you have that much space available on your machine.
29
26
27
+
1. To test your changes in the app run,
28
+
`node index.js`
29
+
Once complete, if no errors you should see a docs.tar file inside the `tmp` folder. The app tries to process all
30
+
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`.
31
+
You are setting your node max heap space to 8GB, so make sure you have that much space available on your machine.
30
32
31
33
## To Generate docs for a specific project and/or version for development
32
34
33
35
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`.
34
-
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.
36
+
You need an additional flag `AWS_SHOULD_PUBLISH=true`for publishing the docs.
37
+
38
+
## To override a specific version of a doc with a different yuidoc from your machine (For core contributors)
39
+
40
+
- Read this section first!
41
+
- We assume you have the keys to the kingdom before you start doing this (AWS keys to publish to api-docs.emberjs.com & all necessary env variables that need to be set) 😄
42
+
- In its present form this should be used only when there aren't new docs out there that are yet to be processed. As in if ember 3.3 is released but isn't indexed yet you should waitfor this app to finish processing it via the cron job we have on heroku before you can proceed to modify any of the existing docs from your machine.
43
+
- First run `yarn start` so that you have all the docs from s3 on your local. This is important so that we don't loose other versions of docs that are already out there when the index files are generated
44
+
- Then go to `./tmp/s3-docs/<the_version_you_want_to_replace>` and override the file there with the yuidoc file that you want to be processed. Ensure that the file name is same as the one that's already there.
45
+
- Then run `yarn start --project=ember-data --version=3.2.0 --ignorePreviouslyIndexedDoc`. Make sure you enter the entire version(including patch version).
35
46
36
47
## Generating API Documentation and Testing API Docs Locally
37
48
38
49
These steps are only necessary if you are trying to run the ember-api-docs
39
50
app with documentation pulled from a local copy of ember.js.
40
51
41
-
1. Clone the following 4 repositories into a single parent directory. Install dependencies foreach app as describedin their respective `README` files.
1. Set up the project according to the instructions above in`Running the app`.
47
-
1. From the `ember-jsonapi-docs` directory, run `./generate-local.sh yui ember 2.18.0`. This command runs the Ember documentation build, generates jsonapi output, and copies it to the `ember-api-docs` directory. To build ember data documentation, run `./generate-local.sh yui ember-data 2.17.2`.
48
-
- _If you encounter an error like `ember-2.18.0 has already been indexed in json-docs`, then use a new unique version number like `2.18.1`, or whatever is appropriate.
49
-
- If your `rev-index/ember-X.X.X.json` file fails to generate, make sure you have all dependencies installed for the ember.js repo
50
-
- If you are debugging failed builds, periodically clear out the contents of the `tmp` directory, and run the script again. Past failed runs can cause subsequent runs to fail in unexpected ways._
51
-
1. 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.
52
-
52
+
1. Clone the following 4 repositories into a single parent directory. Install dependencies foreach app as describedin their respective `README` files.
1. Set up the project according to the instructions above in`Running the app`.
58
+
1. From the `ember-jsonapi-docs` directory, run `./generate-local.sh yui ember 2.18.0`. This command runs the Ember documentation build, generates jsonapi output, and copies it to the `ember-api-docs` directory. To build ember data documentation, run `./generate-local.sh yui ember-data 2.17.2`.
59
+
- \_If you encounter an error like `ember-2.18.0 has already been indexed in json-docs`, then use a new unique version number like `2.18.1`, or whatever is appropriate.
60
+
- If your `rev-index/ember-X.X.X.json` file fails to generate, make sure you have all dependencies installed for the ember.js repo
61
+
- If you are debugging failed builds, periodically clear out the contents of the `tmp` directory, and run the script again. Past failed runs can cause subsequent runs to fail in unexpected ways.\_
62
+
1. 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.
0 commit comments