Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Make Snacks: Yet Another JavaScript Build System
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Brian Hicks
September 07, 2017
Technology
160
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Make Snacks: Yet Another JavaScript Build System
Brian Hicks
September 07, 2017
More Decks by Brian Hicks
See All by Brian Hicks
Esperanto
brianhicks
0
180
Snake Snacks: Function Composition, The Dumb Way
brianhicks
0
200
State of Elm 2017
brianhicks
1
600
µKanren: A Minimal Functional Core for Relational Programming
brianhicks
0
500
Terraform All The Things!
brianhicks
2
450
Kubernetes for the Mesos User
brianhicks
1
150
ch-ch-ch-ch-changes in Elm 0.17.0
brianhicks
2
1.9k
State of Elm 2016
brianhicks
3
620
Mesos + Consul = Developer Happiness (JUG)
brianhicks
1
160
Other Decks in Technology
See All in Technology
DevelopersIO 2026 Tokyo 現時点の衛星通信サービスの現状を整理してみる
maroon1st
0
150
Code for Security プロジェクト紹介 2026年10月
yu23ki14
0
120
局所最適は悪ではない。壊れているのは指標です。量と質を同時に見る先行指標の設計
recruitengineers
PRO
2
270
ソフトウェア ファクトリー - 再現性のあるソフトウェアの工場づくり / Software factory
iktakahiro
7
5.3k
AI駆動開発におけるハーネスエンジニアリングの勘所
tsukuboshi
1
480
DBについての基礎説明(MySQL編) - コロプラ 2026年度 新卒研修
colopl
0
160
Active Record Connection Adaptersにおける長年の課題に再び取り組む
yahonda
0
410
ポケモン対戦を自動で記録して振り返ろう
fufufukakaka
0
260
AI駆動で「他アプリの音を加工できる」アプリを作った
satomasahiro2005
0
190
AWS DevOps Agentはどこまで任せられるか 〜機能の現在地と、機能拡張の実践〜
nyankotaro
0
100
トークン化預金DCJPYの取り組みと活用ユースケース
finengine
0
220
[EMNLP26] RIGEL: Self-Distilled Score Adaptation for Image and Video Captioning Evaluation
keio_smilab
PRO
0
110
Featured
See All Featured
Building Applications with DynamoDB
mza
96
7.2k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Being A Developer After 40
akosma
PRO
92
590k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
59k
Tell your own story through comics
letsgokoyo
1
1.1k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
300
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
740
A Modern Web Designer's Workflow
chriscoyier
699
190k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
330
Transcript
Make Snacks YET ANOTHER JAVASCRIPT BUILD SYSTEM
OUR APP ▸ Hello World As a Service ▸ .0001k
lines of JavaScript ▸ No build system !
# Makefile node_modules: package.json npm install touch -m $@
$ make node_modules npm install touch -m node_modules
. !"" Makefile !"" node_modules <- create or update this
#"" package.json <- whenever this changes
// src/hello.js module.exports = () => "hello"; // src/world.js module.exports
= function() { return "world"; }; // src/index.js import hello from "./hello"; import world from "./world"; console.log(hello() + " " + world());
. !"" Makefile !"" lib <- render ES5 here !""
node_modules !"" package.json #"" src <- from ESwhatever sources here !"" hello.js !"" index.js #"" world.js
SRC = $(wildcard src/*.js) LIB = $(SRC:src/%.js=lib/%.js) lib: $(LIB) lib/%.js:
src/%.js .babelrc node_modules mkdir -p $(@D) node_modules/.bin/babel $< -o $@
$ make lib/hello.js mkdir -p lib node_modules/.bin/babel src/hello.js -o lib/hello.js
// src/world.js module.exports = function() { return "world"; }; //
lib/world.js "use strict"; module.exports = function () { return "world"; };
// src/hello.js module.exports = () => "hello"; // lib/hello.js "use
strict"; module.exports = function () { return "hello"; };
// src/index.js import hello from "./hello"; import world from "./world";
console.log(hello() + " " + world());
// lib/index.js "use strict"; var _hello = require("./hello"); var _hello2
= _interopRequireDefault(_hello); var _world = require("./world"); var _world2 = _interopRequireDefault(_world); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } console.log((0, _hello2.default)() + " " + (0, _world2.default)());
. !"" Makefile !"" bundle.js <- make this !"" lib
<- by bundling these # !"" hello.js # !"" index.js # $"" world.js !"" node_modules !"" package.json $"" src <- which source from these !"" hello.js !"" index.js $"" world.js
bundle.js: $(LIB) node_modules/.bin/browserify lib/index.js > $@
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require; if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot
find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}}; t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require; for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ "use strict"; module.exports = function () { return "hello"; }; },{}],2:[function(require,module,exports){ "use strict"; var _hello = require("./hello"); var _hello2 = _interopRequireDefault(_hello); var _world = require("./world"); var _world2 = _interopRequireDefault(_world); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } console.log((0, _hello2.default)() + " " + (0, _world2.default)()); },{"./hello":1,"./world":3}],3:[function(require,module,exports){ "use strict"; module.exports = function () { return "world"; }; },{}]},{},[2]);
bundle.js: $(LIB) node_modules/.bin/browserify lib/index.js | ./node_modules/.bin/prepack > $@
console.log("hello world");
THANK YOU I'M SO SORRY