Nodemon: --eine einzelne Datei ansehen

Erstellt am 20. Feb. 2014  ·  4Kommentare  ·  Quelle: remy/nodemon

Ich möchte alle Dateien in einem bestimmten Verzeichnis und eine einzelne Datei in einem anderen anzeigen. Dies wird anscheinend nicht unterstützt.

C:\Stimulant\Source\ampm>nodemon --dump --watch . --watch ../ampm-test/WPF-test/
config.json server.js ../ampm-test/WPF-test/config.json
20 Feb 11:33:38 - [nodemon] v1.0.15
20 Feb 11:33:38 - [nodemon] to restart at any time, enter `rs`
20 Feb 11:33:38 - [nodemon] watching: *.* ../ampm-test/WPF-test/config.json
--------------
{ run: false,
  system:
   { cwd: 'C:\\Stimulant\\Source\\ampm',
     useFind: false,
     useWatch: true,
     useWatchFile: false },
  required: false,
  dirs: [ 'C:\\Stimulant\\Source\\ampm' ],
  timeout: 1000,
  options:
   { scriptPosition: 0,
     dump: true,
     watch:
      [ '.',
        '../ampm-test/WPF-test/config.json',
        re: /\.|\.\./ampm\-test/WPF\-test/config\.json/ ],
     script: 'server.js',
     args: [ '../ampm-test/WPF-test/config.json' ],
     restartable: 'rs',
     ignore:
      [ '.git',
        'node_modules/**/node_modules',
        'view',
        'samples',
        'logs',
        'app',
        'content',
        re: /\.git|node_modules/.*.*/node_modules|view|samples|logs|app|content/
 ],
     verbose: false,
     ext: 'js,json',
     execMap: { py: 'python', rb: 'ruby' },
     stdin: true,
     stdout: true,
     execOptions:
      { script: 'server.js',
        exec: 'node',
        nodeArgs: undefined,
        ext: 'js,json',
        env: {},
        execArgs: [] },
     monitor:
      [ '*.*',
        '../ampm-test/WPF-test/config.json',
        '!C:\\Stimulant\\Source\\ampm\\.git/**/*',
        '!node_modules/**/node_modules',
        '!C:\\Stimulant\\Source\\ampm\\view/**/*',
        '!C:\\Stimulant\\Source\\ampm\\samples/**/*',
        '!logs',
        '!app',
        '!content' ] },
  load: [Function],
  reset: [Function: reset],
  lastStarted: 0,
  loaded: [ 'C:\\Stimulant\\Source\\ampm\\nodemon.json' ],
  command:
   { raw:
      { executable: 'node',
        args: [ 'server.js', '../ampm-test/WPF-test/config.json' ] },
     string: 'node server.js ../ampm-test/WPF-test/config.json' } }
--------------
OS: win32 x64
node: v0.10.26
nodemon: v1.0.15
cwd: C:\Stimulant\Source\ampm
command: node C:\Users\josh.STIMULANT\AppData\Roaming\npm\node_modules\nodemon\b
in\nodemon.js --dump --watch . --watch ../ampm-test/WPF-test/config.json server.
js ../ampm-test/WPF-test/config.json
--------------

Hilfreichster Kommentar

Einfachere Repro...

C:\Stimulant\Source\ampm>nodemon server.js --watch ../ampm-test/WPF-test/config.json ../ampm-test/WPF-test/config.json
1 Mar 12:01:33 - [nodemon] v1.0.15
1 Mar 12:01:33 - [nodemon] to restart at any time, enter `rs`
1 Mar 12:01:33 - [nodemon] watching: ../ampm-test/WPF-test/config.json
1 Mar 12:01:33 - [nodemon] starting `node server.js ../ampm-test/WPF-test/config.json`

Jetzt sage ich ihm, dass er sich nur die eine Datei ansehen soll. Die Ausgabe sieht so aus, als ob sie das Richtige tut, aber nichts passiert, wenn sich die Json-Datei ändert.

Alle 4 Kommentare

Hmm, die Ausgabe der Einstellung monitor sieht richtig aus. Ich muss einen Test mit diesem Layout erstellen, um ihn zu überprüfen und mich selbst zu debuggen.

Einfachere Repro...

C:\Stimulant\Source\ampm>nodemon server.js --watch ../ampm-test/WPF-test/config.json ../ampm-test/WPF-test/config.json
1 Mar 12:01:33 - [nodemon] v1.0.15
1 Mar 12:01:33 - [nodemon] to restart at any time, enter `rs`
1 Mar 12:01:33 - [nodemon] watching: ../ampm-test/WPF-test/config.json
1 Mar 12:01:33 - [nodemon] starting `node server.js ../ampm-test/WPF-test/config.json`

Jetzt sage ich ihm, dass er sich nur die eine Datei ansehen soll. Die Ausgabe sieht so aus, als ob sie das Richtige tut, aber nichts passiert, wenn sich die Json-Datei ändert.

Auch bei einem absoluten Pfad passiert nichts, wenn sich die Datei ändert.

C:\Stimulant\Source\ampm>nodemon server.js --watch C:\Stimulant\Source\ampm-test\WPF-test\config.json ../ampm-test/WPF-test/config.json
1 Mar 12:03:03 - [nodemon] v1.0.15
1 Mar 12:03:03 - [nodemon] to restart at any time, enter `rs`
1 Mar 12:03:03 - [nodemon] watching: C:\Stimulant\Source\ampm-test\WPF-test\config.json
1 Mar 12:03:03 - [nodemon] starting `node server.js ../ampm-test/WPF-test/config.json`

Haben Sie versucht, die Erweiterung anzugeben? Siehe #308.

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen