├── .gitignore
├── dist
├── components
│ └── testBricks
│ │ ├── index.d.ts
│ │ └── index.vue.d.ts
├── index.d.ts
├── test-bricks-teach.esm.js
└── test-bricks-teach.umd.js
├── .idea
├── .gitignore
├── vcs.xml
├── modules.xml
└── test-bricks-teach.iml
├── src
├── shims-vue.d.ts
├── main.css
├── components
│ └── testBricks
│ │ ├── index.ts
│ │ └── index.vue
├── .gitignore
└── index.ts
├── README.md
└── package.json
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/dist/components/testBricks/index.d.ts:
--------------------------------------------------------------------------------
1 | import IndexFeature from './index.vue';
2 | export default IndexFeature;
3 |
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Editor-based HTTP Client requests
5 | /httpRequests/
6 |
--------------------------------------------------------------------------------
/src/shims-vue.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.vue' {
2 | import type { DefineComponent } from 'vue'
3 | const component: DefineComponent<{}, {}, any>
4 | export default component
5 | }
6 |
--------------------------------------------------------------------------------
/src/main.css:
--------------------------------------------------------------------------------
1 | @import "tailwindcss/base";
2 |
3 | @import "tailwindcss/components";
4 |
5 | @import "tailwindcss/utilities";
6 |
7 | .btn {
8 | @apply bg-blue-500 text-white;
9 | }
10 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/components/testBricks/index.ts:
--------------------------------------------------------------------------------
1 | import { App } from 'vue'
2 | import IndexFeature from './index.vue'
3 | IndexFeature.install = (app: App) => {
4 | app.component(IndexFeature.name, IndexFeature)
5 | }
6 |
7 | export default IndexFeature
8 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/dist/index.d.ts:
--------------------------------------------------------------------------------
1 | import { App } from 'vue';
2 | import './main.css';
3 | import TestBricks from './components/testBricks';
4 | declare const install: (app: App) => void;
5 | export { TestBricks, install };
6 | declare const _default: {
7 | install: (app: App) => void;
8 | };
9 | export default _default;
10 |
--------------------------------------------------------------------------------
/src/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 |
6 | # local env files
7 | .env.local
8 | .env.*.local
9 |
10 | # Log files
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 | pnpm-debug.log*
15 |
16 | # Editor directories and files
17 | .idea
18 | .vscode
19 | *.suo
20 | *.ntvs*
21 | *.njsproj
22 | *.sln
23 | *.sw?
24 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # vue3-rollup-tailwindcss
2 |
3 |
4 |
5 | # 前言:
6 |
7 | 随着前端业务的不断扩大,也造了一些的***轮子***或者面向业务***二次封装的代码***用在各个项目当中,为了提升团队开发效率,稳定开发质量,一个服务于***业务组件库***必不可少~
8 |
9 |
10 | 
11 |
12 |
13 | 组件库链接:http://8.210.196.94:8082
14 | ps:服务器略渣,耐心等待
15 |
16 |
17 | 详情请看掘金地址:
18 | https://juejin.cn/editor/drafts/6959056604943613965
19 |
--------------------------------------------------------------------------------
/src/index.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | import {App} from 'vue'
3 |
4 | import './main.css' // 引入样式
5 | import TestBricks from './components/testBricks'
6 |
7 | const components = [
8 | TestBricks
9 | ]
10 |
11 | // 全局导入
12 | const install = (app: App) => {
13 | components.forEach(component => {
14 | app.component(component.name, component)
15 | })
16 | }
17 |
18 | // 局部导入
19 | export {
20 | TestBricks,
21 | install
22 | }
23 | export default {
24 | install
25 | }
26 |
--------------------------------------------------------------------------------
/.idea/test-bricks-teach.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/components/testBricks/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
22 |
23 |
26 |
--------------------------------------------------------------------------------
/dist/components/testBricks/index.vue.d.ts:
--------------------------------------------------------------------------------
1 | declare const _default: import("vue").DefineComponent>>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
2 | [x: number]: unknown;
3 | } & {
4 | length?: unknown;
5 | toString?: unknown;
6 | toLocaleString?: unknown;
7 | concat?: unknown;
8 | join?: unknown;
9 | slice?: unknown;
10 | indexOf?: unknown;
11 | lastIndexOf?: unknown;
12 | every?: unknown;
13 | some?: unknown;
14 | forEach?: unknown;
15 | map?: unknown;
16 | filter?: unknown;
17 | reduce?: unknown;
18 | reduceRight?: unknown;
19 | find?: unknown;
20 | findIndex?: unknown;
21 | entries?: unknown;
22 | keys?: unknown;
23 | values?: unknown;
24 | includes?: unknown;
25 | }> | Readonly<{} & {
26 | [x: string]: unknown;
27 | }>, {
28 | [x: number]: unknown;
29 | } | {}>;
30 | export default _default;
31 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "test-bricks-teach",
3 | "version": "1.0.5",
4 | "description": "",
5 | "author": "peiyahui",
6 | "types": "dist/index.d.ts",
7 | "license": "ISC",
8 | "main": "dist/test-bricks-teach.umd.js",
9 | "module": "dist/test-bricks-teach.esm.js",
10 | "scripts": {
11 | "build": "npm run clean && npm run build:esm && npm run build:umd",
12 | "dev": "npm run clean && npm run dev:umd",
13 | "build:esm": "rollup --config build/rollup.esm.config.js",
14 | "build:umd": "rollup --config build/rollup.umd.config.js",
15 | "clean": "rimraf ./dist"
16 | },
17 | "devDependencies": {
18 | "rollup": "^2.38.5",
19 | "rollup-plugin-vue": "6.0.0-beta.6",
20 | "rollup-plugin-typescript2": "^0.29.0",
21 | "@rollup/plugin-node-resolve": "^11.1.1",
22 | "@types/lodash-es": "^4.17.4",
23 | "@vue/compiler-sfc": "^3.0.0",
24 | "postcss-import": "^14.0.0",
25 | "rimraf": "^3.0.2"
26 | },
27 | "dependencies": {
28 | "rollup-plugin-postcss": "^4.0.0",
29 | "rollup-plugin-commonjs": "^10.1.0",
30 | "tailwindcss": "^1.9.0",
31 | "postcss": "^8.2.8",
32 | "lodash-es": "^4.17.20",
33 | "typescript": "~3.9.3",
34 | "vue": "^3.0.0"
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/dist/test-bricks-teach.esm.js:
--------------------------------------------------------------------------------
1 | import { defineComponent, pushScopeId, popScopeId, openBlock, createBlock, withScopeId, createStaticVNode } from 'vue';
2 |
3 | //
4 | // array that contains style props
5 | var script = defineComponent({
6 | name: 'testBricks',
7 | props: {},
8 | });
9 |
10 | const _withId = /*#__PURE__*/withScopeId("data-v-cb6de1d2");
11 |
12 | pushScopeId("data-v-cb6de1d2");
13 | const _hoisted_1 = { class: "text-gray-600 body-font" };
14 | const _hoisted_2 = /*#__PURE__*/createStaticVNode("", 1);
15 | popScopeId();
16 |
17 | const render = /*#__PURE__*/_withId((_ctx, _cache) => {
18 | return (openBlock(), createBlock("section", _hoisted_1, [
19 | _hoisted_2
20 | ]))
21 | });
22 |
23 | script.render = render;
24 | script.__scopeId = "data-v-cb6de1d2";
25 | script.__file = "src/components/testBricks/index.vue";
26 |
27 | script.install = function (app) {
28 | app.component(script.name, script);
29 | };
30 |
31 | var components = [
32 | script
33 | ];
34 | // 全局导入
35 | var install = function (app) {
36 | components.forEach(function (component) {
37 | app.component(component.name, component);
38 | });
39 | };
40 | var index = {
41 | install: install
42 | };
43 |
44 | export default index;
45 | export { script as TestBricks, install };
46 |
--------------------------------------------------------------------------------
/dist/test-bricks-teach.umd.js:
--------------------------------------------------------------------------------
1 | (function (global, factory) {
2 | typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
3 | typeof define === 'function' && define.amd ? define(['exports', 'vue'], factory) :
4 | (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['well-bricks'] = {}, global.Vue));
5 | }(this, (function (exports, vue) { 'use strict';
6 |
7 | //
8 | // array that contains style props
9 | var script = vue.defineComponent({
10 | name: 'testBricks',
11 | props: {},
12 | });
13 |
14 | const _withId = /*#__PURE__*/vue.withScopeId("data-v-cb6de1d2");
15 |
16 | vue.pushScopeId("data-v-cb6de1d2");
17 | const _hoisted_1 = { class: "text-gray-600 body-font" };
18 | const _hoisted_2 = /*#__PURE__*/vue.createStaticVNode("", 1);
19 | vue.popScopeId();
20 |
21 | const render = /*#__PURE__*/_withId((_ctx, _cache) => {
22 | return (vue.openBlock(), vue.createBlock("section", _hoisted_1, [
23 | _hoisted_2
24 | ]))
25 | });
26 |
27 | script.render = render;
28 | script.__scopeId = "data-v-cb6de1d2";
29 | script.__file = "src/components/testBricks/index.vue";
30 |
31 | script.install = function (app) {
32 | app.component(script.name, script);
33 | };
34 |
35 | var components = [
36 | script
37 | ];
38 | // 全局导入
39 | var install = function (app) {
40 | components.forEach(function (component) {
41 | app.component(component.name, component);
42 | });
43 | };
44 | var index = {
45 | install: install
46 | };
47 |
48 | exports.TestBricks = script;
49 | exports.default = index;
50 | exports.install = install;
51 |
52 | Object.defineProperty(exports, '__esModule', { value: true });
53 |
54 | })));
55 |
--------------------------------------------------------------------------------