-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore(deps): move maplibre as dev dep and peer dep #41 * chore(vite): add build format in filename #41 * chore(types): use alias for maplibre.Map import #41 * chore(demo): move html to demo folder #41 * chore(lib): simply library architecture #41 * chore(build): set basic build with sourcemaps #41 * chore(types): add types to the build result #41 * chore(assets): move images to proper folders #41 * chore(ignore): add tarball to ignore #41 * fix: use maplibre default import #41 * chore: add vite base url #41 * chore(build): build demo as a separate process #41
- Loading branch information
Showing
13 changed files
with
883 additions
and
409 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
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
node_modules | ||
dist | ||
demo | ||
coverage/ | ||
*.tgz | ||
|
||
# Yarn v2 | ||
.pnp.* | ||
|
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 |
---|---|---|
|
@@ -46,5 +46,6 @@ | |
"scss", | ||
"pcss", | ||
"postcss" | ||
] | ||
], | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
} |
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
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
File renamed without changes
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
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 |
---|---|---|
@@ -1,27 +1,14 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2020", | ||
"lib": ["ES2020", "DOM", "DOM.Iterable"], | ||
"moduleDetection": "force", | ||
"useDefineForClassFields": true, | ||
"target": "ESNext", | ||
"module": "ESNext", | ||
|
||
/* Bundler mode */ | ||
"moduleResolution": "bundler", | ||
"allowImportingTsExtensions": true, | ||
|
||
/* Linting */ | ||
"moduleResolution": "Node", | ||
"strict": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"declaration": true, | ||
"declarationMap": true, | ||
"emitDeclarationOnly": true, | ||
"outDir": "dist", | ||
"outDir": "./dist", | ||
"sourceMap": true, | ||
"isolatedModules": true, | ||
"skipLibCheck": true | ||
"esModuleInterop": true | ||
}, | ||
"include": ["src"] | ||
"include": ["src"], | ||
"exclude": ["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 |
---|---|---|
@@ -1,24 +1,44 @@ | ||
import { defineConfig } from 'vite' | ||
import dts from 'vite-plugin-dts' | ||
|
||
export default defineConfig(({ command, mode }) => { | ||
return { | ||
base: command === 'build' ? '/maplibre-gl-teritorio-cluster/' : '/', | ||
build: mode === 'production' | ||
? { | ||
lib: { | ||
entry: 'src/index.ts', | ||
name: 'MaplibreGlTeritorioCluster', | ||
fileName: 'maplibre-gl-teritorio-cluster', | ||
}, | ||
rollupOptions: { | ||
external: ['maplibre-gl'], // Exclude maplibre-gl from the bundle | ||
output: { | ||
globals: { | ||
'maplibre-gl': 'maplibregl', // Define the global variable for maplibre-gl in the browser | ||
}, | ||
// Demo build config | ||
if (command === 'build' && mode === 'demo') { | ||
return { | ||
base: '/maplibre-gl-teritorio-cluster/', | ||
build: { | ||
outDir: './demo', | ||
}, | ||
} | ||
} | ||
|
||
// Library build config | ||
if (command === 'build') { | ||
return { | ||
build: { | ||
lib: { | ||
entry: './src/index.ts', | ||
name: 'MaplibreGlTeritorioCluster', | ||
fileName: 'maplibre-gl-teritorio-cluster', | ||
}, | ||
sourcemap: true, | ||
rollupOptions: { | ||
external: ['maplibre-gl'], // Exclude maplibre-gl from the bundle | ||
output: { | ||
globals: { | ||
'maplibre-gl': 'maplibregl', // Define the global variable for maplibre-gl in the browser | ||
}, | ||
}, | ||
} | ||
: undefined, | ||
}, | ||
}, | ||
plugins: [ | ||
dts({ | ||
rollupTypes: true, | ||
}), | ||
], | ||
} | ||
} | ||
|
||
// Local Development config | ||
return {} | ||
}) |
Oops, something went wrong.