Tag: yeoman

更新Yeoman给cb从来没有打电话

我使用npm update -g -yo将yeoman更新到最新版本。 但是我总是得到这个错误: npm ERR! cb() never called! npm ERR! cb() never called! 。 请注意,我最初安装了节点,然后我做了npm cache clean -f然后用Homebrew重新安装, brew install -g node 。 而且我仍然收到上面提到的同样的错误。 所有这一切都在terminal上。 有人能告诉我吗? 非常感谢

与git的Yeoman

我是Yeoman的全新用户。 我正在努力学习本文的工作stream程。 到目前为止,我了解了一些,但我陷入了一个非常基本的过程。 这是我的意思是:当我把我的所有目录到我的资源库,它需要必要的文件和文件夹。 我使用了Yeoman .gitignor,以便它忽略像bower_component这样的不需要的大文件 其他他们的成员可以克隆我的存储库,并运行: bower安装&npm安装具有所有bower和npm组件。 然后运行grunt生成dist文件夹。 Upto现在一切正常,但我的问题是他们需要做相同的进程,每次当他们拉什么新的项目? 像我做了一些改变,并推到我的存储库,所以他们必须做什么来获得我的新变化? 他们需要做凉亭安装&npm安装 ? 预先感谢,并真的很可怜的英语感到抱歉

自定义节点模块来安装依赖关系

目前我有一个自定义Yeoman生成器的一些应用程序。 这个生成器需要一些依赖和configuration。 1 – GruntJS全球安装; 2 – Bower将在全球安装; 3 – Yeoman将在全球安装; 4 – 其他一些configuration要到位; 问 :是否有任何工具来pipe理这个依赖关系的工作stream程? 最好的,我希望有一个两步的过程 1 – 安装Node.Js 2 – npm安装我的发电机 第二步将负责全面安装所有软件包。 我看到一些使用package.json中的预安装脚本的例子,如下所示: … scripts: { preinstall: 'npm install bower -g; npm install grunt-cli -g' } … 这个解决scheme对我来说并不起作用,我也在几个地方看过这是一个反模式。 任何帮助感激!

尽pipe存在服务,但不注入依赖项

所以我一直在做Angular.js项目一段时间,现在将在竞争中使用,并在一半的时间,我意识到我需要一个插件系统dynamic加载一些必要的代码在运行时。 到目前为止,我发现angular.js并不是很适合在运行时加载服务。 由于代码只能在比赛时间提供给竞争对手,我只能提供一个不成功的例子。 // ex1.coffee mainModule = angular.module('mainModule') mainModule.service('needed', () -> @neededFunc() -> console.log "just an example" return this mainModule.service('ex1', ($injector) -> @loadFile = (u, pluginName) -> $.ajax dataType: "script", url: u, data: null, success: (jqxhr, textStatus) => $injector.invoke([pluginName, (plugin) => plugin.testFunc() error: (jqxhr, textStatus, errorThrown) -> console.log "couldn't find the script" return this // […]

安装Yeoman – “哟命令未find”

我已经安装了node.js并使用npm-g_nosudo脚本在我的Yosemite安装上设置了npm 。 当我然后运行npm install -g yo我看到一堆内容滚动通过我的terminal窗口,没有错误,并完成。 然后我inputyo和OS X告诉我,它无法find该命令。 Sullys-MacBook-Pro:~ Sully$ npm install -g yo /Users/Sully/npm/bin/yo -> /Users/Sully/npm/lib/node_modules/yo/lib/cli.js > yo@1.4.6 postinstall /Users/Sully/npm/lib/node_modules/yo > yodoctor Yeoman Doctor Running sanity checks on your system ✔ Global configuration file is valid ✔ NODE_PATH matches the npm root ✔ No .bowerrc file in home directory ✔ No .yo-rc.json file in […]

Yeoman应用程序部署到Heroku的问题

我一直在尝试将我的AngularFullstack(节点)应用程序部署到Heroku。 我在terminal中创build了应用程序: yo angular-fullstack 。 每当我尝试部署到Heroku,当我去我的部署应用程序时,我得到以下内容: 应用程序错误 应用程序发生错误,您的页面无法送达。 请稍后重试。 如果您是应用程序所有者,请查看日志以获取详细信息。 日志是: 2015-07-24T06:57:35.184227+00:00 heroku[web.1]: State changed from up to starting 2015-07-24T06:57:38.772056+00:00 heroku[web.1]: Stopping all processes with SIGTERM 2015-07-24T06:57:39.757747+00:00 app[web.1]: Error waiting for process to terminate: No child processes 2015-07-24T06:57:40.645233+00:00 heroku[web.1]: Process exited with status 22 2015-07-24T06:57:49.314501+00:00 heroku[web.1]: Starting process with command `npm start` 2015-07-24T06:57:51.176323+00:00 app[web.1]: Detected […]

我在哪里注册我的JS,以便它被添加grunt?

我用了一个yeoman生成器(html5网站)。 我有一个现有的项目,我想翻译成咕噜/鲍尔工作stream程。 我有一个.js文件,做我想要的,从旧的项目。 将其复制到新的基于bower / grunt的项目的开发文件夹中不会导致它被连接到最终的单个mainsite.js。 所以我检查了gruntfile.js并在这里添加它: concat : { options: { banner: '<%= banner %>', stripBanners: false }, main : { src : [ 'bower_components/jquery/dist/jquery.js', 'bower_components/jQueryui/ui/jquery-ui.js', 'bower_components/jqueryui-touch-punch/jquery.ui.touch-punch.js ', 'bower_components/RWD-FitText.js/jquery.fittext.js', 'bower_components/BrowserDetection.js/BrowserDetection.js', 'bower_components/respond/dest/respond.src.js', 'main-2k15-dribble/JavaScript/Main.js', 'main-2k15-dribble/JavaScript/mainsite.js', this added—> 'main-2k15-dribble/JavaScript/jribble.js' ], dest : 'main-2k15-dribble-pub/js/mainsite.js' } }, 我特别想知道我需要做些什么来将我现有的JavaScript添加到由grunt和bowerpipe理的项目中? 一般来说,我从来没有见过明确的描述什么文件夹是什么意思,以及工作stream程添加到脚手架的项目。 但我觉得必须有一些维基或什么教这个! 我不相信开发者会通过线索和错误发现

在* one * gulp任务中使用yargs将它应用于* all *任务:为什么? 怎么修?

我有一个UI项目,基于generator-gulp-angular的自动化工作stream程。 我添加了gulp-ng-config ,以便根据环境variables执行不同的构build。 我使用包裹“yargs”来提取环境标志,并使其可用于该任务。 但是,即使这个任务应该被封装,我使用yargs来创build需求,现在在我的整个项目中,所有的gulp任务都是活跃的。 这里是ngconfig任务: var gulp = require('gulp'); var path = require('path'); var conf = require('./conf'); var gulpNgConfig = require('gulp-ng-config'); var argv = require('yargs') .usage('This `build` or `serve` task includes an ngConfig task, whose requirements have not been met via arguments. \n LONG USAGE: <command> –environment <"production" or "sit" or "local">.\n SHORT USAGE […]

失败$ grunt buildcontrol:页面jit-grunt未find

简单的应用与Yeoman只是testing,看看我能否部署…我已经运行: npm install grunt-build-control –save-dev npm install jit-grunt –save-dev 但是我从terminal上得到一个错误,说找不到插件了? 我知道静态映射中可能有一个答案只是不知道如何去做。 这是从terminal的错误: $ grunt buildcontrol:pages jit-grunt: Plugin for the "buildcontrol" task not found. If you have installed the plugin already, please setting the static mapping. See https://github.com/shootaroo/jit-grunt#static-mappings Warning: Task "buildcontrol:pages" failed. Use –force to continue. Aborted due to warnings. Execution Time (2015-12-08 20:00:17 UTC) loading […]

mem-fs-editor:如何复制相关的符号链接?

我有一个包含大量文件和一个(或多个) symlinkname -> . 符号链接。 我想将整个目录的内容复制到一个新的位置。 下面的代码复制一切正常,虽然它跳过了符号链接。 添加globOptions.follow = true只会使其无限循环,这是有道理的,因为它会尝试对其进行解引用。 我怎样才能使它复制所有的内容+符号链接,而不是试图跟随他们? this.fs.copy( this.destinationPath() + '/**', this.destinationPath('build/html'), { globOptions: { follow: true // This will make the copy loop infinitely, which makes sense. } } });