Skip to content

Instantly share code, notes, and snippets.

@iamskok
Forked from coolaj86/how-to-publish-to-npm.md
Last active August 29, 2015 14:22

Revisions

  1. AJ ONeal revised this gist Apr 25, 2014. 1 changed file with 9 additions and 5 deletions.
    14 changes: 9 additions & 5 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -26,15 +26,19 @@ Beta and Release versions

    If you don't want something to install by default

    npm publish ./ --tag beta
    ```bash
    npm publish ./ --tag beta
    ```

    If you published a bugfix as v1.0.7 and need to set v1.1.3 back to latest

    git checkout v1.0.7
    npm publish ./
    ```bash
    git checkout v1.0.7
    npm publish ./

    git checkout v1.1.3
    npm tag foobar@1.1.3 latest
    git checkout v1.1.3
    npm tag foobar@1.1.3 latest
    ```

    More Info
    ---
  2. AJ ONeal revised this gist Apr 25, 2014. 1 changed file with 19 additions and 2 deletions.
    21 changes: 19 additions & 2 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -21,13 +21,30 @@ Then create a `package.json` and publish it:

    npm publish ./

    More Info:
    Beta and Release versions
    ---

    If you don't want something to install by default

    npm publish ./ --tag beta

    If you published a bugfix as v1.0.7 and need to set v1.1.3 back to latest

    git checkout v1.0.7
    npm publish ./

    git checkout v1.1.3
    npm tag foobar@1.1.3 latest

    More Info
    ---

    * http://npmjs.org/doc/json.html
    * http://npmjs.org/doc/developers.html
    * http://blog.izs.me/post/1675072029/10-cool-things-you-probably-didnt-realize-npm-could-do

    Appendix:
    Appendix
    ---

    If you haven't already installed npm, or you'd like the latest version:

  3. AJ ONeal revised this gist Jul 5, 2013. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -25,6 +25,7 @@ More Info:

    * http://npmjs.org/doc/json.html
    * http://npmjs.org/doc/developers.html
    * http://blog.izs.me/post/1675072029/10-cool-things-you-probably-didnt-realize-npm-could-do

    Appendix:

  4. AJ ONeal revised this gist Nov 7, 2011. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    Getting Started with NPM (as a developer)
    ===

    If you haven't already set your NPM author info, now you should:

    npm set init.author.name "Your Name"
  5. AJ ONeal revised this gist Nov 7, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@ Then create a `package.json` and publish it:
    npm install -g pakmanager
    # this shows you dependencies as you `require`d them
    pakmanager deps
    # now edit `package.json` and add any deps you forgot aboutt
    # now edit `package.json` and add any deps you forgot about

    npm publish ./

  6. AJ ONeal revised this gist Oct 26, 2011. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -6,11 +6,16 @@ If you haven't already set your NPM author info, now you should:

    npm adduser


    Then create a `package.json` and publish it:

    cd /path/to/your-project
    npm init

    npm install -g pakmanager
    # this shows you dependencies as you `require`d them
    pakmanager deps
    # now edit `package.json` and add any deps you forgot aboutt

    npm publish ./

    More Info:
  7. AJ ONeal revised this gist Oct 26, 2011. 1 changed file with 6 additions and 4 deletions.
    10 changes: 6 additions & 4 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -22,8 +22,10 @@ Appendix:

    If you haven't already installed npm, or you'd like the latest version:

    # OS X
    curl http://npmjs.org/install.sh | sh
    **OS X**

    # Linux
    curl http://npmjs.org/install.sh | sudo sh
    curl http://npmjs.org/install.sh | sh

    **Linux**

    curl http://npmjs.org/install.sh | sudo sh
  8. AJ ONeal renamed this gist Oct 26, 2011. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  9. AJ ONeal created this gist Oct 26, 2011.
    29 changes: 29 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    If you haven't already set your NPM author info, now you should:

    npm set init.author.name "Your Name"
    npm set init.author.email "you@example.com"
    npm set init.author.url "http://yourblog.com"

    npm adduser


    Then create a `package.json` and publish it:

    cd /path/to/your-project
    npm init
    npm publish ./

    More Info:

    * http://npmjs.org/doc/json.html
    * http://npmjs.org/doc/developers.html

    Appendix:

    If you haven't already installed npm, or you'd like the latest version:

    # OS X
    curl http://npmjs.org/install.sh | sh

    # Linux
    curl http://npmjs.org/install.sh | sudo sh