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

2015年にpublishしたnpm modules

mizuki_r
January 08, 2016

2015年にpublishしたnpm modules

GotandaJS #2 の発表資料です

mizuki_r

January 08, 2016
Tweet

More Decks by mizuki_r

Other Decks in Technology

Transcript

  1. INTRODUCE FOR NPM MODULES PUBLISHED ON 2015 HARIKO ▸ https://www.npmjs.com/package/hariko

    ▸ API-BlueprintͷυΩϡϝϯτʹैͬͯɺAPIϞοΫαʔόʔΛ ্ཱͪ͛Δ ▸ ʮுΓࢠʯ໊͕લͷ༝དྷ ▸ stubcellͱeasymockͷྑ͍ॴΛഈआͯ͠ιʔεΛAPI- Blueprintʹͨ͠ ▸ ଞͷϞοΫαʔόʹͳ͔ͬͨʮ΍Γ͍ͨ͜ͱʯΛ٧ΊࠐΜͩ
  2. INTRODUCE FOR NPM MODULES PUBLISHED ON 2015 HARIKO # GET

    /api/message + Response 200 (text/plain) {“content”: “message”} $ npm install -g hariko $ hariko -f docs/api/message.md [INFO] Running Hariko Server ... http://localhost:3000 $ curl http://localhost:3000/api/message {“content”: “message”}
  3. INTRODUCE FOR NPM MODULES PUBLISHED ON 2015 ANGULAR-PERIOD ▸ https://www.npmjs.com/package/angular-period

    ▸ ظؒΛࢦఆ͢Δͱɺݱࡏ೔࣌ͷʮաڈʯʮݱࡏʯʮະདྷʯ ͷύλʔϯͰDOMΛग़͠෼͚ΔAngularJSͷDirective ▸ ͦ͏͍͏࢓༷Ͱ࣮૷ͨ͠ࡍʹʮ͜ΕଞͰ΋࢖͑Δͳʯͱࢥͬ ͯ֎ग़ͨ͠͠
  4. INTRODUCE FOR NPM MODULES PUBLISHED ON 2015 ANGULAR-PERIOD angular.module('campaign', ['angularPeriod']);

    <div class="campaign" ng-period ng-period-start="'2016-01-08T19:30:00'" ng-period-end ="'2016-01-08T23:59:59'"> <!-- ظؒલͷදࣔ --> <div ng-period-when="previous"> <p>ޒ൓ాJS։࠵͢ΔΑʂ</p> <!-- ظؒதͷදࣔ --> <div ng-period-when=“during”> <p>ઈࢍLTதʂ</p> </div> <!-- ظؒޙͷදࣔ --> <div ng-period-when="after"> <p>ϒϩάΛॻ͘·Ͱ͕ͨ͐͝͡ʔʂ</p> </div> </div>
  5. INTRODUCE FOR NPM MODULES PUBLISHED ON 2015 ACTION-TRACKER ▸ https://www.npmjs.com/package/action-tracker

    ▸ Google Analyticsͷϥούʔ ▸ PromiseͰॲཧͰ͖ͨΓ͢Δ ▸ ΋ͱ΋ͱ͸τϥοΩϯάͷ൚༻తͳI/FΛ໨ࢦ͍ͯͨ͠Μͩ ͚ͲɺͨͲΓண͔ͣʹͨͩͷϥούʔʹͳͬͨ ▸ ػձ͕͋Ε͹ͦ͏͍͏ײ͡ʹ͢Δ͔΋͠Εͳ͍
  6. INTRODUCE FOR NPM MODULES PUBLISHED ON 2015 ACTION-TRACKER <script src="dist/action-tracker.min.js"></script>

    <script> ga('create', {YOUR PROPERTY ID}) </script> <script> var tracker = ActionTracker() $('a[data-tracker]').on('click', function () { tracker.emit('anchor', 'click', $(this).text()) }) </script>
  7. RECONSIDE RATION ABOUT PUBLISHING NPMʹ্͛ΔϝϦοτ ▸ `npm install` ͰೖΕ΍͍͢ ▸

    ͋ͬͪͬͪ͜Ͱ࢖͑Δɺ࢖͍΍͘͢ͳΔ ▸ ࢖ͬͯ΋Β͍΍͘͢ͳΔ ▸ ؾ߹ೖΕͯ࡞ΔΑ͏ʹͳΔ ▸ ؾ͍ͮͨΒ͍͍ײ͡ʹinstall͕৳ͼͯΔʢ͔΋͠Εͳ͍ʣ
  8. RECONSIDE RATION ABOUT PUBLISHING ൓ল఺ ▸ issueʹؾ͔ͮͳ͍ࣄ͕͋ͬͨ ▸ ͜·ΊʹgithubνΣοΫ ▸

    ࣗ෼͕࢖Θͳ͘ͳΔͱ์ஔ͕ͪ͠ ▸ issue଴ͪ ▸ blogͱ͔Ͱshare͠ͳ͍ͱؾ͍ͮͯ΋Β͑ͳ͍ ▸ blogॻ͜͏
  9. RECONSIDE RATION ABOUT PUBLISHING શମΛ௨ͯ͠ ▸ ۀ຿ͱ͸ҟͳΔӡ༻Ͱ஌ݟ͕޿͕ͬͨ ▸ version, changelogͷӡ༻

    ▸ badgeΛར༻ͨ͠ΫΦϦςΟҡ࣋ ▸ DL਺΍Star਺͕૿͑ΔͱϞνϕ্͕͕Δ ▸ ීஈͱҧ͏ίτΛΧδϡΞϧʹࢼͤͯΠΠ ▸ ʮnpmʹ্͛Δͧʂʯͬͯࢥ͏ͱͳΜ͔ؾ߹͸͍Δ