Advertisement

Hello npm

Programmer
May. 16, 2016
Advertisement

More Related Content

Advertisement
Advertisement

Hello npm

  1. hello npm!
  2. me = { name: "muyuu", twitter: "@anticyborg", belongs: "freelance", job: "Web Front-End Engineer" };
  3. • Web • Web /LP
  4. • Web • Web /LP
  5. • • html css js • JS UI •
  6. • UI • •
  7. • •
  8. project_root └ htdocs/ └ src/ └ html/ (index.jade ) └ css/ (style.sass ) └ js/ (main.js ) └ modules/ └ tab/ _tab.sass tab.js
  9. • • src
  10. npm
  11. what is npm?
  12. what is npm? • JavaScript • • • NodeJS •
  13. • npm • • • Github • package.json npm
  14. npm • npm • https://www.npmjs.com/signup
  15. npm • npm adduser • username, passwod, emailaddress
  16. • npm • URL • https://www.npmjs.com/package/${name}
  17. • gulp • common.js • github
  18. npm package.json { "name": " ", "version": "1.0.0", "description": " ", "author": " ", "license": " ", "main": " ", "repository": {"type": " ","url": " URL"} }
  19. npm package.json { "scripts": {" ": " "} "dependencies": " ", "devDependencies": " ", }
  20. npm package.json { "files": ["npm "] } .npmignore
  21. npm publish
  22. • ( ) • • push • npm publish!
  23. • • http://semver.org/lang/ja/
  24. • 1.1.1 • ( ).( ).( ) • • •
  25. npm publish
  26. (script ) • npm install packagename -D html <script src="/node_modules/pkg/pkg.js"></script> <script src="/assets/js/app.js"></script>
  27. (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/')); });
  28. (browseiry) • npm install packagename -D • main.js require var pkg = require('pakegename'); pkg();
  29. • Web • Web /LP
  30. • Web • Web /LP
  31. Speee
  32. Speee • • Splatoon • • • • Rails (Ruby Matz )
  33. Speee • • •
  34. Speee • • •
Advertisement