Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Writing and Maintaining Meteor Packages

Writing and Maintaining Meteor Packages

Presented at Meteor Charlotte on 2015-05-04 with Mark Bellaire (@mgbellaire).

http://www.meetup.com/Meteor-Charlotte/events/219628136/

Mark Shropshire

May 04, 2015
Tweet

More Decks by Mark Shropshire

Other Decks in Technology

Transcript

  1. W R I T I N G A N D

    M A I N TA I N I N G M E T E O R PA C K A G E S @ M G B E L L A I R E A N D @ S H R O P
  2. W H AT I S A M E T E

    O R PA C K A G E ? • Meteor code wrapped up and available to run in a browser, sever, and/or mobile device • Available to be added to Meteor apps via meteor add <package-name> • Most are hosted on github and available on http:// atmospherejs.com
  3. U S E C A S E S F O

    R PA C K A G E S • In Meteor core • Share useful functionality with the Meteor community • Wrap up other JS libraries and tools • Break up functionality of your application in logical chunks
  4. L E T ’ S M A K E A

    PA C K A G E • meteor create --package my:package
  5. L E T ’ S T E S T A

    PA C K A G E • mkdir -p packages • ln -s /path/to/my:package packages/ my:package • meteor add my:package
  6. • An easier way: • export PACKAGE_DIRS=/path/to/packages • Then just

    use $ meteor add <package-name> • PACKAGE_DIRS is searched for packages prior to https://packages.meteor.com L E T ’ S T E S T A PA C K A G E
  7. D E M O N S T R AT I

    O N S • https://github.com/hb5co/meteor-freewall • https://github.com/hb5co/meteor-is.js
  8. L E T ’ S P U B L I

    S H A PA C K A G E • $ meteor publish —create • You may have to authenticate with your meteor.com user account the first time you run the publish command
  9. PA C K A G E T E S T

    I N G • Use Tinytest • https://www.eventedmind.com/feed/meteor- testing-packages-with-tinytest • https://github.com/Sanjo/meteor-jasmine#testing-a- package
  10. R E S O U R C E S •

    Using packages
 http://docs.meteor.com/#/full/usingpackages • Writing packages
 http://docs.meteor.com/#/full/writingpackages • Publish packages
 https://atmospherejs.com/i/publishing