-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILDING.txt
79 lines (49 loc) · 2.28 KB
/
BUILDING.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
The information in this file comes from here: https://www.npmjs.com/package/vue-sfc-rollup
Which is referenced at the bottom of is page: https://vuejs.org/v2/cookbook/packaging-sfc-for-npm.html
Install the vue-sfc-rollup CLI plugin.
NOTE: This only needs to be done once per dev machine.
sudo npm install -g vue-sfc-rollup
================================================================
This section discusses configuring the build process.
NOTE: This only needs to be done once per single-file component.
================================================================
Initialize the project.
The project name is vue-bootstrap-ajax-combobox.
The kebab-case component name is ajax-combobox.
Take the default for the location to save the files (../ajax-combobox).
sfc-init
Edit package.json, updating the version and description values.
Move the files and directories into place.
mv ../ajax-combobox/* .
rmdir ../ajax-combobox
Add the following dependencies to package.json, under the "dependencies" section:
"vue": ">=2.5.16",
"axios": ">=0.18.0",
"font-awesome": ">=4.7.0",
"bootstrap": ">=4.3.1"
Add the following to build/rollup.config.js, in the "const external" array:
"axios"
Add the following to build/rollup.config.js, in the "const globals" array:
"axios": "axios"
Install the dependencies.
yarn install
======================================================================
This section discusses building, serving, tagging, committing, pushing
and publishing the component.
======================================================================
Serve the component. Note: this will serve a broken component because the
CSS and fonts aren't loaded, no props are set by the wrapper, and there is
no server-side API being served.
vue serve --open ./src/ajax-combobox.vue
Confirm that everything is working.
Update the version number in package.json.
Build the component.
npm run build
Buid, tag, commit, push and publish a new version of the component.
After updating the version in package.json and building, do the following steps.
Apply git tag, using the version from package.json; commit and push the code.
git tag <version-from-package.json>
git commit -a
git push
Publish the current version to npmjs.com.
npm publish