$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Too many metafiles and chest.js
Search
Daijiro Wachi
June 24, 2014
Programming
2
3.2k
Too many metafiles and chest.js
東京Node学園 13時限目
「増え続けるmetafileが生む問題とchest.js」
http://nodejs.connpass.com/event/6763/
Daijiro Wachi
June 24, 2014
Tweet
Share
More Decks by Daijiro Wachi
See All by Daijiro Wachi
OSS開発における合意形成にJavaScriptで参加し、変化を起こす / front-end-lounge-1
watilde
6
3.1k
amplify-cliで追加したfunctionに 環境変数・シークレットを設定する機能が どのように実現されたか / amplify-env-vars
watilde
0
1.2k
Amplify Japan User Group and OSS
watilde
0
1.1k
Web VitalsとJavaScriptエラーの可視化 - フロントエンドにおけるObservabilityとは / visualize-web-vitals-and-javascript-error
watilde
6
2.7k
Firefighting planner
watilde
1
66
Doctor Wombat - A debug guide to using npm.
watilde
0
460
Asynchronous wombats - some of the communication issues from our differences we face on GitHub
watilde
0
490
Write a song in JavaScript
watilde
3
720
npm3 ❓
watilde
18
13k
Other Decks in Programming
See All in Programming
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
150
Missing parts when designing and implementing Android UI
ericksli
0
370
as(型アサーション)を書く前にできること
marokanatani
10
3k
距離関数を極める! / SESSIONS 2024
gam0022
0
360
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
3
1.4k
初めてDefinitelyTypedにPRを出した話
syumai
0
480
Modular Monolith Monorepo ~シンプルさを保ちながらmonorepoのメリットを最大化する~
yuisakamoto
10
3.7k
Jakarta EE meets AI
ivargrimstad
0
900
大規模サイトリビルドの現場から:成功と失敗のリアルな教訓 / Site Rebuild,Real Lessons Learned from Successes and Failures_JJUG Fall 2024
techtekt
0
200
最新TCAキャッチアップ
0si43
0
250
物流システムにおけるリファクタリングとアーキテクチャの再構築 〜依存関係とモジュール分割の重要性〜
deeprain
1
270
AWS AppSyncを用いた GraphQL APIの開発について - NIFTY Tech Talk #22
niftycorp
PRO
0
110
Featured
See All Featured
Music & Morning Musume
bryan
46
6.2k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
A better future with KSS
kneath
238
17k
Building an army of robots
kneath
302
43k
Scaling GitHub
holman
458
140k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
The World Runs on Bad Software
bkeepers
PRO
65
11k
4 Signs Your Business is Dying
shpigford
181
21k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
GraphQLとの向き合い方2022年版
quramy
44
13k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Transcript
Too Many Metafiles and chest.js @watilde
@author • @watilde • npm publish / month • beeplay,
tvm, jsss • Bootstrap / Ratchet / Flight / Node <3
• PHP @work
Main Subject "Too many metafiles"
Front End Development Tools
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:
Tripling Each Year 0 1 2 3 5 6 7
8 9 2012 2013 2014 Number of metafiles I use frequently
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…)
4 Problems • Ugly root directory • Init process growing
increasingly complex • Need a "Package Manager" manager • Too many different types of commands
• 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
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/
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;(
Symbolic Link + .gitignore $ ls ./.meta - package.json -
bower.json ! $ ln -s .meta/* ./ ! $ cat .gitignore ./package.json ./bower.json
npm run-scripts // package.json "scripts": { "install": "ln -s .meta/*
./", "postinstall": "bower install" }, https://www.npmjs.org/doc/scripts.html
Easier
http://chestjs.com/ Enter chest.js
Getting started
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/
Install chest command $ npm install -g chest $ chest
! @see ‘chest usage’
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/
Show list $ chest list .editorconfig .travis.yml bower.json Gruntfile.js package.json
power_assert.js
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/
Support install $ chest install ! run npm install run
bower install
Open & Install in postinstall $ cat package.json ɾɾɾ "scripts":
{ "postinstall": "chest boost" }, ɾɾɾ
What’s next?
• 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
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
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
chest.json { name: ‘node-gakuen’, description: ‘A school for node lovers’,
version: ‘4.13.6’, scripts: { build: { usage: ‘build all file’, run: ‘grunt build’ } } }
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’ } } }
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’ } } }
http://chestjs.com/ < Thanks! Any questions?