Gulp Setup - Progressive Web App Training
Skills:
Frontend Performance80%
Key Takeaways
Automates tasks with Gulp for frontend development
Full Transcript
hi there I'm Sam Dutton and I have a question for you are you still doing builds by hand if so let me show you an easier way modern web development involves quite a few tasks running servers optimizing images and processing source code now these are the kinds of manual tasks that you can automate with gulp grunt make or other build tools the world of build tools is constantly changing but we chose gulp here for its relative longevity and its relative simplicity simply put gulp reads a file called the gulp file to tell it what to do it then processes your source files transforms them and writes the results to a build directory this is a sample golf rjs file it's written in JavaScript with a couple of no js' extensions for loading other files the require statements of the top load the core gulp commands and the gulp interface to uglify these are known as gulp plugins and by the way uglify is a program to compress and minify javascript now gulp files are divided into a series of tasks a task might run a server minify some code or even delete files each task should be one self-contained action we define a task named uglify j/s and write some JavaScript to implement it the gulp dots sauce task reads all the J's files from source J s we then pass all those files into the uglify tool using the pipe command now the output of each command is ready to pipe into the next so we use the gulp nest command to write the result into new files under dist J s snap formerly gulp is a cross-platform streaming task runner that lets developers automate many development tasks at a high level gulp reads files as streams and pipes the streams to different tasks these tasks are code based and use plugins the tasks modify the files building source files into production files to get an idea of what gulp can do check the list of gulp recipes on github gulp is an ode package and the plugins that it uses are also node packages so you need to install node.js first this also installs the node package manager and you should also enable gulp from the command-line and to do this install the gulp CLI package you can then go into your project or create a new one and have NPM install the gulp plugins you need into your project right your gulp file j/s and you can begin using gulp from the command-line here's an example of creating a project and installing gulp plugins the first line creates a new NPM project this generates a package JSON file that lists your project's plugins the following commands install various example plugins including gulp itself the save dev flag updates the package JSON file with the corresponding plug-in the plugins are installed in a node modules directory with this method you can easily reinstall all plugins and their dependencies later by using the package JSON file rather than reinstalling each plug-in individually now note that plugins a B and C a imaginary we're just using those names to show how plugins work once the plugins are installed they need to be loaded into the gulp file using require now you're ready to define tasks this task is named task ABC it takes file from the some sources files path and pipes and through functions from each of the plugins which modify the files the processed files are passed to gulp tests which writes the files to some destination path the task we just defined can be run from the command line by typing gulp space and the task name in this case it's gulp space task ABC here's a set of links for learning more about gulp ins we've also built a code lab that takes you through common tasks follow the link to get to the lab now don't worry if you've missed any details just look at the gulp documentation and our to find out more we supply gulp files with our code labs so you'll be all set for now let's get back to writing PWA s and i'll see you soon [Music]
Original Description
Modern web development often involves repetitive tasks, such as running developer servers, minifying code, and optimizing images.
This video explains how to automate these kinds of tasks with Gulp.
Full playlist:
https://www.youtube.com/playlist?list=PLNYkxOF6rcIB2xHBZ7opgc2Mv009X87Hh
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Chrome for Developers · Chrome for Developers · 0 of 60
← Previous
Next →
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
Polymer Performance Patterns (The Polymer Summit 2015)
Chrome for Developers
Polymer Power Tools (The Polymer Summit 2015)
Chrome for Developers
Chrome Dev Summit 2014 – Chrome Case Studies
Chrome for Developers
Web Directions Code 2015 round up
Chrome for Developers
Maintainable Code - HTTP203
Chrome for Developers
iron-ajax… wat?! -- Polycasts #26
Chrome for Developers
The Guardian - Supercharged
Chrome for Developers
ES2015 (next version of JavaScript), Totally Tooling Tips (S2 Ep1)
Chrome for Developers
#AskPolymer: Rob answers all the questions ever -- Polycasts #27
Chrome for Developers
The Future of JavaScript - HTTP203
Chrome for Developers
Data Binding 101 -- Polycasts #28
Chrome for Developers
The Guardian part 2 - Supercharged
Chrome for Developers
The Future of Web Audio: with Chris Wilson and Chris Lowis
Chrome for Developers
Chrome 46: New motion-path animations, client hints and service worker improvements
Chrome for Developers
Sublime Snippets, Totally Tooling Tips (S2 Ep2)
Chrome for Developers
#AskPolymer: How do you make the show? -- Polycasts #29
Chrome for Developers
Critical Path CSS, Totally Tooling Tips (S2 Mini Tip #1)
Chrome for Developers
Binding to Objects -- Polycasts #30
Chrome for Developers
Player FM - Supercharged
Chrome for Developers
Where’s the Designer? #AskPolymer -- Polycasts #31
Chrome for Developers
Jake Beats Wikipedia - HTTP203
Chrome for Developers
Supercharged Observers! -- Polycasts #32
Chrome for Developers
Jai's Web blog - Supercharged
Chrome for Developers
Windows Command-line Tooling, Totally Tooling Tips (S2, Ep4)
Chrome for Developers
What about internationalization? #AskPolymer -- Polycasts #33
Chrome for Developers
Developing for Billions (Chrome Dev Summit 2015)
Chrome for Developers
Google+ Performance Improvement Comparison
Chrome for Developers
Deploying HTTPS: The Green Lock and Beyond (Chrome Dev Summit 2015)
Chrome for Developers
Progressive Web Apps (Chrome Dev Summit 2015)
Chrome for Developers
Instant Loading with Service Workers (Chrome Dev Summit 2015)
Chrome for Developers
Increase Engagement with Web Push Notifications (Chrome Dev Summit 2015)
Chrome for Developers
Engaging with the Real World: Web Bluetooth and Physical Web (Chrome Dev Summit 2015)
Chrome for Developers
Asking for Permission: respectful, opinionated UI (Chrome Dev Summit 2015)
Chrome for Developers
Polymer - State of the Union (Chrome Dev Summit 2015)
Chrome for Developers
Building Progressive Web Apps with Polymer (Chrome Dev Summit 2015)
Chrome for Developers
Introduction to RAIL (Chrome Dev Summit 2015)
Chrome for Developers
DevTools in 2015: Authoring to the max (Chrome Dev Summit 2015)
Chrome for Developers
RAIL in the real world (Chrome Dev Summit 2015)
Chrome for Developers
#ChromeDevSummit talks are up - W00T! -- Polycast #34
Chrome for Developers
V8 Performance from the Driver's Seat (Chrome Dev Summit 2015)
Chrome for Developers
Quantify and improve real-world RAIL (Chrome Dev Summit 2015)
Chrome for Developers
Owning your performance: RAIL (Chrome Dev Summit 2015)
Chrome for Developers
HTTP/2 101 (Chrome Dev Summit 2015)
Chrome for Developers
Leadership Panel (Chrome Dev Summit 2015)
Chrome for Developers
Build Processes, Totally Tooling Tips (S2, Ep 5)
Chrome for Developers
Accessibility (Chrome Dev Summit 2015)
Chrome for Developers
Binding to Arrays -- Polycasts #35
Chrome for Developers
HTTP2 - HTTP203
Chrome for Developers
Chrome 47: Splash Screens, requestIdleCallback and better desktop notifications (New in Chrome)
Chrome for Developers
Call For Submissions - Supercharged
Chrome for Developers
Cross Device Testing, Totally Tooling Tips (S2 Ep6)
Chrome for Developers
Testing AJAX with Web Component Tester -- Polycasts #37
Chrome for Developers
Slack: Extended Xmas Special - Supercharged
Chrome for Developers
Browser testing with Travis & Sauce Labs -- Polycasts #38
Chrome for Developers
Optimize for production with Vulcanize -- Polycasts #39
Chrome for Developers
Highlights from Chrome Dev Summit 2015
Chrome for Developers
Chrome 48: Custom buttons in notifications, DevTools Security panel, and Presentation mode
Chrome for Developers
Crisper: Protecting your Polymer app with CSP -- Polycasts #40
Chrome for Developers
How do I use Sass with Polymer? #AskPolymer -- Polycasts #41
Chrome for Developers
Colors – DevTools Tonight #0 (Pilot)
Chrome for Developers
More on: Frontend Performance
View skill →Related Reads
📰
📰
📰
📰
React Introduction
Dev.to · Karthick (k)
Why SnapDOM Beats html2canvas for DOM-to-Image Capture
Dev.to · Juan Martin
I built 42 landing page templates as single HTML files (no npm, no build step)
Dev.to · Segcam spa
Part 7B — Section 2 — React Event Handling Explained: Forms, Event Object & User Input.
Medium · JavaScript
🎓
Tutor Explanation
DeepCamp AI