Yeoman generator своими руками

  • View
    1.691

  • Download
    7

Embed Size (px)

Text of Yeoman generator своими руками

1. Yeoman Generator Yeoman-: ? yeoman- ? , , . 2. : , ? ? 3. , -. WordPress. , WordPress MVC/OOP yeoman generator 4. #1 5. ? 6. ? 7. ? 8. ? 9. ? , , ctrl+c, ctrl+v, - 10. ? 11. - 12. ctrl + c ctrl + c ctrl + v ctrl + v 13. ? , , ctrl+c, ctrl+v, - 14. 15. #2 16. 17. #3 18. 15 2014 - oDesk: $1/!!! 19. : , 20. - yeoman.io 21. A yeoman was a social class in late medieval to early modern England. In early recorded uses, a yeoman was an attendant in a noble household. Wikipedia 22. THE WEB'S SCAFFOLDING TOOL FOR MODERN WEBAPPS yeoman.io 23. scaffolding - 24. yeoman - yeoman generator - : yo yo - yeoman, yeoman subgenerator - , , .. : yo : 25. scaffolding tool build system package manager YO stack 26. Workflow 27. Demo npm install -g yo bower grunt-cli gulp npm install -g generator-webapp mkdir my-yo-project cd my-yo-project yo webapp http://yeoman.io/learning/index.html 28. ! 29. Demo npm install -g yo bower grunt-cli gulp npm install -g generator-webapp mkdir my-yo-project cd my-yo-project yo webapp http://yeoman.io/learning/index.html 30. webapp npm install -g yo bower grunt-cli gulp npm install -g generator-webapp mkdir my-yo-project cd my-yo-project yo webapp http://yeoman.io/learning/index.html 31. Angular.js npm install -g yo bower grunt-cli gulp npm install -g generator-angular mkdir my-yo-project cd my-yo-project yo angular http://yeoman.io/learning/index.html 32. Backbone.js npm install -g yo bower grunt-cli gulp npm install -g generator-backbone mkdir my-yo-project cd my-yo-project yo backbone http://yeoman.io/learning/index.html 33. MEAN.js npm install -g yo bower grunt-cli gulp npm install -g generator-meanjs mkdir my-yo-project cd my-yo-project yo meanjs http://yeoman.io/learning/index.html 34. Chrome Extension npm install -g yo bower grunt-cli gulp npm install -g generator-chrome-extension mkdir my-yo-project cd my-yo-project yo chrome-extension http://yeoman.io/learning/index.html 35. , , YO 36. 3D- 3D YO-, YO- 37. npm install -g generator-generator yo generator 38. : http://yeoman.io/authoring/ 39. npm install -g generator-generator yo generator yo generator:subgenerator npm link yo my-generator npm -g unlink generator-my-generator : YO- 40. = + 41. ? , , : npm install bower install 42. require(inquirer) require(mem-fs) require(underscore.string) 43. inquirer - 44. inquirer.js - : Confirm - { type: "confirm" } Input - { type: "input" } Password - { type: "password" } 45. inquirer.js - : List - { type: "list" } Raw List - { type: "rawlist" } 46. inquirer.js - : Expand - { type: "expand" } 47. inquirer.js - : Checkbox - { type: "checkbox" } 48. inquirer.js - : 49. mem-fs - in memory , . YO - : generator.templatePath() generator.destinationPath() 50. underscore.string capitalize("foo Bar") => "Foo Bar" decapitalize("Foo Bar") => "foo Bar" camelize("moz-transform") => "mozTransform" classify("some_class_name") => "SomeClassName" underscored("MozTransform") => "moz_transform" dasherize("MozTransform") => "-moz-transform" humanize(" capitalize dash-CamelCase_underscore trim ") => "Capitalize dash camel case underscore trim" slugify("Un lphant l'ore du bois") => "un-elephant-a-l-oree-du-bois" 51. Gruntfile API gruntfile.insertConfig( name, config ) gruntfile.registerTask( name, tasks ) npm & bower API generator.npmInstall() generator.bowerInstall() generator.installDependencies() 52. chalk + yosay 53. , 54. http://yeoman.io/authoring/composability.html this.composeWith('backbone:route', { options: { rjs: true } }); ? - - 55. : 56. 57. mem-fs: composeWith(), , . 58. mem-fs: yeoman api: (this.fs.) legacy (this.). . , :) 59. - , inquirer.js . :( 60. 1. , , . 2. 3. - . . 4. , , yeoman-generator 5. . 61. ! borix@tut.by skype: boris.mossounov fb: mossounov tw: @chaykaborya anotherguru.me , yeoman