-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
140 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# GITS Editor Component | ||
|
||
> Based on Vue 3 CKEditor | ||
## Installation | ||
|
||
via npm | ||
|
||
``` | ||
npm i @gits-id/editor | ||
``` | ||
|
||
via yarn | ||
|
||
``` | ||
yarn add @gits-id/editor | ||
``` | ||
|
||
via pnpm | ||
|
||
``` | ||
pnpm i @gits-id/editor | ||
``` | ||
|
||
## Usage | ||
|
||
```vue | ||
<script setup lang="ts"> | ||
import {ref} from 'vue'; | ||
import VEditor from '@gits-id/editor'; | ||
const content = ref(''); | ||
</script> | ||
<v-editor v-model="content"></v-editor> | ||
``` | ||
|
||
## Documentation | ||
|
||
View `VEditor` documentation [here](https://gits-ui.web.app/?path=/story/components-editor--default). | ||
|
||
## Licence | ||
|
||
ISC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
declare module '*.vue' { | ||
import type {DefineComponent} from 'vue'; | ||
const component: DefineComponent<{}, {}, any>; | ||
export default component; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
content: [ | ||
'./src/**/*.{vue,js,ts,jsx,tsx}', | ||
], | ||
presets: [require('@gits-id/tailwind-config/preset')], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"outDir": "dist", | ||
"declaration": true, | ||
"sourceMap": false, | ||
"target": "esnext", | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"allowJs": true, | ||
"strict": true, | ||
"noUnusedLocals": true, | ||
"rootDir": ".", | ||
"skipLibCheck": true, | ||
"types": ["vite/client"], | ||
"emitDeclarationOnly": true, | ||
"allowSyntheticDefaultImports": true | ||
}, | ||
"include": ["vue.d.ts", "*.vue", "src"], | ||
"exclude": ["**/*.stories.ts", "**/*.spec.ts", "**/*.test.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import {defineConfig} from 'vite'; | ||
import vue from '@vitejs/plugin-vue'; | ||
import {resolve} from 'path'; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [ | ||
vue(), | ||
], | ||
esbuild: { | ||
exclude: ['./src/**/**.stories.ts'], | ||
}, | ||
build: { | ||
target: 'esnext', | ||
lib: { | ||
entry: resolve(__dirname, 'src/index.ts'), | ||
name: 'VEditor', | ||
formats: ['es', 'cjs', 'iife', 'umd'], | ||
}, | ||
rollupOptions: { | ||
// make sure to externalize deps that shouldn't be bundled | ||
// into your library | ||
external: ['vue', '@ckeditor/ckeditor5-build-classic', '@ckeditor/ckeditor5-vue', 'vee-validate'], | ||
output: { | ||
// Provide global variables to use in the UMD build | ||
// for externalized deps | ||
globals: { | ||
vue: 'Vue' | ||
} | ||
}, | ||
resolve: { | ||
dedupe: "vue" | ||
}, | ||
plugins: [ | ||
{ | ||
name: 'remove-collection-handlers', | ||
transform(code, id) { | ||
if ( | ||
id.endsWith('reactivity.esm-bundler.js') || | ||
id.endsWith('runtime-core.esm-bundler.js') | ||
) { | ||
return code | ||
.replace(`mutableCollectionHandlers,`, `null,`) | ||
.replace(`readonlyCollectionHandlers,`, `null,`); | ||
} | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.