Skip to content

Commit

Permalink
feat!: update site architecture with new Trivet features (#665)
Browse files Browse the repository at this point in the history
  • Loading branch information
greatislander authored Aug 10, 2023
1 parent be0c377 commit a79ba18
Show file tree
Hide file tree
Showing 203 changed files with 14,073 additions and 5,537 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

25 changes: 25 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@


module.exports = {
extends: [
"fluid",
"plugin:yml/standard",
"plugin:react/recommended"
],
ignorePatterns: ["_site/", "src/_locales/messages.js", "!.*.cjs", "!.*.js"],
env: {
amd: true,
browser: true,
node: true,
es6: true
},
parserOptions: {
ecmaVersion: 2020,
sourceType: "module"
},
settings: {
react: {
version: "16"
}
}
};
40 changes: 0 additions & 40 deletions .eslintrc.json

This file was deleted.

2 changes: 2 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- markdownlint-disable MD041 -->

* [ ] This pull request has been tested by running `npm run test` without errors
* [ ] This pull request has been built by running `npm run build` without errors
* [ ] This isn't a duplicate of an existing pull request
Expand Down
129 changes: 3 additions & 126 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,128 +1,5 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Site
.DS_Store
**/.DS_Store
node_modules
_site

.now

src/_data/assets.json

# Local Netlify folder
.netlify

# Backstop data
backstop_data/*
!backstop_data/engine_scripts
!backstop_data/bitmaps_reference

# Nova configuration
.nova

# VS Code configuration
.vscode

# Mac OSX
.DS_Store
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit "$1"
3 changes: 0 additions & 3 deletions .husky/commit-msg.txt

This file was deleted.

4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no lint-staged
3 changes: 0 additions & 3 deletions .husky/pre-commit.txt

This file was deleted.

56 changes: 28 additions & 28 deletions .lighthouserc.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
module.exports = {
ci: {
collect: {
settings: {
// Fix the CI failure with error "Unable to connect to chrome".
// See: https://github.com/GoogleChrome/lighthouse-ci/issues/802
hostname: "127.0.0.1",
// Source the form factor from an environment variable set in the CI run
formFactor: process.env.EMULATE_DEVICE || "mobile",
screenEmulation: {
mobile: !(process.env.EMULATE_DEVICE === "desktop")
},
// Do not apply any throttling
throttlingMethod: "provided",
// Skipping "uses-http2" due to errors with reports see: http2 https://github.com/GoogleChrome/lighthouse/issues/6539
// Skipping "is-crawlable" because Netlify's preview preview for PRs add `x-robots-tag: noindex`
// Skipping "service-worker" because the service worker is disabled on deploy previews.
// Skipping "works-offline" and "offline-start-url" because the service worker is disabled on deploy previews.
skipAudits: ["uses-http2", "is-crawlable", "service-worker", "offline-start-url", "works-offline"]
}
},
assert: {
assertions: {
"categories:performance": ["error", {"minScore": 0.90}],
"categories:accessibility": ["error", {"minScore": 1}],
"categories:best-practices": ["error", {"minScore": 1}],
ci: {
collect: {
settings: {
// Fix the CI failure with error "Unable to connect to chrome".
// See: https://github.com/GoogleChrome/lighthouse-ci/issues/802
hostname: "127.0.0.1",
// Source the form factor from an environment variable set in the CI run
formFactor: process.env.EMULATE_DEVICE || "mobile",
screenEmulation: {
mobile: !(process.env.EMULATE_DEVICE === "desktop")
},
// Do not apply any throttling
throttlingMethod: "provided",
// Skipping "uses-http2" due to errors with reports see: http2 https://github.com/GoogleChrome/lighthouse/issues/6539
// Skipping "is-crawlable" because Netlify's preview preview for PRs add `x-robots-tag: noindex`
// Skipping "service-worker" because the service worker is disabled on deploy previews.
// Skipping "works-offline" and "offline-start-url" because the service worker is disabled on deploy previews.
skipAudits: ["uses-http2", "is-crawlable", "service-worker", "offline-start-url", "works-offline"]
}
},
assert: {
assertions: {
"categories:performance": ["error", {"minScore": 0.90}],
"categories:accessibility": ["error", {"minScore": 1}],
"categories:best-practices": ["error", {"minScore": 1}],
"categories:seo": ["error", {"minScore": 1}],
"categories:pwa": ["error", {"minScore": 1}]
}
}
}
}
}
}
};
6 changes: 6 additions & 0 deletions .markdownlint-cli2.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"use strict";

module.exports = {
config: require("./node_modules/markdownlint-config-fluid/.markdownlintrc.json"),
ignores: ["node_modules", "src/collections", "src/*.md", "CHANGELOG.md"]
};
18 changes: 18 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@


module.exports = {
extends: ["stylelint-config-fluid", "stylelint-config-standard-scss"],
customSyntax: "postcss-scss",
plugins: ["stylelint-use-logical-spec"],
ignoreFiles: ["_site/**/*.{css,scss}"],
rules: {
"no-descending-specificity": null,
"custom-property-pattern": null,
"import-notation": "string",
"selector-class-pattern": null,
"liberty/use-logical-spec": [
"always",
{ except: ["float", "top", "left", "right", "bottom"] }
]
}
};
10 changes: 0 additions & 10 deletions .stylelintrc.json

This file was deleted.

7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
FROM node:16.16.0-alpine AS builder

RUN apk add --no-cache python3 make git g++
FROM node:18-alpine AS builder

WORKDIR /app

COPY package*.json ./

RUN apk add --no-cache git

RUN npm ci

COPY . ./

RUN npm run build


FROM nginx:1.18.0-alpine

COPY --from=builder /app/dist /usr/share/nginx/html
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ To build and serve a static version of the website, enter the following in your

```bash
npm run build
npm run serve
npx serve _site
```

The website will be available at [http://localhost:3000](http://localhost:3000).
Expand Down Expand Up @@ -62,11 +62,11 @@ This website can also be served with [Docker](https://docs.docker.com/get-docker

Once you have Docker installed, run the following commands to build a Docker image and start a container:

- Build the image: `docker build -t idrc .`
- Run the container: `docker run --name idrc -p 8000:80 idrc`
* Build the image: `docker build -t idrc .`
* Run the container: `docker run --name idrc -p 8000:80 idrc`

The website will be available at [http://localhost:8000](http://localhost:8000)

- To stop and remove the container: `docker rm -f idrc`
* To stop and remove the container: `docker rm -f idrc`

If you make changes to the code, repeat the steps to build the image and start a new container.
Loading

0 comments on commit a79ba18

Please sign in to comment.