Slide 1

Slide 1 text

Too Many Metafiles and chest.js @watilde

Slide 2

Slide 2 text

@author • @watilde • npm publish / month • beeplay, tvm, jsss • Bootstrap / Ratchet / Flight / Node <3

Slide 3

Slide 3 text

• PHP @work

Slide 4

Slide 4 text

Main Subject "Too many metafiles"

Slide 5

Slide 5 text

Front End
 Development Tools

Slide 6

Slide 6 text

tool name file name npm • package.json • .npmrc • node_modules jshint • .jshintrc • .jshintignore Grunt • Gruntfile.js gulp • gulpfile.js editorconfig • .editorconfig bower • bower.json • .bowerrc component.io • component.json etc… have some metafiles:

Slide 7

Slide 7 text

Tripling Each Year 0 1 2 3 5 6 7 8 9 2012 2013 2014 Number of metafiles I use frequently

Slide 8

Slide 8 text

Next Year: 27 Files!? 0 5 10 15 20 25 30 2012 2013 2014 2015 Number of metafiles I use frequently Just kidding XD (maybe…)

Slide 9

Slide 9 text

4 Problems • Ugly root directory • Init process growing increasingly complex • Need a "Package Manager" manager • Too many different types of commands

Slide 10

Slide 10 text

• Ugly root directory • Init process growing increasingly complex • Need a "Package Manager" manager • Too many different types of commands 4 Problems These are resolved by the current version of chest.js

Slide 11

Slide 11 text

Ugly root directory •Routine example: $ cd ~/project/ $ ls .editorconfig .git/ .gitignore .travis.yml .jshintrc bower.json
 CONTRIBUTING.md Gruntfile.js 
 README.md bin/ lib/ package.json 
 power_assert.js spec/ src/

Slide 12

Slide 12 text

Init process growing increasingly complex • Most users of these front end development tools are web designers • Many of them don’t like terminal • Have to run many commands;(

Slide 13

Slide 13 text

Symbolic Link + .gitignore $ ls ./.meta - package.json - bower.json ! $ ln -s .meta/* ./ ! $ cat .gitignore ./package.json ./bower.json

Slide 14

Slide 14 text

npm run-scripts // package.json "scripts": { "install": "ln -s .meta/* ./", "postinstall": "bower install" }, https://www.npmjs.org/doc/scripts.html

Slide 15

Slide 15 text

Easier

Slide 16

Slide 16 text

http://chestjs.com/ Enter chest.js

Slide 17

Slide 17 text

Getting started

Slide 18

Slide 18 text

e.g)
 General example project: $ cd ~/project/ $ ls .editorconfig .git/ .gitignore .travis.yml .jshintrc bower.json
 CONTRIBUTING.md Gruntfile.js 
 README.md bin/ lib/ package.json 
 power_assert.js spec/ src/

Slide 19

Slide 19 text

Install chest command $ npm install -g chest $ chest ! @see ‘chest usage’

Slide 20

Slide 20 text

Put metafiles in the chest $ chest put .editorconfig
 .travis.yml Gruntfile.js package.json power_assert.js ! $ ls .chest .git/ .gitignore
 CONTRIBUTING.md README.md
 bin/ lib/ spec/ src/

Slide 21

Slide 21 text

Show list $ chest list .editorconfig
 .travis.yml bower.json Gruntfile.js package.json power_assert.js

Slide 22

Slide 22 text

Create symbolic link $ chest open $ ls .editorconfig .git/ .gitignore .travis.yml .jshintrc bower.json
 CONTRIBUTING.md Gruntfile.js 
 README.md bin/ lib/ package.json 
 power_assert.js spec/ src/

Slide 23

Slide 23 text

Support install $ chest install ! run npm install run bower install

Slide 24

Slide 24 text

Open & Install in postinstall $ cat package.json ɾɾɾ "scripts": { "postinstall": "chest boost" }, ɾɾɾ

Slide 25

Slide 25 text

What’s next?

Slide 26

Slide 26 text

• Ugly root directory • Init process growing increasingly complex • Need a "Package Manager" manager • Too many different types of commands 4 Problems Will resolve these in future versions of chest.js

Slide 27

Slide 27 text

Need a
 "Package Manager" manager •Version, Name, Description, etc •Currently when updating one metafile, you have to changes all the others manually •Ideally, chest.js will manage this info with one base file

Slide 28

Slide 28 text

Too many
 different types of commands •case(grunt || gulp) write usage •Others: npm-run-script, make, bash, etc •difficult to write usage •Challenging to ensure backward
 compatibility for commands

Slide 29

Slide 29 text

chest.json { name: ‘node-gakuen’, description: ‘A school for node lovers’, version: ‘4.13.6’, scripts: { build: { usage: ‘build all file’, run: ‘grunt build’ } } }

Slide 30

Slide 30 text

chest.json • chest syncɿsync both metainfo { name: ‘node-gakuen’, description: ‘A school for node lovers’, version: ‘0.0.1’, scripts: { build: { usage: ‘build all files’, run: ‘grunt build’ } } }

Slide 31

Slide 31 text

chest.json •chest-run-scriptsɿcommand rapper required usage { name: ‘node-gakuen’, description: ‘A school for node lovers’, version: ‘0.0.1’, scripts: { build: { usage: ‘build all file’, run: ‘grunt build’ } } }

Slide 32

Slide 32 text

http://chestjs.com/ < Thanks! Any questions?