Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
santilland authored Apr 17, 2024
0 parents commit 82560b9
Show file tree
Hide file tree
Showing 20 changed files with 4,678 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "eodash config template",
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-18-bullseye",
"updateContentCommand": "npm install",
"postAttachCommand": "npm run dev",
"forwardPorts": [3000],
"customizations": {
"vscode": {
"extensions": ["esbenp.prettier-vscode"],
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
}
20 changes: 20 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
extends: ["@eox", "plugin:@typescript-eslint/recommended"],
ignorePatterns: ["public/**", "app/**"],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
root: true,
overrides: [
{
files: ["**/*.js"],
rules: {
"no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-unused-vars": [
"warn",
{ argsIgnorePattern: "^_" },
],
"@typescript-eslint/triple-slash-reference": "off",
},
},
],
};
24 changes: 24 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# .github/workflows/deploy.yml
name: Deploy main branch
on:
push:
branches:
- main
jobs:
deploy-preview:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
pull-requests: write
steps:
- uses: actions/checkout@v3
- run: |
npm install
npm run build -- --base /${{ github.event.repository.name }}/
cp .eodash/dist/index.html .eodash/dist/404.html
- uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./.eodash/dist/
branch: gh-pages
clean-exclude: pr-preview
34 changes: 34 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# .github/workflows/preview.yml
name: Deploy PR previews

on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed

concurrency: preview-${{ github.ref }}

jobs:
deploy-preview:
runs-on: ubuntu-22.04
permissions:
contents: write
pages: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install and Build
if: github.event.action != 'closed'
run: |
npm install
npm run build -- --base /${{ github.event.repository.name }}/pr-preview/pr-${{ github.event.number }}/
- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./.eodash/dist/
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
app
.vscode
.DS_Store
.eodash/
dist
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
public
dist
.eodash
node_modules
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Eodash v5 Configuration and Deployment Template

This is a template repository for configuring and deploying [eodash-v5](https://github.com/EOX-A/eodash-v5)

## Prerequisites

- Node v18 or higher

## Static Assets

files and directories inside the `public` directory will be served statically in the application. They can be refrenced inside the config using their relative path:

```js
new URL("/directory/file", import.meta.url).href;
```
16 changes: 16 additions & 0 deletions eodash.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/** @type {import("@eodash/eodash").EodashCLiConfig} */
export default {
base: "",
dev: {
port: 3001,
host: false,
open: false,
},
preview: {
port: 4173,
host: true,
open: true,
},
outDir: ".eodash/dist",
cacheDir: ".eodash/temp",
};
Loading

0 comments on commit 82560b9

Please sign in to comment.