Skip to content

Commit

Permalink
pushes to testing bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
ajrothwell committed Dec 24, 2024
1 parent 4952f48 commit f7b420c
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 44 deletions.
2 changes: 2 additions & 0 deletions .env.testing
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VITE_PUBLICPATH=/testing/food/
VITE_DEBUG=true
29 changes: 29 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-MC6CR2');
</script>
<!-- End Google Tag Manager -->
<!-- Microsoft Clarity [phila.gov] -->
<script type="text/javascript">
(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "4l8dhsl6kn");
</script>
<!-- End Microsoft Clarity [phila.gov] -->
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Food and meal finder</title>
</head>
<body>
<!-- Google Tag Manager (noscript) -->
<noscript>
<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MC6CR2" height="0" width="0" style="display:none;visibility:hidden"></iframe>
</noscript>
<!-- End Google Tag Manager (noscript) -->
<div id="app"></div>
<script type="module" src="/src/main.js"></script>

<script type="text/javascript" src="https://unpkg.com/[email protected]/umd/react.production.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/[email protected]/umd/react-dom.production.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@main/dist/en/v6.12.0/build/ol.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js"></script>
<script type="text/javascript" src="https://streetsmart.cyclomedia.com/api/v24.2/StreetSmartApi.js" ></script>

</body>
</html>
14 changes: 10 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"type": "module",
"scripts": {
"dev": "vite",
"test": "vite --mode=testing",
"build": "vite build",
"build:testing": "vite build --mode=testing",
"preview": "vite preview",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
},
Expand All @@ -14,7 +16,7 @@
"@fortawesome/free-solid-svg-icons": "^6.7.1",
"@fortawesome/pro-regular-svg-icons": "^6.6.0",
"@phila/phila-ui-core": "^1.0.18",
"@phila/pinboard": "^2.0.69",
"@phila/pinboard": "^2.0.77",
"date-fns": "^4.1.0",
"unplugin-auto-import": "^0.18.3",
"unplugin-vue-router": "^0.10.8"
Expand Down
7 changes: 2 additions & 5 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,10 @@ import { faMinus as farMinus } from '@fortawesome/pro-regular-svg-icons';
import { markRaw } from 'vue';
library.add(faExclamationTriangle, faHandHoldingHeart, farAngleDown, farAngleUp, farTimes, farPlus, farMinus);

// import pinboard from '@phila/pinboard';
import pinboard from '../node_modules/@phila/pinboard/src/main.js';
if (import.meta.env.VITE_DEBUG) console.log('test pinboard:', pinboard);

import pinboard from '@phila/pinboard';
// import pinboard from '../node_modules/@phila/pinboard/src/main.js';
import '../node_modules/@phila/pinboard/dist/style.css';

// import greeting from './general/greeting';
import legendControl from './general/legendControl';

// data-sources
Expand Down
83 changes: 49 additions & 34 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,58 @@
import { fileURLToPath, URL } from 'node:url'

import { defineConfig, searchForWorkspaceRoot } from 'vite'
import { defineConfig, searchForWorkspaceRoot, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueDevTools from 'vite-plugin-vue-devtools'
import AutoImport from 'unplugin-auto-import/vite'

// https://vite.dev/config/
export default defineConfig({
server: {
fs: {
allow: [
searchForWorkspaceRoot(process.cwd()),
'C:/Users/andy.rothwell/Projects/vue3-pinboard/node_modules/@fortawesome/fontawesome-pro/webfonts',
]
}
},
plugins: [
vue(),
vueDevTools(),
AutoImport({
imports: [
'vue',
// 'vue-router',
// {
// 'pinia': [ 'defineStore', 'storeToRefs', 'acceptHMRUpdate' ],
// }
],
// dirs: [
// './node_modules/@phila/pinboard/src/stores',
// ],
}),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd());

return {
css: {
preprocessorOptions: {
scss: {
// api: 'modern-compiler',
includePaths: ['node_modules'],
},
},
},
server: {
fs: {
allow: [
searchForWorkspaceRoot(process.cwd()),
'C:/Users/andy.rothwell/Projects/vue3-pinboard/node_modules/@fortawesome/fontawesome-pro/webfonts',
]
}
},
plugins: [
vue(),
vueDevTools(),
AutoImport({
imports: [
'vue',
// 'vue-router',
// {
// 'pinia': [ 'defineStore', 'storeToRefs', 'acceptHMRUpdate' ],
// }
],
// dirs: [
// './node_modules/@phila/pinboard/src/stores',
// ],
}),
],
// base: 'testing/primary-care/',
base: env.VITE_PUBLICPATH,
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
optimizeDeps: {
include: [ '@turf/jsts', 'maplibre-gl', 'concaveman' ],
// exclude: [ '@phila/pinboard' ]
// extensions: [".scss", ".sass"],
}
},
optimizeDeps: {
include: [ '@turf/jsts', 'maplibre-gl', 'concaveman' ],
// exclude: [ '@phila/pinboard' ]
}
})
})

0 comments on commit f7b420c

Please sign in to comment.