Software for the Interactive Texas State Water Plan
#start npm run dev
using node 18.16.0
Once you've created a project and installed dependencies with npm install
(or pnpm install
or yarn
), start a development server:
npm package
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
To create a production version of your app:
- download gill-sans font insteuctions in gill-sans/README.md
- Download a copy of react-pivot-standalone-4.1.1.min.js and place in static folder root.
npm run build
- compile main.scss (Install sass first
npm install -g sass
) runmake css
in project root alternatively you can runsass main.scss main.css
in the sass directory Then move it into static/css Designed to be compiled manually due to sveltekit not allowing prerender = true on dynamic routes AKA [slug] pages. Resulting in a split second where the css is not loaded causing a flicker effect. - Compile a version of chartist located here. https://github.com/L-Har/chartist (Trying to get this in upstream)
- Make sure to pull from https://github.com/chartist-js/chartist and merge new changes if this still isn't upstream.
- Place dist folder in lib/chartist folder and place package.json from the repo here.
- Create a local modules folder and place src and dist in it.
- link to library with
npm link src/lib/chartist
You can preview the production build withnpm run preview
. - Build static site
make build
from the source directory.
To deploy your app, you may need to install an adapter for your target environment.
- run
make deploy_prod
How to create cache.
- Convert non-spatial data (Used to be sqlite files) to JSON
- gzip then remove .gz files Should be cache.json (But gzipped)
- upload to s3 bucket,
- set metadata to Content-Encoding gzip, Content-Type application/json
- Make publically accessible.
- Run getmdata.js file
- upload checkfile2023.json to https://tnris-droc.s3.amazonaws.com/iswp/
Prettier config is located in package.json. prettier-plugin-svelte Svelte for vs code extension has this installed.
This program is licenced under GPLV2 Please see LICENSE file for details. This program is distributed with the following programs under separate free licenses. View them for details.
leaflet, leaflet Easybutton, skeleton.css, react-pivot standalone, leaflet oms https://leafletjs.com/ https://github.com/CliffCloud/Leaflet.EasyButton https://github.com/jawj/OverlappingMarkerSpiderfier-Leaflet https://github.com/dhg/Skeleton https://github.com/L-Har/react-pivot https://github.com/davidguttman/react-pivot https://github.com/jawj/OverlappingMarkerSpiderfier-Leaflet