Skip to content

Commit

Permalink
chore: update build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Renovamen committed Apr 25, 2022
1 parent 639230a commit 931fa21
Show file tree
Hide file tree
Showing 7 changed files with 472 additions and 483 deletions.
11 changes: 3 additions & 8 deletions docs/src/components/IconInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,9 @@ const message = ref("null");
const copyToClipboard = () => {
const isSuccess = copyText(moduleName.value);
if (isSuccess) {
// const msg = proxy?.$children[0] as any;
// msg.startTimer(moduleName.value);
console.log(message.value);
message.value.startTimer(moduleName.value);
} else {
alert("Oops, unable to copy");
}
if (isSuccess) message.value.startTimer(moduleName.value);
else alert("Oops, unable to copy");
};
const onCloseClick = () => {
Expand Down
3 changes: 1 addition & 2 deletions docs/src/components/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<ul
v-if="items"
class="mt-2 lg:mt-20 pb-2 border-gray-200 border-b border-solid lg:border-none"
class="mt-2 lg:mt-20 pb-2 border-gray-200 dark:border-gray-700 border-b border-solid lg:border-none"
>
<li
v-for="item in items"
Expand All @@ -51,7 +51,6 @@
<script setup lang="ts">
import { useSiteStore } from "~/stores/site";
import { localePath } from "~/composables";
import { onMounted } from "@vue/runtime-core";
defineProps(["itemSelected", "items"]);
defineEmits(["changeTab"]);
Expand Down
8 changes: 6 additions & 2 deletions docs/src/pages/[...locale].vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@
<v-icon
name="ri-search-2-line"
scale="1.3"
class="search-icon text-gray-500 transition duration-200"
:class="[state.isSearchFocused && 'text-blue-600']"
class="transition duration-200"
:class="[
state.isSearchFocused
? 'text-blue-600 dark:text-blue-400'
: 'text-gray-500 dark:text-gray-400'
]"
/>
</div>
<input
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"name": "oh-vue-icons",
"private": true,
"workspaces": [
"package",
Expand Down
11 changes: 4 additions & 7 deletions package/build/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import typescript from "@rollup/plugin-typescript";
import { terser } from "rollup-plugin-terser";
import analyze from "rollup-plugin-analyzer";
import postcss from "rollup-plugin-postcss";
import dts from "rollup-plugin-dts";
import esbuild from "rollup-plugin-esbuild";

const EMPTY_FILE_ID = "__rollup_empty__";

Expand All @@ -22,9 +21,8 @@ const ingoreCSS = {
const base = {
input: "src/index.ts",
plugins: [
typescript(),
esbuild(),
postcss(),
terser(),
analyze({ summaryOnly: true, hideDeps: true })
],
external: ["vue-demi"]
Expand All @@ -33,16 +31,15 @@ const base = {
const config = [
Object.assign({}, base, {
output: {
file: "dist/index.esm.min.js",
file: "dist/index.mjs",
format: "es",
sourcemap: true
}
}),
Object.assign({}, base, {
output: {
file: "dist/index.cjs.min.js",
file: "dist/index.cjs",
format: "cjs",
exports: "named",
sourcemap: true
}
}),
Expand Down
7 changes: 3 additions & 4 deletions package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
},
"license": "MIT",
"author": "Renovamen <[email protected]>",
"main": "dist/index.cjs.min.js",
"module": "dist/index.esm.min.js",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist",
Expand All @@ -44,14 +44,13 @@
"vue-demi": "^0.12.5"
},
"devDependencies": {
"@rollup/plugin-typescript": "^8.3.2",
"@vitejs/plugin-vue": "^2.3.1",
"postcss": "^8.4.12",
"rollup": "^2.70.2",
"rollup-plugin-analyzer": "^4.0.0",
"rollup-plugin-dts": "^4.2.1",
"rollup-plugin-esbuild": "^4.9.1",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-terser": "^7.0.2",
"typescript": "^4.6.3",
"vite": "^2.9.5",
"vue": "^3.2.33",
Expand Down
Loading

0 comments on commit 931fa21

Please sign in to comment.