Tag: 吞咽

用于语义UI的`gulp build`给出错误'ENOENT:no such file or directory'

版: gulp@3.9.1 我已经通过npm install安装了semantic-ui ,并在交互式设置过程中给出了默认设置。 但是,当我从/semantic文件夹gulp build我得到以下错误: [20:52:27] Starting 'build'… Building Semantic [20:52:27] Starting 'build-javascript'… Building Javascript [20:52:27] Starting 'build-css'… Building CSS [20:52:27] Starting 'build-assets'… Building assets [20:52:28] Created: dist/components/site.js [20:52:28] Created: dist/components/site.min.js [20:52:28] Created: dist/components/form.js [20:52:28] Created: dist/components/form.min.js [20:52:28] Created: dist/components/accordion.js [20:52:28] Created: dist/components/accordion.min.js [20:52:28] Created: dist/components/checkbox.js [20:52:28] Created: dist/components/dimmer.js [20:52:28] Created: dist/components/checkbox.min.js [20:52:28] […]

无法读取未定义的属性“主”

所以我的项目结构是我有一个src和www目录在我的根./ ,其中还包含我的bower.json , gulpfile.js和.bowerrc directory设置为./www/bower/ 。 我在我的./src有一个index.html ,我已经设置了一个吞咽任务,通过wiredeppipe道,并通过wiredep ,在那里凉亭包。 不幸的是,它增加了所有的依赖,就好像它在./src目录中一样,因此所有的依赖都以../www/bower/为前缀,因为最终的index.html最终在www目录中,所以我摆弄了一些wiredepconfiguration选项如下所示: gulp.task('bower', function () { gulp.src('./src/index.html') .pipe(wiredep({ cwd: './www', bowerJson: require('./bower.json'), directory: '../.bowerrc' })) .pipe(gulp.dest('./www')); }); 但是,我得到以下错误: stream.js:94 throw er; // Unhandled stream error in pipe. ^ TypeError: Cannot read property 'main' of undefined at findMainFiles (D:\Dropbox\University\MindFlipDOM\node_modules\wiredep\lib\detect-dependencies.js:53:37) at D:\Dropbox\University\MindFlipDOM\node_modules\wiredep\lib\detect-dependencies.js:111:17 at forOwn (D:\Dropbox\University\MindFlipDOM\node_modules\wiredep\node_modules\lodash\dist\lodash.js:1301:15) at Function.forEach (D:\Dropbox\University\MindFlipDOM\node_modules\wiredep\node_modules\lodash\dist\lodash.js:2595:9) at […]

无法获取/使用gulp-connect-php

我正在使用gulp-connect-php尝试使用BrowserSync在本地运行一个php服务器。 这是我的gulpconfiguration文件: var gulp = require('gulp'), connect = require('gulp-connect-php'), browserSync = require('browser-sync'); gulp.task('connect-sync', function() { connect.server({}, function (){ browserSync({ server: { baseDir: "app" }, // proxy: '127.0.0.1:8000' }); }); gulp.watch('**/*.php').on('change', function () { browserSync.reload(); }); }); gulp.task( 'default', [ 'connect-sync' ] ) 上面的代码在我的应用程序目录中有一个index.html文件,但是当我用一个index.php文件replace它时,我得到以下消息: 不能获取 / 不完全确定我在这里做错了什么?

找不到模块'../lib/completion'尽pipe安装完成

我得到这个错误不能find模块'../lib/completion'但是我已经安装完成和completion.js存在于lib文件。 ->gulp compile module.js:327 throw err; ^ Error: Cannot find module '../lib/completion' at Function.Module._resolveFilename (module.js:325:15) at Function.Module._load (module.js:276:25) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (D:\wamp23\www\mfe\ref\gulpfile.js:13:18) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17)

在IIS上部署angular度应用程序

我正在使用node.js处理AngularJs应用程序。 使用gulp,我已经创build(编译)我的应用程序(下图中的应用app ),并获得以下目录 现在我彻底打开了接下来的工作。 我想通过IIS托pipe这个应用程序来运行并查看页面(在views文件夹中),但我不知道如何在IIS上托pipe它。 我试过这篇文章,但它指导使用快递服务器。 问题是,如何IIS会弄清楚,第一页位于views文件夹,即使我使用完整的url http://localhost:8078/views/index.html 它显示了所有angular度代码{{logginuser}}等括号 编辑:我需要web.config文件或不。 如果是,那么我将如何定义应用程序的入口点?

Gulp:节点4.0更新后的分段错误11

我刚刚更新到节点4。 当我运行Gulp时,我看到: 分割故障:11 我包括: var gulp = require('gulp'); var jscs = require('gulp-jscs'); var concat = require('gulp-concat'); var uglify = require('gulp-uglify'); var rename = require('gulp-rename'); var responsive = require('gulp-responsive'); var imagemin = require('gulp-imagemin'); var jpegtran = require('imagemin-jpegtran'); var rollup = require('gulp-rollup'); var webp = require('gulp-webp'); var spritesmith = require('gulp.spritesmith'); 我无法获得debugging任务运行。 详细不会吐出任何额外的东西。 思考?

在所有文件完成任务之后运行代码

所以我一直在尝试一下Gulp,看它与Grunt的速度有多快,而且我对结果印象深刻,但是我有一件事我不知道如何在Gulp中做。 所以我有这个吞噬任务来缩小HTML: gulp.task('html-minify', function() { var files = [ relativePaths.webPath + '/*.html', relativePaths.webPath + '/components/**/*.html', relativePaths.webPath + '/' + relativePaths.appPath + '/components/**/*.html' ]; var changedFiles = buildMetaData.getChangedFiles(files); //TODO: needs to execute only after successful run of the task buildMetaData.addBuildMetaDataFiles(changedFiles); buildMetaData.writeFile(); return gulp.src(changedFiles, { base: relativePaths.webPath }) .pipe(filelog()) .pipe(minifyHtml({ empty: true, quotes: true, conditionals: true, comments: […]

用gulp运行一个命令来启动Node.js服务器

所以我使用的是gulp-exec( https://www.npmjs.com/package/gulp-exec ),它在阅读了一些文档后提到,如果我想运行一个命令,我不应该使用插件,使用我已经尝试使用下面的代码。 var exec = require('child_process').exec; gulp.task('server', function (cb) { exec('start server', function (err, stdout, stderr) { .pipe(stdin(['node lib/app.js', 'mongod –dbpath ./data'])) console.log(stdout); console.log(stderr); cb(err); }); }) 我试图让我的Node.js服务器和MongoDB启动。 这就是我想要完成的。 在我的terminal窗口,它抱怨我的 .pipe 不过,我是新来的吞咽,我认为这是你如何通过命令/任务。 任何帮助表示赞赏,谢谢。