Gulpfile
How do I make an gulpfile?
What is a gulpfile? How do you make a gulpfile? This script and codes were developed by Amy Kapernick on 24 August 2022, Wednesday.
Gulpfile - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Gulpfile</title>
</head>
<body> <script src="js/index.js"></script>
</body>
</html>
Gulpfile - Script Codes JS Codes
//Variables
var gulp = require('gulp');
var sass = require('gulp-sass');
var replace = require('gulp-replace');
var replaceString = require('gulp-string-replace');
var sourcemaps = require('gulp-sourcemaps');
//File Paths
var sassFiles = 'source/scss/**/*.scss', mainSassFile = 'source/scss/main.scss', cssFiles = 'assets/css/', localHostPath = '/wordpress/wp-content/', remotePath = '/wp-content/', pathFiles ='*'
//Compile main sass into css
gulp.task('sassy', function(){ gulp.src(mainSassFile) .pipe(sourcemaps.init()) .pipe(sass().on('error', sass.logError)) //Using gulp-sass .pipe(sourcemaps.write('../maps')) .pipe(gulp.dest(cssFiles))
});
//Watch for changes in sass files and running sass compile
gulp.task('watch', function() { gulp.watch(sassFiles, ['sassy']);
});
//Replace file paths for local host with remote server
gulp.task('replaceLocalDev', function(){ gulp.src([pathFiles, '!gulpfile.js']) .pipe(replace(localHostPath, remotePath)) .pipe(gulp.dest('./')); gulp.src([sassFiles, '!gulpfile.js']) .pipe(replaceString(localHostPath, remotePath)) .pipe(gulp.dest('source/scss/')); gulp.start('sassy');
});
Developer | Amy Kapernick |
Username | aimhigherwebdesign-amy |
Uploaded | August 24, 2022 |
Rating | 3 |
Size | 1,765 Kb |
Views | 32,384 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Portfolio Page | 2,956 Kb |
WebEx Troubleshooting | 12,011 Kb |
Corner Triangle | 2,082 Kb |
Battle Against the Dragon | 4,524 Kb |
Search box with SVG icon | 2,868 Kb |
Playing with Flexbox | 2,941 Kb |
Email Signature | 2,726 Kb |
Border Gradient | 3,223 Kb |
Fancy table search | 5,924 Kb |
Instant Quote Generator | 3,063 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
3D-box | Parthviroja | 2,346 Kb |
LAMP PURE CSS with Animation | Dam62500 | 2,911 Kb |
Slider | Mohammed-fawzy | 2,634 Kb |
CSS-Flexbox-Demo | Sstiglets | 1,709 Kb |
Css Rotating 3d cubes different speed | Dghez | 2,364 Kb |
A Pen by Miro Olma | Programiro | 2,342 Kb |
Christ the Redeemer | Prashantsani | 2,208 Kb |
Dribbble Inspired Registration Form | Lancebush | 2,358 Kb |
Slim Grid SASS SCSS v3.2 | Thesturs | 4,709 Kb |
Kut D3 | Jellevrswk | 3,687 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!