Tag: 吞噬

我不明白如何正确工作鲍尔

我正在build立一个网站,我已经决定使用引导模板的后端(pipe理工具和whatnot)。 我喜欢sb-admin-2( http://startbootstrap.com/template-overviews/sb-admin-2/ )的外观,但我有点困惑如何在我的网站实际使用这个。 我安装了Bower并使用bower install startbootstrap-sb-admin-2 现在我有一个名为bower_components的文件夹,并且它包含了所有相关的软件包…但是,这些软件包也包含了开发文件。 如果我上传到我的网站,80%是不必要的源数据。 我目前正在使用Gulp与我的项目,但我还没有看到2应该如何互动。 是否有一个编译bower_components成为一个简洁的东西gulp包? 我是新来的这种工作stream程,尽pipe我努力了,但是我找不到答案。 道歉,如果我听起来像一个总noob。

离子 – 不能开始吞咽

运行后: ionic setup sass 并安装所有的依赖关系,当我尝试开始gulp ,我有这个错误,而不是: /Users/user/Sites/ionic/project/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:22 throw new Error('`libsass` bindings not found. Try reinstalling `node-sass`?'); ^ Error: `libsass` bindings not found. Try reinstalling `node-sass`? 我试图重新安装节点sass,但迄今为止没有成功。 任何想法如何解决这个问题? 谢谢!

使用gulp压扁父目录,但不能使用子目录

我组织了我的代码,以便在文件夹名称(如_DIRECTIVE上包含一些关键字。 我的意图是用gulp.src("**/*_DIRECTIVE/**/*")来编写一个能识别文件夹命名模式的gulp.src("**/*_DIRECTIVE/**/*")任务。 我想复制包含_DIRECTVE关键字的所有文件夹(及其子文件夹),并将它们放在单独的文件夹中。 我有一个文件夹结构,看起来像 src |-folder-name_1_DIRECTVE/ | |-subfolder/ | | |-subsubfolder/ | | |-file.js | | | |-file.js | |-folder/ | |-folder-name_2_DIRECTVE/ | |-subfolder/ | | |-subsubfolder/ | | |-file.js | | | |-file.js | | |-folder/ |-subfolderfolder/ |-folder-name_3_DIRECTVE/ |-subfolder/ | |-subsubfolder/ | |-file.js | |-file.js 使用gulp我想要输出 output |-folder-name_1_DIRECTVE/ | |-subfolder/ | | |-subsubfolder/ | […]

后端文件被公开加载 – Angularjs / Node / Gulp

我一直在努力知道为什么我的后端文件被加载为前端文件。 当我正在用angular + node + gulp工作一个新项目时,对我来说似乎有些困惑。 这里有一个例外的图像..任何build议? 图像错误

包含gulp-file-include的gulp手表

我使用yeoman / generator-gulp-webapp,并添加了gulp-file-include 。 我build立了gulpfile.js来包含构build文件 ,但是我不知道如何设置gulp手表 。 以下是我尝试这样做,但似乎这是行不通的。 我没有得到任何错误。 一切工作正常,除了index.html有@@包括(…),而不是从这些文件的代码 'use strict'; // generated on 2014-10-27 using generator-gulp-webapp 0.1.0 var gulp = require('gulp'); // load plugins var $ = require('gulp-load-plugins')(); gulp.task('styles', function () { return gulp.src('app/styles/main.scss') .pipe($.rubySass({ style: 'expanded', precision: 10 })) .pipe($.autoprefixer('last 1 version')) .pipe(gulp.dest('.tmp/styles')) .pipe($.size()); }); gulp.task('fileinclude', function () { return gulp.src('app/*.html') .pipe($.fileInclude()) […]

NodeJS,Angular Seed,Gulp,Jasmine,Karma问题

build立一个angular种子,我有一切工作,我甚至可以启动茉莉花浏览器,但由于某种原因,我的规范不工作,所以我添加了一个karma.conf文件,它似乎打破了茉莉花浏览器。 我是新来的使用茉莉花,所以我很茫然,有很多关于如何做到最好的意见,但无论我尝试我似乎无法得到它的工作,我已经在这里添加回购链接为代码。 希望有人能够看到我做错了什么。 这个种子需要NodeJS 下载git,把它放在一个文件夹中,进入根目录下的config文件夹,运行npm install然后运行gulp,它会自动在控制台的浏览器中启动,你会看到这个错误 [14:52:17] 'jasmineWeb' errored after 2.27 ms [14:52:17] TypeError: object is not a function at Gulp.<anonymous> (/webdev/E20/config/gulpfile.js:137:11) at module.exports (/webdev/E20/config/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7) at Gulp.Orchestrator._runTask (/webdev/E20/config/node_modules/gulp/node_modules/orchestrator/index.js:273:3) at Gulp.Orchestrator._runStep (/webdev/E20/config/node_modules/gulp/node_modules/orchestrator/index.js:214:10) at /webdev/E20/config/node_modules/gulp/node_modules/orchestrator/index.js:279:18 at finish (/webdev/E20/config/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8) at module.exports (/webdev/E20/config/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:60:3) at Gulp.Orchestrator._runTask (/webdev/E20/config/node_modules/gulp/node_modules/orchestrator/index.js:273:3) at Gulp.Orchestrator._runStep (/webdev/E20/config/node_modules/gulp/node_modules/orchestrator/index.js:214:10) at /webdev/E20/config/node_modules/gulp/node_modules/orchestrator/index.js:279:18 这是我用来发射茉莉花的任务 gulp.task('jasmineWeb', function() { var filesForTest = ['../src/**/*.js', […]

使用量angular器/ saucelabs禁用输出

有什么办法可以在使用下面的量angular器/ saucelabs / gulp示例输出时禁用/压缩启动器输出: [firefox #2] [firefox #2] [firefox #2] rawFlowsForLast ✓ should return a valid es result [firefox #2] [firefox #2] Main Page ✓ should have a title (4840ms) [firefox #2] [firefox #2] [firefox #2] 2 passing (5s) [firefox #2] 我很想停用以[firefox#2]开头的行,只保留testing结果输出。 理想情况下,它会像我的摩卡输出的其余部分格式化好。 我敢肯定,我可以想出办法手动压扁它,但似乎应该有一个选项来控制输出。 我的大文件在这里

当gulp-eslint失败时抛出gulp-notify消息

我试图在我的ESlint任务检测到错误时使用gulp-notify,但是我不能使它工作,因为gulp-notify需要在一些Node.jsstream之后用pipe道引用。 我可以用下面的代码“部分工作” return gulp.src([config.js.all, '!app/assets/scripts/vendor/**']) .pipe(eslint()) .pipe(plumber()) .pipe(eslint.format()) .pipe(notify('Error!!!')) .pipe(eslint.failAfterError()); 然而,总是抛出消息,不仅当我有错误。 我可以使用下面的语法在gulp-eslint中得到错误: return gulp.src([config.js.all, '!app/assets/scripts/vendor/**']) .pipe(eslint()) .pipe(plumber()) .pipe(eslint.format()) .pipe(notify('Error!!!')) .pipe(eslint.result(function (result) { if(result.errorCount > 0){ console.log('Error'); } })) .pipe(eslint.failAfterError()); 当有错误时,我会返回console.log,我需要的是让gulp-notify在上面的代码中发送一个通知。 有人可以帮我吗?

一揽子文件任务执行顺序

我有这些任务: gulp.task('clean-css', function () { del.sync([ 'content/bundles/css.css', 'content/bundles/css.css.bundle', 'content/bundles/css.min.css', 'content/bundles/css.min.css.gz', 'temp/css/common/*.css', 'temp/css/user/*.css', 'temp/css/media/*.css']) }); gulp.task('make_css_files', ['clean-css'], function () { gulp.src('content/less/common/*.less').pipe(less()).pipe(gulp.dest('temp/css/common')); gulp.src('content/less/user/*.less').pipe(less()).pipe(gulp.dest('temp/css/user')); gulp.src('content/less/media/*.less').pipe(less()).pipe(gulp.dest('temp/css/media')); }); gulp.task('make_css_bundle', ['make_css_files'], function () { return gulp.src(['temp/css/common/*.css', 'temp/css/user/*.css', 'temp/css/media/*.css']) .pipe(minifyCSS()) .pipe(concat('css.min.css')) .pipe(gulp.dest('content/bundles/')) .pipe(gzip(gzip_options)) .pipe(gulp.dest('content/bundles/')); }); 当我运行make_css_bundle时,它运行: [18:38:04] Using gulpfile C:\H\user\user\Gulpfile.js [18:38:04] Starting 'clean-css'… [18:38:04] Finished 'clean-css' after 86 ms [18:38:04] Starting 'make_css_files'… […]

在gulp中的es.merge用法:Object#<Stream>没有方法'end'

我正在努力获得两条并行的处理路线。 我的代码如下所示: gulp.task('build', function(){ return gulp.src(src,{cwd:srcDir}) .pipe(concat('sdk.js', {newLine:'\n\n'})) .pipe(gulp.dest('dist/')) .pipe(jshint()) .pipe(jshint.reporter('default')) .pipe(es.merge( gulp.src('dist/sdk.js') .pipe(preprocess({context:{debug:true}})) .pipe(rename('sdk.debug.js')), gulp.src('dist/sdk.js') .pipe(preprocess({context:{}})) .pipe(uglify()) .pipe(rename('sdk.min.js')) )) //some more processing .pipe(gulp.dest('dist/')) ; }); 我在这里find了一个build议,这样分叉和合并stream的方式应该是可行的。 但是,我得到的错误: stream.js:79 dest.end(); ^ TypeError: Object #<Stream> has no method 'end' at Stream.onend (stream.js:79:10) at Stream.EventEmitter.emit (events.js:117:20) at end (C:\Users\user\Documents\proj\node-sdk\node_modules\gulp- jshint\node_modules\map-stream\index.js:116:39) at Stream.stream.end (C:\Users\user\Documents\proj\node-sdk\node _modules\gulp-jshint\node_modules\map-stream\index.js:122:5) at Stream.onend (stream.js:79:10) […]