Skip to content
This repository has been archived by the owner on Jan 4, 2020. It is now read-only.

Provide a link to internal Documentation on how to use NPM #115

Open
marcellodesales opened this issue Jan 13, 2016 · 2 comments
Open

Provide a link to internal Documentation on how to use NPM #115

marcellodesales opened this issue Jan 13, 2016 · 2 comments

Comments

@marcellodesales
Copy link

We are looking at a way to give users a link to the internal documentation on how to use NPM... For instance, when we login at the internal GitHub Enterprise, new users are given a nice introduction about how to publish a new repository...

screen shot 2016-01-12 at 4 42 44 pm

Maybe this could be done with #108, and that could show a profile page showing all the steps that the user needs to know, be aware of, understand, and properly setup. Specially with the new concept of scopes, which is new...

What we Did

What I ended up doing was to add a link back to our internal wiki page.

screen shot 2016-01-12 at 4 37 59 pm

I added a volume that overrides the default implementation of the front page showing the top link.

Requirement

  • Provide a simplified way to show the steps to use NPMO:
    • How to login
    • How to install a given NPM module
    • How to Publish a given NPM module: This is the tricky part, where we could add a hook to display all the URLs for our GitHub Enterprise
@kevinSuttle
Copy link

@marcellodesales How did you add a link in there?

@marcellodesales
Copy link
Author

@kevinSuttle here's the procedure, which is very weak patching of the existing source-code:

    1. docker cp newww:/etc/npme/node_modules/newww/templates/layouts/default.hbs /tmp/patch.hbs
    1. Patch the file with the following:
    {{#if features.npmo}}

      <nav>
        <a href="https://wiki.mycompany.com/display/nodejs/Intuit+NPM+Registry" style="color: #4E6DCC;">tutorial</a>
        <a href="https://docs.npmjs.com">docs</a>
        <a href="https://goo.gl/CihCMg">support</a>
      </nav>

    {{else}}
    1. Start the newww container with the patch.
newwwData:
  image: busybox
  volumes:
    - ./patches/newww/templates-layouts-default.hbs-with-tutorial:/etc/npme/node_modules/newww/templates/layouts/default.hbs

I usually update the newww version and I need to re-patch it. So, have to be careful with this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants