gulp

Using gulp-sass, how do I preserve the folder structure of my sass files except for the immediate parent directory?

佐手、 提交于 2019-12-23 01:11:32
问题 I have a project with multiple folders that contain sass files: |── src └── scripts └── app1 └── sass └── base.scss └── app2 └── sass └── base.scss I also have a gulp task that compiles those .scss files using gulp-sass and gulp-concat-css : gulp.task('build:sass', () => gulp.src([ 'scripts/**/*.scss' ]) .pipe(plugins.sass().on('error', plugins.sass.logError)) .pipe(plugins.concatCss('bundle.css')) .pipe(gulp.dest('dist')) ); Right now, the above task just creates bundle.css into the dist

I need to pass a parameter to a gulp task from another task or replace a task with a function called by runSequence

戏子无情 提交于 2019-12-22 23:55:13
问题 I have gulp file that I use to create the Html and Js for multiple kinds of exams, Ex1, Ex2 etc Here's the task I use to create these for Ex1. It has hardcoded a call to the makeEx1Html task, three other tasks and followed by a function call where I can pass a parameter: gulp.task('make_prod_ex1', function () { runSequence( 'makeEx1Html', 'makeTemplate', 'rename_bundle_css', 'rename_bundle_js', function () { make_prod_index('ex1'); }); }); Here's the task that's hardcoded for Ex1: gulp.task(

TypeScript to JavaScript transpiler for Angular2

◇◆丶佛笑我妖孽 提交于 2019-12-22 19:46:09
问题 Since Ancular2 is written in TypeScript, I also write my app in Typescript. I want to deploy the app on a tomcat server without node.js running. After a long search, I found two possibilities that work: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5?p=preview In this version, the Typescript-files are transpiled on-the-fly and this is works for what I need. But there would be a nicer solution with transpiling and minifying it before the deployment on the server. I tryed it with gulp but the

Gulp plugin for running a PHP server?

折月煮酒 提交于 2019-12-22 18:26:12
问题 I'm looking to transition over from grunt to gulp. However I'm not finding a way to serve PHP files with livereload support, such as gateway (https://www.npmjs.org/package/gateway) using mounts. Are ther any plugins out there for running/server PHP using a gulp task? 回答1: I asked totally the same question few weeks ago. I want to start a native PHP server under Gulp, because I like the syntax better than Grunt. I also want to use PHP just to include other HTML files. :) It turns out there is

automate adding flexibility declaration with gulp

删除回忆录丶 提交于 2019-12-22 14:57:13
问题 I want to add flexibility polyfill in my build to support ie8 & 9. Is there a way with gulp to add in the -js-display: flex; before display: flex; as required? .container { -js-display: flex; display: flex; } https://github.com/10up/flexibility Thanks! 回答1: You can use gulp-postcss in combination with the postcss-flexibility plugin: var gulp = require('gulp'); var postcss = require('gulp-postcss'); var flexibility = require('postcss-flexibility'); gulp.task('css', function() { return gulp.src

How do I get Gulp tasks to fire sequentially when firing shell commands in an async.series helper function?

淺唱寂寞╮ 提交于 2019-12-22 13:49:48
问题 I have multiple Gulp tasks that send a series of commands to the shell. The second task is dependent on the first. How do make ensure all commands sent to async.series in the first task are complete before the second task is executed. gulp.task('task1', function(cb) { process.chdir(__dirname); process.chdir('path'); var cmdArray = getCmdsForTask1(); runSeries(cmdArray, 'Task 1'); return cb(); }); gulp.task('task2',['task1'], function() { process.chdir(__dirname); process.chdir('task2_path');

How to automate the build from the following configuration using gulp

我是研究僧i 提交于 2019-12-22 10:25:45
问题 Backdrop I have a loopback and Angular app, Loopback gives use the server models and api's and using its sdk we are able to get client services. Now i am planning to automate the following build process using gulp. If any changes in the model is made then the sdk command is run and also the server is restarted/ and secondly when any changes to the angular files the sdk files are run and files are fetched from angular dist folder and server is restarted and best possible we can use live reload

How do I run gulp.js in my asp.net core project when deploying to Azure using git?

安稳与你 提交于 2019-12-22 10:13:11
问题 So I have my new ASP.Net core web application running and I followed the steps outlined in this quick start. The gulp.js file in the project deploys all the needed scripts to the wwwroot/lib folder and all the typescript transpiled scripts to the wwwroot/appScripts. Since these files are generated I ignore them in git. The problem is that when the solution deploys to Azure (using git) the gulp.js file doesn't execute so those files are never created. What is the correct way to execute the

gulp-ruby-sass unable to import files

孤者浪人 提交于 2019-12-22 09:28:42
问题 I am trying to create a gulp-ruby-sass task however i am seeing the following error: [17:32:34] gulp-ruby-sass: error ./styles.scss (Line 1: File to import not found or unreadable: header.scss. Load path: C:/Users/nassi/AppData/Local/Temp/gulp-ruby-sass) My project structure: app assets css _header.scss _home.scss _navigation.scss _buttons.scss _dialogs.scss styles.scss Within styles.scss i have: @import "header.scss"; @import "home.scss"; @import "navigation.scss"; @import "buttons.scss";

install gulp browserify gives error always

余生颓废 提交于 2019-12-22 08:58:07
问题 Im trying to install gulp-browserify with this command: npm install gulp-browserify --save-dev I already installed many other packages successfully like gulp-autoprefixer gulp-concat gulp-minify-css gulp-sass gulp-uglify all of those installations worked great, here is how my package.json file looks like { "devDependencies": { "gulp-autoprefixer": "0.0.8", "gulp-sass": "~0.7.2", "gulp": "~3.8.5", "gulp-minify-css": "~0.3.6", "gulp-concat": "~2.2.0", "gulp-uglify": "~0.3.1" } } and here is the