Skip to content

Commit

Permalink
build: monorepo init (#21)
Browse files Browse the repository at this point in the history
* monorepo init
  • Loading branch information
kveeti authored Jul 28, 2023
1 parent dfe4086 commit 16ae01c
Show file tree
Hide file tree
Showing 53 changed files with 559 additions and 299 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ jobs:

- name: Test
run: |
pnpm playwright install chromium
pnpm dlx playwright install chromium
pnpm test
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
pnpm build
- name: Deploy
working-directory: ./packages/site
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
pnpm run deploy -u "github-actions-bot <support+actions@github.com>"
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/new-meetup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- uses: pnpm/action-setup@v2

- name: Create new meetup
id: new_meetup
working-directory: ./packages/actions-new-meetup
run: |
cd actions/new-meetup && \
npm i -g pnpm && \
pnpm i && \
pnpm i
pnpm start
env:
MEETUP_FOLDER: "../../src/content/meetups" # relative from action's root
MEETUP_FOLDER: "../site/content/meetups" # relative from action's root
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_BODY: ${{ github.event.issue.body }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
Expand All @@ -41,10 +42,9 @@ jobs:
body: ${{ steps.new_meetup.outputs.pull_request_body }}

- name: Update comment
working-directory: ./packages/actions-new-meetup
run: |
cd actions/post-create-pr && \
npm i -g pnpm && \
pnpm i && \
pnpm i
pnpm start
env:
PULL_REQUEST_NUMBER: ${{ steps.create_pr.outputs.pull-request-number }}
Expand Down
69 changes: 1 addition & 68 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,68 +1 @@
# Astro Starter Kit: Blog

```
pnpm create astro@latest -- --template blog
```

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/blog)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/blog)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/blog/devcontainer.json)

> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
![blog](https://user-images.githubusercontent.com/4677417/186189140-4ef17aac-c3c9-4918-a8c2-ce86ba1bb394.png)

Features:

- ✅ Minimal styling (make it your own!)
- ✅ 100/100 Lighthouse performance
- ✅ SEO-friendly with canonical URLs and OpenGraph data
- ✅ Sitemap support
- ✅ RSS Feed support
- ✅ Markdown & MDX support

## 🚀 Project Structure

Inside of your Astro project, you'll see the following folders and files:

```
├── public/
├── src/
│   ├── components/
│   ├── content/
│   ├── layouts/
│   └── pages/
├── astro.config.mjs
├── README.md
├── package.json
└── tsconfig.json
```

Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.

There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.

The `src/content/` directory contains "collections" of related Markdown and MDX documents. Use `getCollection()` to retrieve posts from `src/content/blog/`, and type-check your frontmatter using an optional schema. See [Astro's Content Collections docs](https://docs.astro.build/en/guides/content-collections/) to learn more.

Any static assets, like images, can be placed in the `public/` directory.

## 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `pnpm install` | Installs dependencies |
| `pnpm run dev` | Starts local dev server at `localhost:3000` |
| `pnpm run build` | Build your production site to `./dist/` |
| `pnpm run preview` | Preview your build locally, before deploying |
| `pnpm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `pnpm run astro -- --help` | Get help using the Astro CLI |

## 👀 Want to learn more?

Check out [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).

## Credit

This theme is based off of the lovely [Bear Blog](https://github.com/HermanMartinus/bearblog/).
TODO
47 changes: 11 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,12 @@
{
"name": "oulu-dev-meetups",
"type": "module",
"version": "0.0.1",
"packageManager": "pnpm@8.6.2",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"deploy": "touch dist/.nojekyll && gh-pages --dist dist --dotfiles true",
"preview": "astro preview",
"astro": "astro",
"lint": "eslint . --max-warnings 0 --ext .astro,.ts,.js",
"test": "playwright test"
},
"dependencies": {
"@astrojs/mdx": "^0.19.7",
"@astrojs/rss": "^2.4.3",
"@astrojs/sitemap": "^2.0.1",
"@astrojs/tailwind": "^4.0.0",
"@tailwindcss/forms": "^0.5.4",
"@tailwindcss/typography": "^0.5.9",
"astro": "^2.9.0",
"tailwindcss": "^3.3.3"
},
"devDependencies": {
"@playwright/test": "^1.36.1",
"@typescript-eslint/parser": "^6.1.0",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-astro": "^0.27.2",
"eslint-plugin-prettier": "^5.0.0",
"gh-pages": "^5.0.0",
"prettier": "^3.0.0",
"prettier-plugin-astro": "^0.11.0"
}
}
"name": "oulu-dev-meetups-monorepo",
"private": true,
"version": "0.0.1",
"description": "TODO",
"packageManager": "pnpm@8.6.2",
"scripts": {
"test": "pnpm -r --parallel run test",
"build": "pnpm -r --parallel run build",
"lint": "pnpm -r --parallel run lint"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "new-meetup-action",
"private": true,
"version": "0.0.1",
"scripts": {
"start": "tsx src/index.ts"
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "post-create-pr-action",
"private": true,
"version": "0.0.1",
"scripts": {
"start": "tsx src/index.ts"
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
37 changes: 37 additions & 0 deletions packages/site/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "oulu-dev-meetups",
"type": "module",
"private": true,
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"deploy": "touch dist/.nojekyll && gh-pages --dist dist --dotfiles true",
"preview": "astro preview",
"astro": "astro",
"lint": "eslint . --max-warnings 0 --ext .astro,.ts,.js",
"test": "playwright test"
},
"dependencies": {
"@astrojs/mdx": "^0.19.7",
"@astrojs/rss": "^2.4.3",
"@astrojs/sitemap": "^2.0.1",
"@astrojs/tailwind": "^4.0.0",
"@tailwindcss/forms": "^0.5.4",
"@tailwindcss/typography": "^0.5.9",
"astro": "^2.9.0",
"tailwindcss": "^3.3.3"
},
"devDependencies": {
"@playwright/test": "^1.36.1",
"@typescript-eslint/parser": "^6.1.0",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-astro": "^0.27.2",
"eslint-plugin-prettier": "^5.0.0",
"gh-pages": "^5.0.0",
"prettier": "^3.0.0",
"prettier-plugin-astro": "^0.11.0"
}
}
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 16ae01c

Please sign in to comment.