简体   繁体   English

Nodemon 在保存时创建一个 dist 文件夹

[英]Nodemon Creating a dist folder on save

I am using nodemon in a straight forward express app, something has recently happened and every-time I save a child file in a folder, a dist folder is created and a child file created with the same name - with the addition of .dev.我在一个简单的 express 应用程序中使用nodemon ,最近发生了一些事情,每次我在文件夹中保存一个子文件时,都会创建一个dist文件夹并创建一个同名的子文件 - 添加.dev. in the filename.在文件名中。

As far as I understand a dist file is created only once I finally compile the app for production - not when in development?据我所知,只有在我最终编译应用程序进行生产时才会创建一个dist文件——而不是在开发过程中?

How can I stop the dist file from getting created each time I save?每次保存时如何阻止创建dist文件?

My package.json我的 package.json

"scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "nodemon index.js"
  },

ie IE

Before Save保存前

- routes
    - tests.route.js

After Save保存后

- routes
   - dist
     - tests.route.dev.js
   - tests.route.js

I was using a plugin called: Sass/Less/Typescript/Jade/Pug Compile Hero Plugin with VScode, it was creating a new dist file on every save.我正在使用一个名为:Sass/Less/Typescript/Jade/Pug 用 VScode 编译英雄插件的插件,它在每次保存时都会创建一个新的dist文件。

I followed this to fix it: Vs code create folder automatically with (dist) name - Basically you want to uninstall the plugin.我按照这个来修复它: Vs 代码自动使用(dist)名称创建文件夹- 基本上你想卸载插件。

For fixing it I follow these steps Given bellow and it is solved:-为了修复它,我按照下面给出的这些步骤解决了:-

  1. Click on Extensions button of VS Code or press Ctrl+Shift+X .单击 VS Code 的扩展按钮或按Ctrl+Shift+X
  2. Search for Hero Extension which shown bellow.搜索如下所示的Hero Extension。 在此处输入图片说明
  3. Click on Disable .单击禁用
  4. Click on Reloade .单击重新加载

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM