Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Building node.js Modules

338 views

Published on

From DevLink 2014

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Building node.js Modules

  1. 1. Building node.js Modules Kevin Griffin DevLink 2014
  2. 2. Kevin Griffin Independent Consultant. Bootstrapper. All around nice guy. kevin@kevgriffin.com twitter.com/1kevgriff
  3. 3. Stuff I Make @1kevgriff - kevgriffin.com
  4. 4. Like slides and code after the event?
  5. 5. http://bit.ly/ GriffDevLink1
  6. 6. Package Managers
  7. 7. npmjs.org
  8. 8. Three types of modules
  9. 9. require(‘./myFile’)
  10. 10. require(‘./myFile.js’) or require(‘./myFile.json’)
  11. 11. require(‘./myFolder’)
  12. 12. require(‘./myFolder/index.js’)
  13. 13. require(‘myModule’)
  14. 14. Getting Setup to Publish to npm
  15. 15. 1.Create new user account at npmjs.org 2.Go to terminal/command prompt 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
  16. 16. npm init npm publish
  17. 17. npm publish
  18. 18. And let there be code…
  19. 19. Thanks for attending! Kevin Griffin kevin@kevgriffin.com twitter.com/1kevgriff http://bit.ly/GriffDevLink1

×