-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathchapter-01.srt
116 lines (91 loc) · 2.22 KB
/
chapter-01.srt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
1
00:00:00,491 --> 00:00:02,331
Welcome to Peer to Peer
2
00:00:02,365 --> 00:00:05,931
where you can hone your skills
by watching live coding videos.
3
00:00:06,240 --> 00:00:08,742
Our guest today is James Coglan.
4
00:00:08,740 --> 00:00:11,360
Author of JavaScript Testing Recipes.
5
00:00:11,360 --> 00:00:16,914
And creator of open source projects
such as Faye and web socket driver.
6
00:00:17,337 --> 00:00:19,577
Our host is Tom Stuart.
7
00:00:19,570 --> 00:00:24,365
And the challenge that he has set
for James is called Building a build tool.
8
00:00:24,537 --> 00:00:28,360
Chapter 01.
The Challenge.
9
00:00:28,422 --> 00:00:31,600
Tom Stuart: So James would you
like to start by reading the challenge?
10
00:00:31,645 --> 00:00:33,748
James Coglan: Sure, so the challenge is:
11
00:00:33,748 --> 00:00:39,320
Create a tool for automating the
steps required to build a javascript project.
12
00:00:39,600 --> 00:00:42,411
A sample project is
supplied with coffescript files.
13
00:00:42,410 --> 00:00:46,651
These need to be compiled to
javascript then minified and concatenated.
14
00:00:46,650 --> 00:00:49,097
The build tool should be able to accept
15
00:00:49,120 --> 00:00:52,582
generalised instructions for
carrying out each of these steps.
16
00:00:52,580 --> 00:00:57,440
Where possible the build tool should be lazy, only
running steps if they if they produce fresh output.
17
00:00:57,440 --> 00:01:08,617
So this is quite a lot like the make build
system so I'll be taking inspiration from that.
18
00:01:08,650 --> 00:01:13,165
Like figuring out how you implement those steps,
19
00:01:13,222 --> 00:01:16,994
if you were to do that sort of thing yourself.
20
00:01:17,260 --> 00:01:21,897
There's coffeescript,
so we'll need the coffee compiler.
21
00:01:21,954 --> 00:01:32,500
And they need to be minified so I'll
use uglify.js for that, and concatenated is...
22
00:01:32,530 --> 00:01:39,817
Either uglify will do that, or I'll use cat,
or something like that. [James thinks]
23
00:01:39,840 --> 00:01:42,925
But I suppose a good thing to do
first is to run these things by hand.
24
00:01:42,937 --> 00:01:43,531
TS: Right.
25
00:01:43,530 --> 00:01:48,320
JC: And see that they work
before we try to automate them.