Tag: yeoman

“你的npm版本已经过时”,但事实并非如此。 安装哟

在Windows 7 64位。 通过向导给我npm安装Node.js。 我运行npm install -g哟,并得到以下 你的npm版本已经过时了。 完整的输出: C:\Users\dlite922>npm install -g yo | > spawn-sync@1.0.11 postinstall C:\Users\dlite922\AppData\Roaming\npm\node_modules\yo\node_modules\cross-spawn\node_modules\spaw > node postinstall C:\Users\dlite922\AppData\Roaming\npm\yo -> C:\Users\dlite922\AppData\Roaming\npm\node_modules\yo\lib\cli.js > yo@1.4.7 postinstall C:\Users\dlite922\AppData\Roaming\npm\node_modules\yo > yodoctor Yeoman Doctor Running sanity checks on your system √ Global configuration file is valid √ NODE_PATH matches the npm root √ Node.js version × npm […]

Grunt使用node.js应用程序进行livereload

我已经在Node.js(用Express&socket.io)编写了一个应用程序, 我想用Grunt在开发和连接到Node.js应用程序时使用livereload编译我的客户端的东西。 我怎样才能做到这一点? (最好不要在另一个端口运行Node.js应用程序,另一个端口运行客户端,因为path和跨域问题) 我也安装了Yeoman,它使用了开箱即用的grunt-contrib-livereload软件包,但是据我所知,它使用Node.js Connect服务器来提供客户端文件,从而与Node.js应用程序分离。 来自Yeoman生成的Gruntfile.js的示例: var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet; var mountFolder = function (connect, dir) { return connect.static(require('path').resolve(dir)); }; // … cut some parts grunt.initConfig({ watch: { livereload: { files: [ '<%= yeoman.app %>/*/*.html', '{.tmp,<%= yeoman.app %>}/styles/*.css', '{.tmp,<%= yeoman.app %>}/scripts/*.js', '<%= yeoman.app %>/images/*.{png,jpg,jpeg}' ], tasks: ['livereload'] } // ..cut some parts }, connect: […]

将Jade集成到Yeoman的服务器/监视/重载任务中

我一直在玩Yeoman & Jade 。 我已经创build了一个小testing应用程序通过yeoman init angular (这是一个angular度的应用程序,但这不是重点)… 当我在命令行inputyeoman server时,它会: 编译coffeescript和罗盘文件 启动服务器 启动浏览器 观看和重新加载浏览器中的咖啡和罗盘变化 这是Yeoman的一大特色! 现在我想要与Jade相同的function。 所以我通过npm install grunt-jade并在GruntFile.js中添加了如下configuration来编译jade模板: jade: { html: { src: ['app/views/*.jade'], dest: 'app/views', options: { client: false } } }, 通过在watch任务中添加以下configuration,我能够将jade任务整合到Yeoman的监视和重新加载任务中: watch: { … jade: { files: 'app/views/*.jade', tasks: 'jade reload' }, … } 而且所有的工作都非常好,除非在命令中添加了jade任务,否则不会发生初始编译: yeoman jade server 我们的pipe家不喜欢这个漂亮的女孩,因为他不会让她整合他的server任务:)这是烦人的,因为yeoman server将只编译coffeescript和罗盘文件。 有什么办法可以将jade任务添加到yeoman […]

Yeoman | 哟命令未find

看到有这样一个类似的问题,但没有find答案满足或适用于我的问题,所以认为我想我会再问一次。 我遇到了“$哟”命令的麻烦,而且我的cmd一直告诉我这个命令没有find。 我已经安装了yeoman: $npm install -g yo 没有任何问题。 我也检查了我的$ PATH下 $ echo $PATH /c/Users/Anton/bin:.:/usr/local/bin:/mingw/bin:/bin:.:/c/Program Files (x86)/Java/jre7/bin:/usr/cmd:/usr/bin:/c/Program Files (x86)/nodejs/:/c/Users/Anton/AppData/Roaming/npm 并确认哟与其他节点模块一起安装。 我可以调用其他命令,如: $ bower Usage: bower <command> [<ar….. 和 $ yeoman ========================================================================== We're constantly looking for ways to make yeoman better! May we anonymously report ….. 没有任何问题。 哟导致失败 $ yo sh.exe": yo: command not found 有没有人有什么问题的build议? 我读过这可能是错误的$ […]

如何在Yeoman上提示前面的情况时执行其他提示?

当Yeoman上的prompt1为true时如何执行prompt2如下所示? var prompts = [ {name: 'prompt1', message: 'Ask 1?'}, {name: 'prompt2', message: 'Ask 2?'} ];

Yeomanangular发生器安装运行,但发电机不会出现在发电机列表中

我试过用下列方法安装yeomanangular形发生器: npm install -g generator-angular 这一切看起来像安装正确… … npm http GET https://registry.npmjs.org/string_decoder npm http 304 https://registry.npmjs.org/string_decoder npm http GET https://registry.npmjs.org/event-emitter npm http GET https://registry.npmjs.org/next-tick npm http 304 https://registry.npmjs.org/event-emitter npm http 304 https://registry.npmjs.org/next-tick generator-angular@0.7.1 /Users/rich/.node/lib/node_modules/generator-angular ├── chalk@0.3.0 (has-color@0.1.4, ansi-styles@0.2.0) ├── wiredep@0.4.2 (chalk@0.1.1, lodash@1.3.1) └── yeoman-generator@0.13.4 (dargs@0.1.0, diff@1.0.8, debug@0.7.4, rimraf@2.2.6, chalk@0.2.1, text-table@0.1.1, mime@1.2.11, async@0.2.10, mkdirp@0.3.5, isbinaryfile@0.1.9, shelljs@0.1.4, underscore.string@2.3.3, […]

尝试更新后不能再使用npm命令

我试图安装yeoman,但它提出了关于自签名证书的错误。 我看了这个,发现我不得不升级节点。 然而,升级节点扔了这个:(忘记使用sudo …) npm ERR! error rolling back Error: EACCES, unlink '/usr/local/lib/node_modules/npm' npm ERR! error rolling back npm@1.4.4 { [Error: EACCES, unlink '/usr/local/lib/node_modules/npm'] 在此之后,我不能再使用npm了。 找不到: /usr/local/bin/npm: No such file or directory 尝试重新安装brew: It appears you already have npm installed at /usr/local/lib/node_modules/npm 告诉我npm卸载,但我不能再使用npm了。 错误信息更详细,但我认为关于“取消链接”的部分是主要的。 我怎么去把它连接起来,为什么会出现这样一个奇怪的错误? 编辑:也尝试更新节点之前运行npm config set ca "" 。

Gruntfile.jspath中的“{,* /}”是什么意思?

在Gruntfile.js ,我有: watch: { styles: { files: [ '<%= yeoman.app %>/styles/{,*/}*.less' ], tasks: ['copy:styles', 'autoprefixer'] } } 对于path, {,*/}是什么意思呢? 如何使用双星号**/ ?

npm WARN弃用npmconf@2.1.2:这个包已经重新集成到npm中,现在已经过时了npm

我在CentOS 7服务器上安装node.js,当我尝试安装yeoman时,出现以下错误: npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm yeoman的安装似乎正常工作。 有什么我可以做,以避免这种警告? 什么是没有处理的影响? 下面是从yeoman安装terminal输出的第一部分的其余部分: [root@localhost ~]# npm install -g yo npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm /usr/bin/yo […]

`哟angular度`给出错误:npm ERR! 代码ENOENT npm ERR! errno 34(是的,我已经清理caching并设置.npmignore)

我试图在一个新的项目目录中运行yo angular ,但它给了我一路上的ENOENT错误。 是的,我已经看过这个类似的问题 ,但是它的解决scheme并不适合我。 我运行这些东西在空的新项目目录之前运行yo angular : touch .npmignore npm cache clear npm cache clean 但我仍然得到: npm ERR! Error: ENOENT, lstat '/home/ubuntu/app_c/node_modules/grunt/ internal-tasks/bump.js' npm ERR! If you need help, you may report this *entire* log, npm ERR! including the npm and node versions, at: npm ERR! <http://github.com/npm/npm/issues> npm ERR! System Linux 3.2.0-54-virtual npm ERR! […]