Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

vue-auto-name

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-auto-name

自动生成vue组件的名称

latest
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

vue-auto-name

自动生成vue组件的名称。也就是把:

export default {
    ...
}

转换为

export default {
    name: '组件名'
    ...
}

组件名来自于文件名

用法

package.json 中添加一个script:

{
    "scripts": {
        "set-names": "node -e \"require('vue-auto-name')('src')\""
    },
    "devDependencies": {   
        "vue-auto-name": "^1.0.2"
    }
}

然后运行:

npm run set-names

Keywords

webpack

FAQs

Package last updated on 11 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts