Skip to content

Commit

Permalink
feat: build library and demo site with vite, remove rollup config
Browse files Browse the repository at this point in the history
  • Loading branch information
Leecason committed Jul 8, 2022
1 parent c1b4e7c commit f6bf8f2
Show file tree
Hide file tree
Showing 7 changed files with 703 additions and 2,471 deletions.
13 changes: 1 addition & 12 deletions babel.config.js
@@ -1,14 +1,3 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset',
],
plugins: [
[
'component',
{
libraryName: 'element-ui',
styleLibraryName: 'theme-chalk'
}
]
],
presets: ['@vue/cli-plugin-babel/preset'],
};
58 changes: 22 additions & 36 deletions package.json
Expand Up @@ -6,21 +6,18 @@
"scripts": {
"dev": "vite",
"demo:preview": "vite preview",
"build:demo": "vite build",
"build:lib": "rollup -c --environment BUILD:production",
"build:demo": "VITE_BUILD_TARGET=demo vite build",
"build:lib": "vite build",
"lint": "eslint --ext .ts src",
"lint:fix": "yarn lint --fix",
"semantic-release": "semantic-release"
},
"main": "lib/element-tiptap.common.js",
"module": "lib/element-tiptap.esm.js",
"unpkg": "lib/element-tiptap.min.js",
"jsdelivr": "lib/element-tiptap.min.js",
"main": "./lib/element-tiptap.umd.js",
"module": "./lib/element-tiptap.es.js",
"files": [
"lib/*",
"src/*"
"lib/*"
],
"types": "lib/index.d.ts",
"types": "./lib/index.d.ts",
"dependencies": {
"@juggle/resize-observer": "^3.1.2",
"@tiptap/core": "^2.0.0-beta.171",
Expand Down Expand Up @@ -57,61 +54,49 @@
"@tiptap/extension-text-style": "^2.0.0-beta.23",
"@tiptap/extension-underline": "^2.0.0-beta.22",
"@tiptap/vue-3": "^2.0.0-beta.90",
"codemirror": "^5.54.0",
"core-js": "^3.4.3"
},
"devDependencies": {
"@babel/core": "^7.7.5",
"@babel/preset-env": "^7.7.6",
"@rollup/plugin-alias": "^3.0.1",
"@semantic-release/changelog": "^5.0.0",
"@semantic-release/commit-analyzer": "^8.0.1",
"@semantic-release/git": "^9.0.0",
"@typescript-eslint/eslint-plugin": "^2.18.0",
"@typescript-eslint/parser": "^2.18.0",
"@vitejs/plugin-vue": "^2.1.0",
"@vue/cli-plugin-babel": "~4.4.1",
"@vue/compiler-sfc": "^3.2.37",
"@vue/eslint-config-standard": "^5.1.0",
"@vue/eslint-config-typescript": "^5.0.1",
"autoprefixer": "^10.4.7",
"babel-eslint": "^10.0.3",
"babel-loader": "^8.0.6",
"babel-plugin-component": "^1.1.1",
"element-plus": "^2.2.0",
"codemirror": "^5.54.0",
"element-plus": "^2.2.8",
"eslint": "^6.7.2",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^6.1.2",
"lint-staged": "^10.0.8",
"node-sass": "^4.12.0",
"postcss-nested": "^5.0.6",
"postcss-preset-env": "^6.7.0",
"rollup": "^2.15.0",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-dts": "^1.4.7",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-postcss": "^2.0.3",
"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-terser": "^5.1.3",
"rollup-plugin-typescript2": "^0.27.1",
"rollup-plugin-vue": "^5.1.4",
"sass-loader": "^8.0.0",
"rollup-plugin-copy": "^3.4.0",
"sass": "^1.53.0",
"semantic-release": "^17.0.4",
"typescript": "^4.5.5",
"unplugin-auto-import": "^0.5.11",
"unplugin-element-plus": "^0.4.0",
"unplugin-vue-components": "^0.17.11",
"unplugin-element-plus": "^0.4.1",
"vite": "^2.7.10",
"vite-plugin-style-import": "^1.4.0",
"vite-plugin-dts": "^1.2.1",
"vite-plugin-vue2": "^1.9.2",
"vite-svg-loader": "^3.1.2",
"vue": "^3.2.29",
"vue-router": "^4.0.12",
"yorkie": "^2.0.0"
},
"peerDependencies": {
"element-ui": "^2.0.0",
"element-plus": ">= 2.0.0",
"vue": ">= 3.0.0"
},
"resolutions": {},
Expand All @@ -124,13 +109,14 @@
"homepage": "https://github.com/Leecason/element-tiptapr#readme",
"keywords": [
"editor",
"element",
"element-ui",
"wysiwyg",
"vue3",
"vue",
"tiptap",
"prosemirror",
"vue.js",
"vue",
"wysiwyg"
"element",
"element-ui",
"element-plus"
],
"license": "MIT",
"lint-staged": {
Expand Down
3 changes: 3 additions & 0 deletions postcss.config.js
@@ -0,0 +1,3 @@
module.exports = {
plugins: [require('autoprefixer'), require('postcss-nested')],
};
139 changes: 0 additions & 139 deletions rollup.config.js

This file was deleted.

5 changes: 3 additions & 2 deletions tsconfig.json
Expand Up @@ -13,11 +13,12 @@
"sourceMap": true,
"baseUrl": "./src",
"typeRoots": ["./types", "./node_modules/@types"],
"types": ["webpack-env", "element-plus/global"],
"types": ["element-plus/global"],
"paths": {
"@/*": ["./*"]
},
"lib": ["esnext", "dom", "dom.iterable", "scripthost"]
"lib": ["esnext", "dom", "dom.iterable", "scripthost"],
"isolatedModules": true
},
"include": [
"types/**/*",
Expand Down

0 comments on commit f6bf8f2

Please sign in to comment.