Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
SharePoint Development with the SharePoint Framework

You're reading from  SharePoint Development with the SharePoint Framework

Product type Book
Published in Sep 2017
Publisher Packt
ISBN-13 9781787121430
Pages 386 pages
Edition 1st Edition
Languages
Authors (2):
Jussi Roine Jussi Roine
Profile icon Jussi Roine
Olli Jääskeläinen Olli Jääskeläinen
Profile icon Olli Jääskeläinen
View More author details
Toc

Table of Contents (14) Chapters close

Preface 1. Introducing SharePoint Online for Developers 2. Developing Solutions for SharePoint 3. Getting Started with the SharePoint Framework 4. Building Your First Web Part 5. Using Visual Studio Code and Other Editors 6. Packaging and Deploying Solutions 7. Working with SharePoint Content 8. Working with the Web Part Property Pane 9. Using React and Office UI Fabric React Components 10. Working with Other JavaScript Frameworks 11. Troubleshooting and Debugging SharePoint Framework Solutions 12. SharePoint APIs and Microsoft Graph 13. The Future of SharePoint Customizations

Using Gulp to package a project

Gulp is accessible in VS Code using the Integrated Terminal, that you can access from View | Integrated Terminal. By typing gulp without any extra parameters, Gulp will run a default task. You can also run gulp from a Command Prompt or PowerShell window.

Tasks are described in a separate configuration file within the project folder called gulpfile.js. It is rather small in the SPFx default project, as a lot of work is done through SPFx tooling (sp-build-web, for example), but it is more than sufficient for your typical needs as a developer:

Line 6 is key here; it runs initialization for gulp as part of the build process. To understand what's going on here, we need to locate @microsoft/sp-build-web, which is one of the packages we installed earlier. By initializing the package, we automatically import and configure the necessary build tasks for a web browser-based (SharePoint Workbench in this case) build target.

To see what we can do with Gulp...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}