Skip to content

Commit 6047317

Browse files
committed
Make the vue component the default export of the package
1 parent 8ac0cfc commit 6047317

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Planned:
2929

3030
## Installation
3131

32-
Install the plugin with your favorite package manager:
32+
Install the component with your favorite package manager:
3333
```shell
3434
yarn add @grapoza/vue-tree
3535
```
@@ -38,6 +38,8 @@ or
3838
npm install --save @grapoza/vue-tree
3939
```
4040

41+
The default import from this package is the components from the .vue files. In addition to this, pre-compiled versions of the TreeView component and CSS are also available in the package but you will need to reference them manually from your own project.
42+
4143
## Usage
4244

4345
If you're using it in a .vue file:

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ build_script:
1818

1919
after_build:
2020
# Copy anything that goes into the final package into '/package'
21-
- sh: mkdir -p package && cp dist/*.js dist/*.css package.json LICENSE README.md package
21+
- sh: mkdir -p package && cp dist/*.js dist/*.css index.js src/components/*.vue package.json LICENSE README.md package
2222
# Zip up the package files, along with the .map files for debugging
2323
- sh: 7z a -tzip artifacts.zip ./package/* ./dist/*.map
2424

index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Let this serve as an entry point for the node package.
2+
// This way users of the package can make sure it is
3+
// transpiled to match their requirements, and don't need
4+
// to separately include js and css files.
5+
import TreeView from './TreeView.vue';
6+
export default TreeView;

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"description": "Yet another Vue treeview component.",
44
"author": "Gregg Rapoza <grapoza@gmail.com>",
55
"license": "MIT",
6-
"version": "0.3.2",
7-
"browser": "vue-tree.umd.min.js",
6+
"version": "0.3.3",
7+
"browser": "index.js",
88
"repository": {
99
"url": "https://github.com/grapoza/vue-tree",
1010
"type": "git"

0 commit comments

Comments
 (0)