Skip to content

Commit

Permalink
adjust configs
Browse files Browse the repository at this point in the history
  • Loading branch information
vorant94 committed Jul 23, 2024
1 parent 31a6ef9 commit 0aa9527
Show file tree
Hide file tree
Showing 29 changed files with 91 additions and 28 deletions.
56 changes: 52 additions & 4 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ on:
workflow_dispatch:

jobs:
format-build-test-and-e2e:
timeout-minutes: 60
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -16,13 +15,59 @@ jobs:

- run: npm run format:check

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/setup

- run: npm run build:client --workspace=@digital-garden/blog

- uses: actions/upload-artifact@v4
with:
name: client-build-output
path: packages/blog/public/client/
retention-days: 30

- run: npm run build:server --workspace=@digital-garden/blog

- uses: actions/upload-artifact@v4
with:
name: server-build-output
path: packages/blog/dist/
retention-days: 30

test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/setup

- run: npm run build:client --workspace=@digital-garden/blog

- run: npm run build:server --workspace=@digital-garden/blog

- run: npm run test --workspace=@digital-garden/blog

- run: npm run e2e:setup --workspace=@digital-garden/blog -- --with-deps
e2e:
timeout-minutes: 60
runs-on: ubuntu-latest
needs:
- test
- build
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/setup

- run: npm run build:client --workspace=@digital-garden/blog

- run: npm run build:server --workspace=@digital-garden/blog

- run: npm run e2e:setup --workspace=@digital-garden/blog

- run: npm run e2e --workspace=@digital-garden/blog

Expand All @@ -36,7 +81,10 @@ jobs:
runs-on: ubuntu-latest
concurrency: deploy-group
needs:
- format-build-test-and-e2e
- format
- test
- e2e
- build
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion packages/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"test": "glob dist/**/*.spec.js -c 'node --test'",
"test:watch": "glob dist/**/*.spec.js -c 'node --test --watch'",
"e2e": "playwright test",
"e2e:setup": "playwright install",
"e2e:setup": "playwright install --with-deps",
"clean": "shx rm -rf dist && shx rm -rf public/client"
},
"dependencies": {
Expand Down
File renamed without changes.
10 changes: 0 additions & 10 deletions packages/blog/postcss.config.cjs

This file was deleted.

15 changes: 15 additions & 0 deletions packages/blog/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import autoprefixer from 'autoprefixer';
import cssnano from 'cssnano';
import postcssNested from 'postcss-nested';
import tailwindcss from 'tailwindcss';
import tailwindcssNesting from 'tailwindcss/nesting';

/** @type {import('postcss-load-config').Config} */
export default {
plugins: [
tailwindcss,
autoprefixer,
cssnano,
tailwindcssNesting(postcssNested),
],
};
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import path from 'node:path';
import process from 'node:process';
import { defineConfig } from 'vite';
import postcss from './postcss.config.js';

export default defineConfig({
publicDir: false,
css: { postcss },
build: {
outDir: path.resolve(process.cwd(), 'public/client'),
lib: {
Expand Down
9 changes: 0 additions & 9 deletions packages/canvas/postcss.config.cjs

This file was deleted.

15 changes: 15 additions & 0 deletions packages/canvas/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import autoprefixer from 'autoprefixer';
import cssnano from 'cssnano';
import postcssNested from 'postcss-nested';
import tailwindcss from 'tailwindcss';
import tailwindcssNesting from 'tailwindcss/nesting';

/** @type {import('postcss-load-config').Config} */
export default {
plugins: [
tailwindcss,
autoprefixer,
cssnano,
tailwindcssNesting(postcssNested),
],
};
File renamed without changes
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions packages/canvas/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { DigitalGarden } from '@/DigitalGarden';
import { Home } from '@/Home';
import { ThoughtsOnModernFrameworkFeatures } from '@/ThoughtsOnModernFrameworkFeatures';
import { TypescriptMonoreposAreAMess } from '@/TypescriptMonoreposAreAMess';
import { route } from '@/router/route.ts';
import React from 'react';
import ReactDOM from 'react-dom/client';
import { RouterProvider, createBrowserRouter } from 'react-router-dom';
import { DigitalGarden } from 'src/digital-garden';
import { Home } from 'src/home';
import { ThoughtsOnModernFrameworkFeatures } from 'src/thoughts-on-modern-framework-features';
import { TypescriptMonoreposAreAMess } from 'src/typescript-monorepos-are-a-mess';
import './index.css';

const router = createBrowserRouter([
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import react from '@vitejs/plugin-react';
import { fileURLToPath, URL } from 'node:url';
import { defineConfig } from 'vite';
import postcss from './postcss.config.js';

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
css: { postcss },
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
Expand Down

0 comments on commit 0aa9527

Please sign in to comment.