Skip to content

luoboding/vue-component

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-components-rollup

| vuejs 2.0 组件开发模版,使用rollup打包

创建目录结构

初始化项目

yarn init
or
npm init

配置包管理

配置代码样式

安装eslint-config-airbnb-base

yarn add --dev eslint-config-airbnb-base eslint eslint-plugin-import

安装eslint-plugin-html检查vue文件

yarn add --dev eslint-plugin-html

配置eslint

touch .eslintrc.js
module.exports = {
  root: true,
  extends: [
    'airbnb-base',
  ],
  plugins: [
    'html',
  ],
    // add your custom rules here
  rules: {
    // don't require .vue extension when importing
    'import/extensions': ['error', 'always', {
      js: 'never',
      vue: 'never',
    }],
    // allow debugger during development
    'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
  },
};

添加run command

{
  "scripts": {
    "lint": "eslint --ext .js,.vue components config test"
  }
}

配置单元测试

About

vuejs 2.0 components and rollup bundle template

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 95.4%
  • Vue 4.6%