hello npm

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →

hello npm

初夏のJavaScript祭で発表したスライドです

Muyuu Fujita

May 14, 2016

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

41 slides
  1. Ϟδϡʔϧ project_root └ htdocs/ └ src/ └ html/ (index.jadeͱ͔ॾʑ) └

    css/ (style.sassͱ͔ॾʑ) └ js/ (main.jsͱ͔ॾʑ) └ modules/ └ tab/ _tab.sass tab.js
  2. npmͷྲّྀʹ߹ΘͤΔ package.jsonʹඞཁࣄ߲هೖ { "name": "Ϟδʔϧ໊", "version": "1.0.0", "description": "֓ཁจ", "author":

    "࡞ऀ໊", "license": "ϥΠηϯεܗࣜ", "main": "ϞδϡʔϧຊମϑΝΠϧ", "repository": {"type": "ϦϙδτϦ","url": "ϦϙδτϦURL"} }
  3. ެ։ͨ͠ύοέʔδΛ࢖͏(concat) • npm install packagename -D • gulpfile.jsͰconcat͢ΔϑΝΠϧʹؚΊΔ gulp.task("concat", =>{

    gulp.src([ 'node_modules/pkg/pkg.js', 'src/js/main.js' ]) .pipe(concat('app.js')) .pipe(gulp.dest('./htddocs/')); });

Other Decks in Technology