gulp

Jade to HTML > index.html inside directory named after jade file

眉间皱痕 提交于 2019-12-11 22:53:26
问题 I've got a simple gulp task that compiles a .jade file to an .html file: var gulp = require('gulp'), jade = require('gulp-jade'); gulp.task('jade', function() { return gulp.src('src/templates/**/*.jade') .pipe(jade()) // pip to jade plugin .pipe(gulp.dest('public')); // tell gulp our output folder }); Issue /src/templates/page.jade is compiled to HTML at the destination /public/page.html How would I get it so it would compile /src/templates/page.jade to /public/page/index.html . I.e. every

Laravel Elixir - Compile/concat all less files into one css file?

≯℡__Kan透↙ 提交于 2019-12-11 20:25:22
问题 So I have my custom less styles in my custom/module folder. They will all be compiled but the problem is it's creating an individual css file for each of the less files. How can I get EVERYTHING, including the my boostrap/vendor plugins etc to stack first, and all my custom css to be concatenated after, all moved to main.css? Is this possible with Elixir/Gulp? I am coming from Grunt and am a bit confused as there is not a lot of documentation on Elixir. elixir(function(mix) { mix.less([

gulp-autoprefixer not compiling CSS3

a 夏天 提交于 2019-12-11 20:13:59
问题 In my gulpfile.js gulp.task('sass', function() { return gulp.src('sass/screen.scss') .pipe(sass()) .pipe(autoprefixer('last 2 version', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1', 'ios 6', 'android 4')) .pipe(gulp.dest('/')); }); gulp.task('watch', function() { gulp.watch( 'sass/**/*.scss', ['sass'] ); }); 1) Everything seems set up correctly. My main sass file is located at sass/screen.scss. I'm not sure why I have to redeclare the src of where to watch since that's already being established

Capture and reuse a glob

久未见 提交于 2019-12-11 19:05:14
问题 I am new to Gulp programming. I need to define a "dynamic" scss task that compiles multiple source directories in multiple destination directories src/main/scss/ app.scss (global resource) modules/ (modules resources) admin/ *.scss ftt/ *.scss The above is the directory layout of the source files. I am interested in compiling each set of scss files under modules directory (which I may not know in advance) into a directory tree that includes the module itself src/main/scss/modules/admin/*.scss

docker gulp build failing with nginx

牧云@^-^@ 提交于 2019-12-11 18:29:34
问题 I am using this sample repository - https://github.com/umputun/nginx-le To create a docker image from Nginx with letsencrypt. Now, I am getting the following error - PEM_read_bio_X509_AUX("/etc/nginx/ssl/") failed (SSL: error:0906D06C:PEM routines:PEM_read_bio:no start line:Expecting: TRUSTED CERTIFICATE) nginx: [emerg] PEM_read_bio_X509_AUX("/etc/nginx/ssl/") failed (SSL: error:0906D06C:PEM routines:PEM_read_bio:no start line:Expecting: TRUSTED CERTIFICATE) When I try to test my nginx

Several Gulp tasks wait for another one

倖福魔咒の 提交于 2019-12-11 17:31:30
问题 I need to build a sequence of Gulp tasks like this: Task1 -> Task2A, Task2B, Task2C -> Task3, where tasks 2A,2B,2C run in parallel(but task1 should be completed before, and completed just once). What I tried: gulp.task('Task1', []); gulp.task('Task2A', ['Task1']); gulp.task('Task2B', ['Task1']); gulp.task('Task2C', ['Task1']); gulp.task('Task3', ['Task2A', 'Task2B', 'Task2C']); Looks like it's working, but I'm not sure, does it guarantee that Task1 will be executed only 1 time, or it can be

Is it possible to create a VS Code extension that runs a specific gulp task?

删除回忆录丶 提交于 2019-12-11 17:23:42
问题 Since I'm a lazy programmer, I've built a gulp task that does some minor tasks for me but I'd like to turn this into an extension so I can install it on my computer and it just "works". Like I install it, boot up VS code and the tasks execute and start watching my code automatically. I haven't found much things online but then again I could be googling the wrong things. Anything helps - thanks! 回答1: Have a look at run task on folderOpen option: vscode docs. This works for me: // in tasks.json

Error when using naming convention in Gulp

拥有回忆 提交于 2019-12-11 17:23:19
问题 I am working on this project using Zurb Foundation framework and it runs on Gulp. Basically what Gulp does is turn sass into css, compress, concatenate, etc. It runs perfect and it does what it’s suppose to do, UNTIL I try to change the name of the dist folder, where everything is built for production. The name I want to use is name-html5 . The -html5 is a naming convention of 3dCart , so it needs the -html5 in the name of the folder. In gulpfile.babel.js I have: // Delete the "dist" folder /

How transpiling nodejs Gulp-Task with gulp-babel and ignore “import”?

冷暖自知 提交于 2019-12-11 16:05:38
问题 The goal is, transpiling ES6 scripts into ES5 and make them browser readable. This works most with my node.js gulp task, but some of the script use "import" like import EstaticoModule from '../../assets/js/helpers/module'; I would like to skip this "import" and more over delete this row from result. Is there a param in "gulp-babel" to achieve this or has one another idea to make this in a better way? Here is my gulp task: 'use strict'; /** * @function `gulp js:lint1` * @desc Lint JavaScript

How does gulp treat the Promise of a then()?

ぃ、小莉子 提交于 2019-12-11 15:57:56
问题 I have a strange behaviour using gulp as build tool. I got the following code from another question, which is meant for cleaning up build files before another run: function clean() { var delResult = del(['build/**/*', 'dist/**/*']); return delResult.then(del(['build', 'dist'])); } gulp.task('clean', clean); Then I have my default task which includes the clean task in the rest of the build: gulp.task('default', gulp.series('clean', gulp.parallel('doJsStuff, doCssStuff', 'doEvenMoreStuff'));