Skip to content

Latest commit

 

History

History
57 lines (30 loc) · 3.06 KB

api-instructions.md

File metadata and controls

57 lines (30 loc) · 3.06 KB

For Interfaces, Events, or Members of Either

Thank you for helping the web platform.

A Note about Code Examples

Code examples are not applications. Many practices of application building are not appropriate for code examples. Since the code example you create will eventually be on MDN, we use their guidelines. Please read them, especially if you have never done code examples for documentation.

Instructions

Here are the instructions for creating an interface page.

  1. From a command line change to the directory where you installed the Puppy tool.

  2. Checkout the content creation branch.
    git checkout puppy

  3. Update the repo to get the latest changes.
    git pull

  4. To create a working branch and boilerplate page, run:

    npm run create -- -i itemName

    where itemName is an interface, constructor, event, event callback, method, or property.

    This creates a new branch named for the interface or event. Use the interface or event name exactly as it would appear in JavaScript. for example:

    npm run create -- -i ServiceWorker

  5. Follow the on-screen instructions. If you need to refer to them later, they are roughly like this:

    1. Open the newly created file. (The location should have been printed on screen. If you do not see it, type git status.)

    2. Replace square-bracketed [[tokens]] with the specified information.

    3. Answer the questions in the file's comments.

    4. If you are implementing a spec with multiple interfaces, repeat step 4 for each interface you are adding. To reuse the branch created in step 3, use the -r flag. For example:

      npm run create -- -i interfaceName -r

      If you do not use the -r flag, commit your current branch before repeating.

  6. (Optional) If you want to help DevRel with the interfaces' subpages, rerun the script as many times as needed to create subpages for constructors, event callbacks, methods, and properties. We plan to make the sub pages for you; however we're not going to turn down any offer of help.

    Do not do this if you your feature is in a developer trial or an origin trial.

  7. Ensure that all your new files are committed and push your branches to origin.

  8. Open a browser and go to https://github.com/GoogleChromeLabs/puppy-content.git.

  9. Open pull requests or each of your branches against the default branch. Developer Relations will review your submission within a week and request changes, if needed.

  10. When your writing branch is merged, you may delete your local copy.

  11. Please record the time you spent working on your documents. This helps us understand the time commitment required by this project. It's not required, but it would really help us out.