gulp

Gulp Sass - How to properly name the output css?

我的未来我决定 提交于 2019-12-03 10:56:52
问题 I'm reading a tutorial about sass here then I tried some other approach and I cant get the answer in this tutorial. Theres the problem. I have this code in my gulpfile.js gulp.task('compileNavbar', function() { gulp.src('assets/css/sass/**/*.navbar.scss') .pipe(sass('navbar.css')) .pipe(gulp.dest('assets/css/'));; }); As of now, I only have assets/css/sass/guest.navbar.scss and this code locates the scss files correctly and puts the output css file in the correct directory BUT the css is

Error: ENOENT: no such file or directory, scandir

时间秒杀一切 提交于 2019-12-03 10:27:11
问题 I scaffold an app using jhipster which is microservice gateway using cassandra db and using maven to build which was building fine after scaffold.i ran gulp command to for the live reload of ui. i made a change slighlty in navbar and home page of it. which was also working file & made some changes in the json files of home & navbar & do some minor changes as adding the search box and other. it failed to reload. I stop the gulp & maven & restarted them. maven is building but again not loading

Getting Libsass Gulp Susy to work together

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have just spent the last 5 days playing with this and trying to get the following to work together: But now I have it working I have just gone for 45s to 700ms This is something I feel I should share. Initial Problem Gulp gulp . task ( 'sass' , function () { return gulp . src ( './frontend/sass/style.scss' ) . pipe ( sass ({ 'require' : 'susy' })) . pipe ( gulp . dest ( './app/www/css' )) }); Sass @import "susy" ; Inital Error [ 23 : 58 : 08 ] Starting 'sass' ... stream . js : 94 throw er ; // Unhandled stream error in pipe. ^

How to make a refresh in browser with gulp

心不动则不痛 提交于 2019-12-03 10:18:43
I have an app is in iis, it is an app made in angularjs and webapi C # 2.0, I would like to create a task that updates the browser as soon as I save any js file. Version of gulp: 3.9.1 gulp.task('livereload', function () { gulp.watch(config.files.js); }); gulp-livereload A lightweight gulp plugin for livereload to be used with the livereload chrome extension or a livereload middleware . Simple to setup: var gulp = require('gulp'), less = require('gulp-less'), livereload = require('gulp-livereload'); gulp.task('less', function() { gulp.src('less/*.less') .pipe(less()) .pipe(gulp.dest('dist'))

Gulp error: events.js:72

纵然是瞬间 提交于 2019-12-03 10:07:37
I've been trying out (or trying to get working) a jekyll style guide from: https://github.com/davidhund/jekyll-styleguide#user-content-requirements My gulpfile is: var gulp = require('gulp'); var sass = require('gulp-ruby-sass'); var autoprefixer = require('gulp-autoprefixer'); var browserSync = require('browser-sync'); var rename = require('gulp-rename'); var concat = require('gulp-concat'); var minifycss = require('gulp-minify-css'); var uglify = require('gulp-uglify'); var clean = require('gulp-clean'); var notify = require('gulp-notify'); var plumber = require('gulp-plumber'); // Handy

学习Express之部署express-demo

烈酒焚心 提交于 2019-12-03 09:53:46
一、服务器准备 服务器ip地址为:172.16.70.174 1.安装 Node.js 参考: http://my.oschina.net/songzhu/blog/608129 2.安装 PM2 PM2 是一个带有负载均衡功能的 Node 应用的进程管理器。 全局安装 PM2 $ npm install pm2 -g $ pm2 list [PM2] Spawning PM2 daemon [PM2] PM2 Successfully daemonized ┌──────────┬────┬──────┬─────┬────────┬─────────┬────────┬────────┬──────────┐ │ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │ └──────────┴────┴──────┴─────┴────────┴─────────┴────────┴────────┴──────────┘ Use `pm2 show <id|name>` to get more details about an app 安装 PM2 如果出现错误,大概是网络和权限问题导致的。仔细看一下错误提示,如果是网络问题,那么多重试几次应该就可以了。 3.准备发布目录

How to get task name inside task in gulp

让人想犯罪 __ 提交于 2019-12-03 09:53:42
I'm using gulp-plumber + gulp-notify and want to put task name in gulp-notify as a title. following is the code i wrote, thanks in advance. gulp.task('SOMETASK', function() { return gulp.src(sourcePaths) .pipe(plumber({errorHandler: notify.onError({ message: "<%= error.message %>", title: "I WANT TO PUT TASK NAME HERE" })})) // omitted below }); gulp.Gulp.prototype.__runTask = gulp.Gulp.prototype._runTask; gulp.Gulp.prototype._runTask = function(task) { this.currentTask = task; this.__runTask(task); } gulp.task("someTask", function(){ console.log( this.currentTask.name ); } gulp.task('SOMETASK

gulp-uglify won&#039;t preserve files order

匿名 (未验证) 提交于 2019-12-03 09:52:54
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When I use gulp-uglify to minify the Javascript files the order gets messed up. Lets say I have this task working as expected: var gulp = require('gulp'); var rename = require('gulp-rename'); var gp_concat = require('gulp-concat'); gulp.task('js', function() { gulp.src([ './public/bower_components/jquery/dist/jquery.min.js', './public/js/functions.js', ]) .pipe(gp_concat('combined.js')) .pipe(gulp.dest(path.js + '/dist')) }); Adding the uglify line to it changes the order of the jquery and functions files and places functions.js above jquery

How to tell gulp-connect to open index.html regardless of the URL?

那年仲夏 提交于 2019-12-03 09:49:23
I have the following gulp task: gulp.task('connect', function() { connect.server({ root: __dirname, livereload: true }); }); and the following Angular routes: angular.module("MyApp", ["ngRoute"]).config(function($routeProvider, $locationProvider) { $locationProvider.html5Mode(true); $routeProvider .when("/", { controller: "DashboardCtrl", templateUrl: "templates/dashboard.html" }) .when("/advertiser", { controller: "AdvertiserCtrl", templateUrl: "templates/advertiser.html" }) .otherwise({ redirectTo: "/" }); }); When I visit / all works fine (the Dashboard appears). But, visiting /advertiser

gulp browserify reactify task is quite slow

ε祈祈猫儿з 提交于 2019-12-03 09:45:07
问题 I am using Gulp as my task runner and browserify to bundle my CommonJs modules. I have noticed that running my browserify task is quite slow, it takes around 2 - 3 seconds, and all I have is React and a few very small components I have built for development. Is there a way to speed up the task, or do I have any noticeable problems in my task? gulp.task('browserify', function() { var bundler = browserify({ entries: ['./main.js'], // Only need initial file transform: [reactify], // Convert JSX