Skip to content

Commit

Permalink
frameworks - removed react and simplified vue framework section
Browse files Browse the repository at this point in the history
  • Loading branch information
brianvoe committed Aug 2, 2024
1 parent b3493ff commit 45439ef
Show file tree
Hide file tree
Showing 39 changed files with 18 additions and 7,337 deletions.
2 changes: 0 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
node_modules/
src/vue/node_modules/
src/react/node_modules/
.vscode/
.github/

Expand Down
6 changes: 2 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand All @@ -10,7 +10,7 @@
<meta property="og:title" content="Slim Select" />
<meta property="og:description" content="Advanced select dropdown" />
<script type="module" crossorigin src="/assets/index.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index.css">
<link rel="stylesheet" crossorigin href="/assets/index.css" />
</head>
<body>
<noscript>
Expand All @@ -21,8 +21,6 @@
</noscript>
<div id="app"></div>

<!-- Adding React for Framework Preview -->

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-14PMXQVXTC"></script>
<script>
Expand Down
5 changes: 1 addition & 4 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand All @@ -20,9 +20,6 @@
<div id="app"></div>
<script type="module" src="/src/docs/main.ts"></script>

<!-- Adding React for Framework Preview -->
<script type="module" src="/src/react/src/frameworkpage.tsx"></script>

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-14PMXQVXTC"></script>
<script>
Expand Down
15 changes: 1 addition & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
},
"./styles": "./dist/slimselect.css"
},
"workspaces": [
"src/vue"
],
"repository": {
"type": "git",
"url": "git+https://github.com/brianvoe/slim-select.git"
Expand All @@ -43,13 +40,12 @@
"scripts": {
"dev": "vite --port=1111",
"format": "prettier --write --cache --parser typescript \"src/**/*.ts\"",
"build": "npm run build:clean && npm run build:docs && npm run build:library && npm run build:frameworks",
"build": "npm run build:clean && npm run build:docs && npm run build:library",
"build:clean": "rimraf ./dist/*",
"build:docs": "vite build",
"build:library": "npm run build:library:js && npm run build:library:css",
"build:library:js": "cd src/slim-select && rollup --config ./rollup.config.mjs && cd ../../",
"build:library:css": "cd src/slim-select && sass ./slimselect.scss ../../dist/slimselect.css --style=compressed && cd ../../",
"build:frameworks": "npm run build --workspaces",
"test": "jest",
"test:coverage": "jest --coverage"
},
Expand All @@ -63,32 +59,23 @@
"@rollup/plugin-typescript": "^11.1.5",
"@slim-select/vue": "workspace:src/vue",
"@testing-library/jest-dom": "^6.1.6",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.5.2",
"@types/downloadjs": "^1.4.6",
"@types/jest": "^29.5.11",
"@types/react": "^18.2.46",
"@types/react-dom": "^18.2.18",
"@typescript-eslint/eslint-plugin": "^6.17.0",
"@typescript-eslint/parser": "^6.17.0",
"@vitejs/plugin-react": "^4.2.1",
"@vitejs/plugin-vue": "^5.0.2",
"clipboard": "^2.0.11",
"downloadjs": "^1.4.7",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.2",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.7.0",
"jest-canvas-mock": "^2.5.0",
"jest-environment-jsdom": "^29.7.0",
"prettier": "^3.1.1",
"prismjs": "^1.29.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rimraf": "^5.0.5",
"rollup": "^4.9.2",
"rollup-plugin-peer-deps-external": "^2.2.4",
Expand Down
1 change: 0 additions & 1 deletion src/docs/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ export default defineComponent({
closable: 'close',
options: [
{ text: 'vue', value: 'vue' },
{ text: 'react', value: 'react' },
],
},
] as DataArray,
Expand Down
15 changes: 0 additions & 15 deletions src/docs/pages/frameworks/react.vue

This file was deleted.

30 changes: 11 additions & 19 deletions src/docs/pages/frameworks/vue.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
<script lang="ts">
import { defineComponent, ref } from 'vue'
// We need to import from the root of the package
// Because if we use @slim-select/vue then we loose
// hot reloading of the file changes
import SlimSelectJS from '../../../slim-select'
import SlimSelect from '../../../vue/slimselect.vue'
import { defineComponent } from 'vue'
import SlimSelectJS, { Events } from '../../../slim-select'
import Settings from '../../../slim-select/settings'
import { Option, OptionOptional } from '../../../slim-select/store'
import { Events } from '../../../slim-select'
import SlimSelect from '../../../slim-select/vue.vue'
export default defineComponent({
name: 'Vue',
Expand Down Expand Up @@ -86,14 +81,11 @@ export default defineComponent({

<h3>Install</h3>
<p>
The vue component is in a sub package under SlimSelect. All functionality still work in the implementation. I have
also added a v-model bind capability to it as well.
Slim Select doesnt have a package to import(anymore) due to its requirements of maintianing it within the repository.
But we have provided a set of code you can add to your own project to get it working.
</p>
<pre>
<code class="language-bash">
npm install @slim-select/vue
</code>
</pre>
<a href="https://github.com/slim-select/tree/master/src/slim-select/vue.vue">Download Component Here</a>
<br />
<br />

<h3>Simple example</h3>
Expand Down Expand Up @@ -122,7 +114,7 @@ export default defineComponent({
<pre>
<code class="language-javascript">
import { defineComponent } from 'vue'
import SlimSelect from '@slim-select/vue'
import SlimSelect from '../your/path/to/slim-select/vue.vue'

export default defineComponent({
components: {
Expand Down Expand Up @@ -181,7 +173,7 @@ export default defineComponent({
<pre>
<code class="language-javascript">
import { defineComponent } from 'vue'
import SlimSelect from '@slim-select/vue'
import SlimSelect from '../your/path/to/slim-select/vue.vue'

export default defineComponent({
components: {
Expand Down Expand Up @@ -236,7 +228,7 @@ export default defineComponent({
<pre>
<code class="language-javascript">
import { defineComponent } from 'vue'
import SlimSelect from '@slim-select/vue'
import SlimSelect from '../your/path/to/slim-select/vue.vue'

export default defineComponent({
components: {
Expand Down Expand Up @@ -291,7 +283,7 @@ export default defineComponent({
<pre>
<code class="language-javascript">
import { defineComponent } from 'vue'
import SlimSelect from '@slim-select/vue'
import SlimSelect from '../your/path/to/slim-select/vue.vue'

export default defineComponent({
components: {
Expand Down
7 changes: 1 addition & 6 deletions src/docs/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,7 @@ const router = createRouter({
path: '/vue',
name: 'Vue',
component: () => import('./pages/frameworks/vue.vue'),
},
{
path: '/react',
name: 'React',
component: () => import('./pages/frameworks/react.vue'),
},
}
],
})

Expand Down
2 changes: 0 additions & 2 deletions src/react/.eslintignore

This file was deleted.

24 changes: 0 additions & 24 deletions src/react/.eslintrc.cjs

This file was deleted.

24 changes: 0 additions & 24 deletions src/react/.gitignore

This file was deleted.

14 changes: 0 additions & 14 deletions src/react/index.html

This file was deleted.

11 changes: 0 additions & 11 deletions src/react/jestconfig.json

This file was deleted.

32 changes: 0 additions & 32 deletions src/react/package.json

This file was deleted.

Loading

0 comments on commit 45439ef

Please sign in to comment.