Skip to content

Commit

Permalink
packaging fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
deepak-shah-np committed Nov 26, 2024
1 parent b23c49e commit f9be63d
Show file tree
Hide file tree
Showing 7 changed files with 10,081 additions and 11,112 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ coverage
Network Trash Folder
Temporary Items
.apdisk
spatial-ui-element-*.tgz
21,158 changes: 10,062 additions & 11,096 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
},
"dependencies": {
"@geoman-io/leaflet-geoman-free": "^2.17.0",
"@nuxt/kit": "^3.12.4",
"@nuxtjs/leaflet": "^1.2.3",
"highcharts-vue": "^2.0.1"
"highcharts-vue": "^2.0.1",
"vuetify-nuxt-module": "^0.18.3",
"@geoman-io/leaflet-geoman-free": "^2.17.0"


},
"devDependencies": {
"@nuxt/devtools": "^1.3.9",
Expand All @@ -48,7 +51,6 @@
"@types/node": "^20.14.11",
"@types/serve-static": "^1.15.7",
"changelogen": "^0.5.5",
"eslint": "^9.8.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"nuxt": "^3.12.4",
Expand All @@ -57,7 +59,6 @@
"sass-loader": "^16.0.1",
"typescript": "latest",
"vitest": "^2.0.3",
"vue-tsc": "^2.0.26",
"vuetify-nuxt-module": "^0.18.3"
"vue-tsc": "^2.0.26"
}
}
4 changes: 4 additions & 0 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
createResolver,
addComponentsDir,
} from '@nuxt/kit'
import * as L from 'leaflet';

export interface ModuleOptions {}

Expand All @@ -25,6 +26,9 @@ export default defineNuxtModule<ModuleOptions>({
_nuxt.options.css.push(
resolver.resolve('./runtime/assets/scss/splitmap' + styleExtension)
)
_nuxt.hook('modules:before', () => {
_nuxt.options.modules.push('@nuxtjs/leaflet');
});

addPlugin(resolver.resolve('./runtime/plugins/splitmap'))
addPlugin(resolver.resolve('./runtime/plugins/highcharts.client'))
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/plugins/highcharts.client.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { defineNuxtPlugin } from '#app'
import HighchartsVue from 'highcharts-vue'
import * as HighchartsVue from 'highcharts-vue'

export default defineNuxtPlugin({
name: 'highcharts-vue',
parallel: true,
setup(nuxtApp) {
nuxtApp.vueApp.use(HighchartsVue)
nuxtApp.vueApp.use(HighchartsVue.default)
},
})
9 changes: 6 additions & 3 deletions src/runtime/plugins/splitmap.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import L from 'leaflet'

import 'leaflet'
import { defineNuxtPlugin } from '#app'
// Your provided SplitMap control code here...
let mapWasDragEnabled
let mapWasTapEnabled
Expand Down Expand Up @@ -226,6 +226,9 @@ L.control.splitMap = function (leftLayers, rightLayers, options) {
}

export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.provide('SplitMap', L.control.splitMap)
if (process.client) {
nuxtApp.provide('SplitMap', L.control.splitMap)

}
// nuxtApp.provide('SplitMap', ()=>{console.log("hello world",L.control.splitMap ,L.Control.SplitMap )})
})
6 changes: 0 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,5 @@
"jsx": "preserve",
"baseUrl": ".",
"moduleResolution": "Node",
"paths": {
"~/*": ["./*"],
"@/*": ["./*"],
"~~/*": ["./*"],
"@@/*": ["./*"]
}
}
}

0 comments on commit f9be63d

Please sign in to comment.