Tag: nodemon

Nodemon使用正则expression式忽略文件夹

在Nodemon忽略文件中,我想select性地忽略主文件夹中的文件夹。 我的文件夹结构是: -modules -accounts -client -angularfiles -accounts.js -repository -accountrepository.js -bankbranch -client -angularfiles -bankbranch.js -repository -bankbranchrepository.js 在这个层次结构中,我想忽略文件path“modules / accounts / client / angularfiles /”和“modules / bankbranch / client / angularfiles /” 我有更多这样的模块。 在这种情况下,我试图写这个正则expression式忽略基于expression式如下所示: /modules\\\w*\\client\\angularfiles\\*/ 使用在线正则expression式匹配器匹配这个path: \AngularJSApp\modules\accounts\client\angularfiles\bankbranch.js 但当client \ angularfiles中的文件发生更改时,nodemon会重新启动。

nodemon过滤样式文件更改

我使用了.styl中的下列设置, nodemon.json没有任何ignore规则,使nodemon wathcing .styl文件: "watch": [ "src/css/*.styl", "src/css/includes/*.styl" ] 任何更改都会触发我在package.json定义的构build脚本。 但是在编辑.styl文件后,nodemon似乎已经过滤了更改: Express app running on 3001 [nodemon] files triggering change check: src/css/main.styl [nodemon] matched rule: **/src/css/*.styl [nodemon] changes after filters (before/after): 1/0 任何想法出了什么问题?

Express和BrowserSync没有吞咽?

我正在开发一个快速应用程序。 我只使用browserSync观看静态文件,但现在,我想要做一个快速的应用程序相同。 我看到很多使用Gulp的例子。 但是我想知道是否有任何解决scheme只能用npm脚本来pipe理? (和nodemon?) 我目前的脚本: "scripts": { "start": "npm run start-server & npm run watch-js", "build-js": "browserify -t babelify -t aliasify -t partialify src/ | uglifyjs > public/app.js", "start-server": "browser-sync start –server 'public/' –files 'public/' –port 9000 –no-ui", "watch-js": "watchify -vd -t babelify -t aliasify -t partialify src/ -o public/app.js", },

nodemon:作为必需模块使用时,将parameter passing给可执行文件

我试图用nodemon启动一个脚本,将它作为必需的模块使用,而且我无法正确传递参数。 例如,为 var args = [ process.argv[0], '–harmony', '/path/to/script.js', '-i', 'logs' ];` 我期待脚本启动为: node –harmony /path/to/script.js -i logs 但是这并不奏效,我所能得到的就是 node –harmony /path/to/script.js -i logs /path/to/script.js 这是我试过的: var app = require('nodemon')({ script: args[2], exec: args.join(' ') }); 我知道execMap ,但是不好,因为无论如何我都无法传递参数。 如何做呢?

与Grunt同时运行`watch`&`nodemon`

我刚刚开始使用Grunt,并希望运行grunt-contrib-watch [GitHub页面]在每次修改文件时使用我的JavaScript(使用grunt-contrib-jshint [GitHub页面] )并运行grunt-nodemon [ GitHub页面] ,同时使用grunt-concurrent [GitHub页面] 。 据我所知(我显然不)我的Gruntfile应该: 默认运行concurrent concurrent运行watch 每次修改文件时, watch都会运行jshint Gruntfile.js module.exports = function (grunt) { grunt.initConfig({ concurrent: { dev: [ 'watch' ], options: { logConcurrentOutput: true } }, jshint: { server: [ '**/*.js', '!node_modules/**/*.js' ], options: { node: true } }, watch: { all: [ '**/*/.js', '!node_modules/**/*.js' ], tasks: [ […]

Gruntjs用grunt-nodemon,watch和jshint

我试图用这3个插件运行GruntJS ,以便它可以监视更改,并首先:lint该文件,然后重新加载快速服务器。 我的问题与下面的configuration是,如果jshint lint文件, nodemon不运行,反之亦然。 // Gruntfile.js // our wrapper function (required by grunt and its plugins) // all configuration goes inside this function module.exports = function(grunt) { // =========================================================================== // CONFIGURE GRUNT =========================================================== // =========================================================================== grunt.initConfig({ // get the configuration info from package.json —————————- // this way we can use things like name and […]

如何在NTVS中使用nodemon(适用于Visual Studio的节点工具)

我正在使用Visual Studio Professional 13上的Node,很快就意识到,为代码中的每一次更改重新启动我的服务器变得麻烦了。 所以我做了一些研究,发现大多数人使用nodemon来自动刷新服务器。 虽然在线教程使用命令行来安装和运行他们的服务器与nodemon时,我用VS的界面来生成我的快递项目和下载nodemon。 我的问题是,当我运行我的服务器时,服务器不会重新启动时,我更新我的代码。 我的问题是如何通过nodemon运行我的服务器,如果我使用VS编码我的项目 这个链接也显示与我相同问题的人,但是其中的解决scheme并不清楚https://nodejstools.codeplex.com/workitem/545

nodemon找不到模块'/path/to/project/home/index.js'

我在Linux机器上使用nodmeon version 1.9.1 。 我正在运行nodemon: nodemon –watch ./build其中我有我的index.js内容在生成文件夹。 但是当我运行nodemon的时候,它一直在项目的home文件夹中查找index.js文件,因此在那里找不到它。 我试图检查nodemon – 帮助更好的选项,但我没有看到任何,也写在package.json文件中的脚本对象,它仍然会引发同样的错误。 我也试图运行它作为nodemon –watch ./build/index.js仍然抛出错误。 另外index.js文件只包含一个console.log('hello world'); 只是为了确保它是nodemon本身。

Heroku无法启动我的节点应用程序,因为它试图用nodemon来完成它

我正在部署我的节点应用程序到Heroku,它试图用nodemon而不是我定义的node app.js调用它。 我的Procfile如下所示: web: npm start 而当我推到heroku测功机崩溃与此错误: 2014-03-24T19:24:59.669412+00:00 app[web.1]: > my-app@0.0.1 start /app 2014-03-24T19:24:59.669412+00:00 app[web.1]: > nodemon app.js 2014-03-24T19:24:59.669412+00:00 app[web.1]: 2014-03-24T19:24:59.669412+00:00 app[web.1]: 2014-03-24T19:24:59.710228+00:00 app[web.1]: 2014-03-24T19:24:59.701246+00:00 app[web.1]: sh: nodemon: not found 我甚至尝试npm安装nodemon作为package.json依赖项,并检查node_modules / nodemon,但没有运气。 (nodemon需要安装npm install nodemon -g才能正常工作) 有任何想法吗? 我的package.json: { "name": "my-app", "version": "0.0.1", "private": true, "main": "app.js", "scripts": { "start": "node app.js" }, "dependencies": […]

Node.js – nodemon vs node – 开发与生产

我想使用$>npm start ,并使用“nodemon”进行开发,使用“node”进行生产。 我不能把条件逻辑放在我的package.json文件中,那么最好如何实现呢?