1.0.8 • Published 4 years ago

hello-xtt-npm v1.0.8

Weekly downloads
6
License
MIT
Repository
-
Last release
4 years ago

default

package.json

  // 配置main结点,如果不配置,我们在其他项目中就不用import XX from '包名'来引用了,只能以包名作为起点来指定相对的路径
  "main": "dist/helloWorld.js",
  // 因为组件包是公用的,所以private为false
  "private": false,
  
  //npm 发布配置地址
  "publishConfig" : {
  	  "registry" : "http://maven.xiaotitong.com/nexus/repository/fe-npm/"
  },

npm set registry http://maven.xiaotitong.com/nexus/repository/npm-group/

安装依赖包npm install

发布项目到私有仓库 npm publish

#使用组件 1引入依赖

 "dependencies": {
    "core-js": "^2.6.5",
    "vue": "^2.6.10",
    "xtt-hello-world": "1.0.2" //引入
  },

2页面上使用

<template>
  <div id="app">
   <!-- <img alt="Vue logo" src="./assets/logo.png">-->
    <HelloWorld msg="Welcome to Demo"/>  //3使用组件

  </div>
</template>

<script>
import HelloWorld from 'xtt-hello-world' //1导入

export default {
  name: 'app',
  components: {
	HelloWorld // 2 使用
  }
}
</script>
1.0.10-0

4 years ago

1.0.8

4 years ago

1.0.7-0

4 years ago

1.0.8-1

4 years ago

1.0.7-2

4 years ago

1.0.8-0

4 years ago

1.0.7-1

4 years ago

1.0.8-2

4 years ago

1.0.7-3

4 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago