opentechconsult / gulpexample Goto Github PK
View Code? Open in Web Editor NEWLearn how to automate build tasks with GULP
Learn how to automate build tasks with GULP
We'll use Gulp to create a REACT project.
For that we will use gulp-babel, gulp-sourcemaps, and gulp-concat
We have created a project and we want to add gulp to the project. To that end we need to do the following:
npm i -g gulp-cli
mkdir gulpexample
cd gulpexample
npm init -y
npm i -save-dev gulp
Next create file called gulpfile.js
touch gulpfile.js
Creating Gulp tasks involve writing Node code with Gulp's API in a file called gulpfile.js. Gulp's API has methods for things like finding files and piping them through plugins that change them.
We are going to do the following to illustrate how to create a gulp task
As projects grows, they tend to need more tasks. We end up with long gulpfile that is difficult to understand. We can get around this problem by breaking the gulpfile code into separate modules.
Gulp uses Node's module system to load its plugins. So we can use Node's module system to split long gulpfile to make them more maintainable. To use separate files, we do the following:
mkdir -p gulp/tasks
cd gulp/tasks
touch development-build.js production-build.js
cd ..
to cd to the gulp folder andtouch index.js
to create the index.js file
As a web developer we want to avoid build/refresh cycle as possible. One simple way to streamline builds is to use a Gulp plugin to watch the filesystem for changes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.