1st npm

982 views

Published on

Quick HOW-to create your first NPM package presented at NodeMontreal (nodemtl.com) 28th July 2011.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
982
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

1st npm

  1. 1. Your 1st NPM Package Camilo Lopez <camilo@camilolopez.com>Tuesday, June 28, 2011
  2. 2. http://npmjs.org/Tuesday, June 28, 2011
  3. 3. http://search.npmjs.org/Tuesday, June 28, 2011
  4. 4. package.json + stuffTuesday, June 28, 2011
  5. 5. { “package.json” : [“version”, “name” ] }Tuesday, June 28, 2011
  6. 6. stuff : gziped tarball of package.json & codeTuesday, June 28, 2011
  7. 7. • Install (curl + sh or git clone + make) • npm init • Tweak package.json • Hack away (do not forget to test) • npm adduser • npm publish • ??? • Profit!Tuesday, June 28, 2011
  8. 8. $ curl http://npmjs.org/install.sh | shTuesday, June 28, 2011
  9. 9. Tuesday, June 28, 2011
  10. 10. OR git clone + makeTuesday, June 28, 2011
  11. 11. • Install (curl + sh or git clone + make) • npm init • Tweak package.json • Hack away (do not forget to test) • npm adduser • npm publish • ??? • Profit!Tuesday, June 28, 2011
  12. 12. $ npm initTuesday, June 28, 2011
  13. 13. Tuesday, June 28, 2011
  14. 14. • Install (curl + sh or git clone + make) • npm init • Tweak package.json • Hack away (do not forget to test) • npm adduser • npm publish • ??? • Profit!Tuesday, June 28, 2011
  15. 15. package.jsonTuesday, June 28, 2011
  16. 16. Tuesday, June 28, 2011
  17. 17. • Install (curl + sh or git clone + make) • npm init • Tweak package.json • Hack away (do not forget to test) • npm adduser • npm publish • ??? • Profit!Tuesday, June 28, 2011
  18. 18. code code code code...Tuesday, June 28, 2011
  19. 19. ehem ...Tuesday, June 28, 2011
  20. 20. test code test code ...Tuesday, June 28, 2011
  21. 21. TDD: Nodeunit (assert + friends) BDD: Jasmine/VowsTuesday, June 28, 2011
  22. 22. .npmignoreTuesday, June 28, 2011
  23. 23. $ npm linkTuesday, June 28, 2011
  24. 24. $ npm linkTuesday, June 28, 2011
  25. 25. Tuesday, June 28, 2011
  26. 26. $ npm install nodemtl/Tuesday, June 28, 2011
  27. 27. Tuesday, June 28, 2011
  28. 28. • Install (curl + sh or git clone + make) • npm init • Tweak pakage.json • Hack away (do not forget to test) • npm adduser • npm publish • ??? • Profit!Tuesday, June 28, 2011
  29. 29. $ npm adduserTuesday, June 28, 2011
  30. 30. $ npm publishTuesday, June 28, 2011
  31. 31. • Install (curl + sh or git clone + make) • npm init • Tweak package.json • Hack away (do not forget to test) • npm adduser • npm publish • ??? • Profit!Tuesday, June 28, 2011
  32. 32. $ npm help https://github.com/isaacs/npm/blob/ master/doc/developers.md http://howtonode.org/introduction-to- npm http://howtonode.org/creating-custom- modulesTuesday, June 28, 2011
  33. 33. ?Tuesday, June 28, 2011

×