5
1
Fork
You've already forked core
0
Collection of various data, JS, and Go code that is used in multiple EOTL apps
Vue 56.2%
JavaScript 40.3%
HTML 2.1%
Makefile 1.4%
2024年12月11日 18:10:10 +01:00
.vscode adds Vue and vite 2024年04月25日 10:37:24 +02:00
assets cleanup Estimator with TOS steps i18n errors, etc. 2024年08月03日 11:36:17 +02:00
src remove styleguide.css from places.js 2024年12月11日 18:10:10 +01:00
.env.example adds vite, pinia and vue dev bootstrapping 2024年04月29日 12:37:16 +02:00
.eslintrc.cjs Add alert test using @testing-library/{vue,dom} 2024年08月24日 16:55:05 +02:00
.gitignore adds vite, pinia and vue dev bootstrapping 2024年04月29日 12:37:16 +02:00
.npmignore adds vite, pinia and vue dev bootstrapping 2024年04月29日 12:37:16 +02:00
.npmrc adds Vue and vite 2024年04月25日 10:37:24 +02:00
.prettierrc.json adds Vue and vite 2024年04月25日 10:37:24 +02:00
.woodpecker.yaml rename tests -> test 2024年08月22日 12:44:17 +02:00
docker-compose.yml first-pass of Dockerizing repo 2024年06月05日 12:05:22 +02:00
env.d.ts Add alert test using @testing-library/{vue,dom} 2024年08月24日 16:55:05 +02:00
index.html adjust HTML page content & styloe, add Alert style alertPrimary() 2024年04月29日 13:09:14 +00:00
jsconfig.json fix missing from merge conflict 2024年08月26日 11:40:25 +02:00
LICENSE Initial commit 2021年04月29日 09:18:26 +02:00
Makefile v0.3.11 tidys up things and store/index.js 2024年08月30日 10:53:09 +02:00
package.json v0.3.11 tidys up things and store/index.js 2024年08月30日 10:53:09 +02:00
places.html moar adjusting of naming of Places code for dev & build 2024年07月25日 15:42:20 +02:00
README.md migrate or remove unused files from mixins/ 2024年08月14日 15:04:20 +02:00
setup.js Rename .ts files to .js 2024年08月26日 15:17:11 +02:00
tsconfig.json Disable type checking of .js files 2024年08月24日 17:05:19 +02:00
vite.config.js Rename .ts files to .js 2024年08月26日 15:17:11 +02:00
vite.config.places.js bump v0.3.6 and adjust friendlyId export & build outputs 2024年08月15日 11:52:31 +02:00
yarn.lock add msw for testing, migrate tests/ dir to in directories 2024年08月26日 15:12:32 +02:00

Core

status-badge

Various data, structures, and utils to use across EOTL applications.

⚠️ Warning this repo is not ready for production and is highly subject to change

JS Utils & Components

A JavaScript package that can be installed in your JS application.

$ yarn add @eotl/core

Vue Components

import { ... } from '@eotl/core/components

Vue Mixins

import { ... } from '@eotl/core/mixins

Vue i18n translation strings

import { ... } from '@eotl/core/locales

Generic Utils

import { ... } from '@eotl/core/enums

Styling

For the components to work properly you also need to include the styling

import '@eotl/core/dist/style.css'

Example

To include Vue.js libraries you must first include and init() the package with the following:

import { useEotlCore } from '@eotl/core/store'
// init EOTL core
const eotlStore = useEotlCore()
eotlStore.init({
 // mapboxToken: '',
 url_sextant: import.meta.env.VITE_SEXTANT_URL,
 url_api: import.meta.env.VITE_SEXTANT_API_URL
})

This package will only work with passing in a pinia store (for now), thus working only in a Vue.js app and breaking the idea of using it as a standalone.

Alerts

To trigger alerts in apps, use these components. The message argument is required, the title has a default specified.

eotlStore.alertPrimary('Hello, I am a primary alert.')
eotlStore.alertSuccess('Good job, keep it up', 'Success Custom Title')
eotlStore.alertInfo(message, title)
eotlStore.alertWarning('message', title)
eotlStore.alertDanger(message, title)

Fetching Data

Within the eotlStore are HTTP fetch() helpers which handle various response states.

async fetchGet(endpoint, queryString = '') { ... }
async fetchPost(endpoint, record) { ... }
async fetchPatch(endpoint, record) { ... }
async fetchDelete(endpoint) { ... }

To-Do

  • Logistics UI widget for calculating size, weight, and price estimation of items to be transported

Vue Basic Setup Testing

This template should help get you started developing with Vue 3 in Vite.

Customize configuration

See Vite Configuration Reference.

Developing

yarn install

Compile and Hot-Reload for Development

yarn dev

To work on eotl.places.js code, Places is served separately because we wanna know for sure that no other libraries are being imported in the code with the vite.config.places.js config file.

yarn dev:places

The normal Component view can also be seen at root directory and is compiled:

For local dev and importing it in another package use

yarn build --watch

Compile and Minify for Production

yarn build

Lint with ESLint

yarn lint

Go

No shared Golang code at present... but will be soon.