gulp

Run one gulp task on multiple folders. The folders look like plugins/lsmwp-*

时光怂恿深爱的人放手 提交于 2019-12-29 09:36:25
问题 I create a lot of WordPress plugins, each of these all follow the same folder structure and all use Gulp to handle their SASS / JS assets. Folder Structure is as follows: |-- .gulpfile.js |-- lsmwp-one |-- plugin.php |-- assets |-- src |-- style.scss |-- dist |-- lsmwp-two |-- plugin.php |-- assets |-- src |-- style.scss |-- dist I would like to have a single Gulpfile that watches each 'lsmwp-*' folder, runs all related tasks and outputs to plugin dist folder. My Gulpfile currently watches

gulp watch doesn't watch

你离开我真会死。 提交于 2019-12-29 08:19:40
问题 Following is my gulpfile.js. There are a couple of more tasks in it and all are working fine - but the last task, watch doesn't. I've tried every possible combination of paths and files and what so ever, but still I don't have luck. I've read many answers on this here, but couldn't solve my problem. I tried to run gulp.watch with and without requiring gulp-watch, tried several different approaches on how to set up the task and so on and so on... var gulp = require('gulp'); var browserify =

How to create an angular 2 build folder when using systemjs.config.js

筅森魡賤 提交于 2019-12-29 06:15:40
问题 How to create an angular 2 build folder when using systemjs.config.js My app works fine locally. I need help with my gulp file so I can grab the node modules required and move them to the dist folder ready for deployment. This is my gulp folder: const gulp = require('gulp'); const ts = require('gulp-typescript'); const uglify = require('gulp-uglify'); const concat = require('gulp-concat'); var htmlreplace = require('gulp-html-replace'); var addsrc = require('gulp-add-src'); var sass = require

How can I separate generated artifacts from the main build with semantic UI?

醉酒当歌 提交于 2019-12-29 04:22:04
问题 I am trying to figure out how to integrate Semantic UI with my gulp-based frontend toolchain. The npm artifact semantic-ui includes an interactive installer that will write a semantic.json file to the root of my project and install the less files, gulp tasks and some configuration into my project. All of these files will be put in subdirectories of a single base directory specified in semantic.json. I do not want any dependency implementation files or any generated files in the git repository

How can I separate generated artifacts from the main build with semantic UI?

做~自己de王妃 提交于 2019-12-29 04:22:04
问题 I am trying to figure out how to integrate Semantic UI with my gulp-based frontend toolchain. The npm artifact semantic-ui includes an interactive installer that will write a semantic.json file to the root of my project and install the less files, gulp tasks and some configuration into my project. All of these files will be put in subdirectories of a single base directory specified in semantic.json. I do not want any dependency implementation files or any generated files in the git repository

How to Increment Version Number via Gulp Task?

馋奶兔 提交于 2019-12-29 03:37:12
问题 I would like to replace a string indicating version number in a javascript file ( myConstantsFile.js ), with another string. So, for example, my version number looks like this: "01.11.15", written like this in myConstantsFile.js with other constants: .constant('productVersion', '1.11.15'); Right now, my task looks like this: gulp.task('increment-version', function(){ gulp.src(['./somedir/myConstantsFile.js']) .pipe(replace(/'productVersion', '(.*)'/g, '99.99.99')) .pipe(gulp.dest('./somedir/'

Gulp: how to pass parameters from watch to tasks

∥☆過路亽.° 提交于 2019-12-28 18:44:22
问题 With gulp you often see patterns like this: gulp.watch('src/*.jade',['templates']); gulp.task('templates', function() { return gulp.src('src/*.jade') .pipe(jade({ pretty: true })) .pipe(gulp.dest('dist/')) .pipe( livereload( server )); }); Does this actually pass the watch'ed files into the templates task? How do these overwrite/extend/filter the src'ed tasks? 回答1: I had the same question some time ago and came to the following conclusion after digging for a bit. gulp.watch is an eventEmitter

Using Grunt, Bower, Gulp, NPM with Visual Studio 2015 for a ASP.NET 4.5 Project

雨燕双飞 提交于 2019-12-28 03:15:16
问题 Visual Studio 2015 comes with built in support for tools like Grunt, Bower, Gulp and NPM for ASP.NET 5 projects. However when I create a ASP.NET 4.5.2 project using Visual Studio 2015 it doesn't use these tools. I'd like to use bower instead of nuget to manage client side packages. I can find information about using these tools with Visual Studio 2013 (see this question for example). But I guess the procedure is different for Visual Studio 2015 since it has built in support for these tools.

Gulp error: The following tasks did not complete: Did you forget to signal async completion?

只愿长相守 提交于 2019-12-27 10:35:22
问题 I have the following gulpfile.js , which I'm executing via the command line gulp message : var gulp = require('gulp'); gulp.task('message', function() { console.log("HTTP Server Started"); }); I'm getting the following error message: [14:14:41] Using gulpfile ~\Documents\node\first\gulpfile.js [14:14:41] Starting 'message'... HTTP Server Started [14:14:41] The following tasks did not complete: message [14:14:41] Did you forget to signal async completion? I'm using gulp 4 on a Windows 10

Nodejs资料之Gulp模块

二次信任 提交于 2019-12-27 02:54:20
◆ 模块作用: 基于node平台开发的前端构建工具,将机械化操作编写成任务, 想要执行机械化操作时执行一个命令行命令任务就能自动执行了,提高开发效率。 1. 项目上线,HTML、CSS、JS文件压缩合并 2. 语法转换(es6、less ...) 3. 公共文件抽离 4. 修改文件浏览器自动刷新 ◆ 使用步骤: 使用npm install gulp下载gulp库文件 在项目根目录下建立gulpfile.js文件 重构项目的文件夹结构 src目录放置源代码文件 dist目录放置构建后文件 在gulpfile.js文件中编写任务. 在命令行工具中执行gulp任务 ◆ Gulp中提供的方法: gulp.src():获取任务要处理的文件 gulp.dest():输出文件 gulp.task():建立gulp任务 gulp.watch():监控文件的变化 ◆ Gulp插件: 需使用npm命令下载如下的插件: gulp-htmlmin :html文件压缩 gulp-csso :压缩css gulp-babel :JavaScript语法转化 gulp-less: less语法转化 gulp-uglify :压缩混淆JavaScript gulp-file-include 公共文件包含 browsersync 浏览器实时同步 ◆ 使用gulp.task建立任务: // 参数:任务的名称