Skip to content

Commit

Permalink
Upgrade to NodeJS 20.x (and Vite) (#53)
Browse files Browse the repository at this point in the history
* vite - new package.json. Front page loads

* remove @statnett/vue-plotlty

* front page looks OK

* components converted

* v1,v2 works

* v3 mostly working

* v4,v5,v6, v7, anim

* calculators

* V2 loads -- with some errors

* V2 loads without errors :-)

* upgrade Vite to 5.x, ESLint 9.x which deprecates @import and introduces @use instead

* V1 viewer working =)

* fix animation slider thumbgrabber

* update github action to use new node
  • Loading branch information
billyc authored Oct 23, 2024
1 parent f61c3ee commit 4e31938
Show file tree
Hide file tree
Showing 126 changed files with 38,683 additions and 37,640 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/autobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: '20'

# Runs a set of commands using the runners shell
- name: CI Autobuild
Expand Down
3 changes: 2 additions & 1 deletion .prettierrc.js → .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
arrowParens: 'avoid',
printWidth: 100,
semi: false,
singleQuote: true,
trailingComma: 'es5',
printWidth: 100,
}
33 changes: 0 additions & 33 deletions .travis.old.yml

This file was deleted.

674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
module.exports = {
presets: ['@vue/cli-plugin-babel/preset'],
presets: ['@babel/preset-env'],
// For Jest not to be annoyed by 'import.meta.xxx'
plugins: [
function () {
return {
visitor: {
MetaProperty(path) {
path.replaceWithSourceString('process')
},
},
}
},
],
}
32 changes: 27 additions & 5 deletions public/index.html → index.html
Original file line number Diff line number Diff line change
@@ -1,44 +1,58 @@
<!DOCTYPE html>

<html lang="en">
<head>
<meta charset="utf-8" />

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />

<meta
name="viewport"
content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no"
/>

<meta name="site_name" content="{{ site.name }}" />

<meta name="author" content="{{ site.author }}" />

<meta name="twitter:card" content="summary_large_image" />

<meta name="twitter:site" content="@billyinberlin" />

<meta name="twitter:creator" content="@billyinberlin" />

<meta
name="twitter:image"
content="https://github.com/matsim-vsp/covid-sim/raw/master/src/assets/images/v1-thumb.png"
/>

<meta name="twitter:title" content="Mobility traces and the spreading of COVID-19" />

<meta
name="twitter:description"
content="Simulations of COVID-19 spreading through the population. The outcomes examine consequences of starting various interventions a number of days after the simulation starts."
/>

<meta name="og:title" content="Mobility traces and the spreading of COVID-19" />

<meta name="og:url" content="https://covid-sim.info/v1/" />

<meta
name="og:image"
content="https://github.com/matsim-vsp/covid-sim/raw/master/src/assets/images/v1-thumb.png"
/>

<meta
name="og:description"
content="Simulations of COVID-19 spreading through the population. The outcomes examine consequences of starting various interventions a number of days after the simulation starts."
/>

<!-- github pages hack -->

<script>
;(function() {
;(function () {
var redirect = sessionStorage.redirect
delete sessionStorage.redirect
if (redirect && redirect != location.href) {
Expand All @@ -53,26 +67,34 @@
integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr"
crossorigin="anonymous"
/>

<link
href="https://fonts.googleapis.com/css?family=Roboto:300,700&display=swap"
rel="stylesheet"
/>

<link
href="https://fonts.googleapis.com/css?family=Roboto+Slab&display=swap"
rel="stylesheet"
/>

<!-- <link href="/favicon-32x32.png" rel="icon" sizes="32x32" type="image/png" /> -->

<title>COVID-19 DataViewer</title>
</head>

<body>
<script type="module" src="/src/main.ts"></script>

<noscript>
<strong
>We're sorry but dataviewer-proto doesn't work properly without JavaScript enabled. Please
enable it to continue.</strong
>
<strong>
We're sorry but covid-sim.info doesn't work properly without JavaScript enabled. Please
enable it to continue.
</strong>
</noscript>

<div id="app"></div>

<!-- built files will be auto injected -->
</body>
</html>
12 changes: 11 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
module.exports = {
preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel',
testEnvironment: 'jsdom',
moduleFileExtensions: ['js', 'ts', 'json', 'vue'],
transform: {
'^.+\\.ts$': 'ts-jest',
'^.+\\.vue$': '@vue/vue2-jest',
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
// '^@shared(.*)$': '<rootDir>/shared$1',
// '^@components(.*)$': '<rootDir>/shared/components$1',
},
}
Loading

0 comments on commit 4e31938

Please sign in to comment.