diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..6d97d83 --- /dev/null +++ b/.npmignore @@ -0,0 +1,4 @@ +node_modules/storybook +src/ +test/ +storybook-static/ \ No newline at end of file diff --git a/README.md b/README.md index cb894f4..2a3639d 100644 --- a/README.md +++ b/README.md @@ -243,7 +243,6 @@ Here is an example of the SampleComponent.vue file as of 1/26/2024. See github f diff --git a/index.html b/index.html index 52657e8..07e70d8 100644 --- a/index.html +++ b/index.html @@ -7,6 +7,6 @@
- + diff --git a/index.js b/index.js deleted file mode 100644 index 19d6455..0000000 --- a/index.js +++ /dev/null @@ -1,36 +0,0 @@ -import SparcDashboard from './src/components/SparcDashboard.vue'; -import "./tailwind/output.css" - -//import { defineAsyncComponent } from 'vue' -//import mitt from 'mitt' -//import { useGlobalVarsStore } from './src/stores/globalVars' - -export default SparcDashboard; - -export function install(app) { - // Register your component globally - //app.component('SparcDashboard', SparcDashboard); - - // Set up any dependencies here. Example with mitt: - //const emitter = mitt(); - //app.config.globalProperties.$emitter = emitter; - - // const componentMap = [ - // 'SubjectNav', - // 'ImageSelector', - // 'ImageViewer', - // 'LocationNav', - // 'FlatmapViewer', - // 'BiolucidaViewer' - // ] - // componentMap.forEach(comp=>{ - // const asyncComponent = defineAsyncComponent(() => import(`./components/${comp}.vue`)); - // app.component(comp, asyncComponent); - // }) - - //add list of components to add componet drop down - //const globalVars = useGlobalVarsStore(); - //globalVars.componentList = componentMap; - - } - //instruct users to install diff --git a/package.json b/package.json index 6e9c178..0c36cf3 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,31 @@ { "name": "sparc-dashboard-beta", - "version": "0.1.4", + "version": "0.1.95", "author": "Sam Kraft (https://Sparc.Science)", "private": false, - "main": "index.js", + "type": "module", + "main": "dist/index.cjs", + "module": "dist/index.js", + "exports": { + ".": "./dist/index.js", + "./styles.css": "./dist/style.css" + }, + "browser": { + "./styles.css": "./dist/style.css" + }, + "types": "dist/SparcDashboard.d.ts", + "license": "Apache-2.0", + "files": [ + "dist" + ], "scripts": { "dev": "vite & yarn tailwindcss -i ./src/assets/base.css -o ./dist/output.css --watch", - "build": "vite build", + "build": "tsc & vite build", "preview": "vite preview", - "build-only": "vite build", + "build-only": "vite build; yarn tailwindcss -i ./src/assets/base.css -o ./dist/output.css", + "release:beta": "npm publish --tag beta", + "release:minor": "npm version minor; npm publish", + "release:patch": "npm version patch; npm publish", "type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false", "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", "format": "prettier --write src/", @@ -18,16 +35,17 @@ }, "dependencies": { "@abi-software/flatmapvuer": "^0.6.1-vue3.8", - "sparc-design-system-components-2": "0.0.26", "@tsconfig/node21": "^21.0.1", "axios": "^1.6.7", - + "chart.js": "^4.4.2", "gridstack": "^9.5.0", "mitt": "^3.0.1", "pinia": "^2.1.7", "sass": "^1.69.5", + "sparc-design-system-components-2": "0.0.26", "storybook": "^7.5.3", - "vue": "^3.3.4" + "vue": "^3.3.4", + "vue-chartjs": "^5.3.1" }, "devDependencies": { "@rushstack/eslint-patch": "^1.3.3", @@ -48,8 +66,7 @@ "eslint-plugin-vue": "^9.17.0", "npm-run-all2": "^6.1.1", "prettier": "^3.0.3", - "react": "^18.2.0", - "react-dom": "^18.2.0", + "tailwindcss": "^3.3.5", "typescript": "~5.2.0", "vite": "^4.4.11", diff --git a/src/App.vue b/src/App.vue index d0d2118..aa40a53 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,8 +4,8 @@ \ No newline at end of file diff --git a/src/components/Index.ts b/src/components/Index.ts new file mode 100644 index 0000000..d21c4db --- /dev/null +++ b/src/components/Index.ts @@ -0,0 +1 @@ +export { default as SparcDashboard } from "./SparcDashboard.vue"; \ No newline at end of file diff --git a/src/components/ItemWidget.vue b/src/components/ItemWidget.vue index 7e28eff..635922d 100644 --- a/src/components/ItemWidget.vue +++ b/src/components/ItemWidget.vue @@ -70,7 +70,7 @@ \ No newline at end of file diff --git a/src/components/SampleComponent.vue b/src/components/SampleComponent.vue index 7222edb..7bd8484 100644 --- a/src/components/SampleComponent.vue +++ b/src/components/SampleComponent.vue @@ -41,7 +41,7 @@