Tag: yeoman generator

我怎样才能debugging一个Yeoman发电机KO(与打字稿和吞咽)节点JS项目在Visual Studio与节点JS工具为Visual Studio

我已经在Visual Studio(2012专业和2013社区)中用NTVS创build了一个Node JS项目,并使用Yeoman生成器来创buildKnockout SPA应用程序 (使用生成器设置中的打字稿选项)。 现在我需要决定在debugging时打开哪个文件作为启动文件(打F5)。 我想这将是./src/app/require.config.js,否则我得到一个错误,需要是未定义的。 当我开始debugging一切看起来不错,一个控制台窗口出现消息“debugging器正在监听端口5858”。 但是当我启动localhost:5858时,没有服务器/网站。 我可以在另一个端口上的服务器启动应用程序,但是没有中断点,甚至没有启动文件。 所以我的问题是: – 我应该作为启动文件设置? – 如何使用NTVS在Visual Studio中debugging我的应用程序? 编辑 我已经确定,当我添加一个新的空NTVS项目时,它创build一个server.js文件: var http = require('http'); var port = process.env.port || 1337; http.createServer(function (req, res) { res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('Hello World\n'); }).listen(port); 将其设置为启动文件会导致对该文件进行debugging。 我怎么能仍然通过require.config.js加载require并启动我的应用程序startup.ts? require.config.js // require.js looks for the following global when initializing var require = […]

从git checkout构buildyeoman项目

从git构buildyeoman项目结账时遇到问题。 我试图把yeoman项目的git checkout和运行grunt服务 。 以下是错误描述的情况 场景描述: Person1使用yoangular度创build了yeoman angularjs项目。 grunt serve在Person1的电脑上工作正常。 Person1将代码推送到git,以便其他团队成员可以在其上工作。 Person2接受git( git clone <URL> )的签出时会发生问题。 检出副本中的grunt serve命令会导致以下错误: $ grunt serve grunt-cli: The grunt command line interface. (v0.1.13) Fatal error: Unable to find local grunt. If you're seeing this message, either a Gruntfile wasn't found or grunt hasn't been installed locally to your project. For […]

错误:找不到您的Bower软件包。 使用–force继续

我正在build立一个应用程序使用MEAN堆栈,并试图使用yeoman发生器脚手架我的前端,当我做哟angular度,它无法build立和结束在下面 Running "wiredep:app" (wiredep) task Warning: Error: Cannot find where you keep your Bower packages. Use –force to continue. Aborted due to warnings. 我坚持这个警告。 我在这里发现了一个类似的问题,但是这个解决scheme对我没有帮助。 任何帮助将不胜感激。

Yeoman Angular.js grunt serve-d应用从livereload.js有很长的延迟?snipver = 1

我遵循Yeoman的指导来设置一个Angular.js应用程序。 除了从“localhost”到“0.0.0.0”的主机名之外, 我没有任何改变 。 当我做了grunt serve ,没有错误。 最后,我确实看到了Allo,Allo的首页,但是只有在livereload.js?snipver = 1的延迟超过30秒之后,才能获得GET。 正如你所看到的,服务器不会输出任何exception的东西。 我的整个项目在github上 。 我希望能够重新加载,并发现了一些嫌疑犯: /node_modules/grunt-contrib-connect/node_modules/connect-livereload/index.js有以下两个包含livereload url的函数。 第一个链接到“ http://my.ip.addr.ess:9000 / livereload.js ”,它有一个“无法获得”。 function getSnippet() { /*jshint quotmark:false */ var snippet = [ "<!– livereload script –>", "<script type=\"text/javascript\">document.write('<script src=\"http://'", " + (location.host || 'localhost').split(':')[0]", " + ':" + port + "/livereload.js?snipver=1\" type=\"text/javascript\"><\\/ script>')", "</script>", "" ].join('\n'); […]

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, […]

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

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

`哟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! […]