Skip to content

Commit

Permalink
feat(turbo): build through turbo
Browse files Browse the repository at this point in the history
  • Loading branch information
Tahul committed Oct 15, 2023
1 parent 2cf97dd commit 8e0e44d
Show file tree
Hide file tree
Showing 73 changed files with 155 additions and 83 deletions.
60 changes: 20 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,39 @@ name: CI

on:
push:
branches:
- main

branches: ["main"]
pull_request:
branches:
- main
types: [opened, synchronize]

jobs:
lint:
build:
name: Build and Test
timeout-minutes: 15
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set node
uses: actions/setup-node@v3
- name: Check out code
uses: actions/checkout@v3
with:
node-version: 18.x

- name: Setup
run: npm i -g @antfu/ni

- name: Install
run: nci
fetch-depth: 2

- name: Lint
run: nr lint

test:
runs-on: ${{ matrix.os }}

strategy:
matrix:
node: [18.x]
os: [ubuntu-latest, macos-latest] # windows-latest
fail-fast: false
- uses: pnpm/[email protected]
with:
version: 8.9.0

steps:
- uses: actions/checkout@v3
- name: Set node ${{ matrix.node }}
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Setup
run: npm i -g @antfu/ni
node-version: 18
cache: 'pnpm'

- name: Install
run: nci
- run: corepack enable

- name: Prepare
run: nr prepare
- name: Install dependencies
run: pnpm install

- name: Build
run: nr build
run: pnpm build

- name: Test
run: nr test
run: pnpm test
32 changes: 30 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,44 @@ on:

jobs:
release:
permissions:
id-token: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-node@v3
- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 18
cache: pnpm
registry-url: 'https://registry.npmjs.org'

- run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Install Dependencies
run: pnpm i

- name: PNPM build
run: pnpm run build

- name: Publish to NPM
run: pnpm -r publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_CONFIG_PROVENANCE: true

# - name: Publish to VSCE & OVSX
# run: npm run publish
# working-directory: ./packages/vscode
# env:
# VSCE_TOKEN: ${{secrets.VSCE_TOKEN}}
# OVSX_TOKEN: ${{secrets.OVSX_TOKEN}}
Empty file added .turbo/cookies/0.cookie
Empty file.
Empty file added .turbo/cookies/1.cookie
Empty file.
Empty file added .turbo/cookies/10.cookie
Empty file.
Empty file added .turbo/cookies/11.cookie
Empty file.
Empty file added .turbo/cookies/12.cookie
Empty file.
Empty file added .turbo/cookies/13.cookie
Empty file.
Empty file added .turbo/cookies/14.cookie
Empty file.
Empty file added .turbo/cookies/15.cookie
Empty file.
Empty file added .turbo/cookies/16.cookie
Empty file.
Empty file added .turbo/cookies/17.cookie
Empty file.
Empty file added .turbo/cookies/18.cookie
Empty file.
Empty file added .turbo/cookies/19.cookie
Empty file.
Empty file added .turbo/cookies/2.cookie
Empty file.
Empty file added .turbo/cookies/20.cookie
Empty file.
Empty file added .turbo/cookies/21.cookie
Empty file.
Empty file added .turbo/cookies/22.cookie
Empty file.
Empty file added .turbo/cookies/23.cookie
Empty file.
Empty file added .turbo/cookies/24.cookie
Empty file.
Empty file added .turbo/cookies/25.cookie
Empty file.
Empty file added .turbo/cookies/26.cookie
Empty file.
Empty file added .turbo/cookies/27.cookie
Empty file.
Empty file added .turbo/cookies/28.cookie
Empty file.
Empty file added .turbo/cookies/29.cookie
Empty file.
Empty file added .turbo/cookies/3.cookie
Empty file.
Empty file added .turbo/cookies/30.cookie
Empty file.
Empty file added .turbo/cookies/31.cookie
Empty file.
Empty file added .turbo/cookies/32.cookie
Empty file.
Empty file added .turbo/cookies/33.cookie
Empty file.
Empty file added .turbo/cookies/34.cookie
Empty file.
Empty file added .turbo/cookies/35.cookie
Empty file.
Empty file added .turbo/cookies/36.cookie
Empty file.
Empty file added .turbo/cookies/37.cookie
Empty file.
Empty file added .turbo/cookies/38.cookie
Empty file.
Empty file added .turbo/cookies/39.cookie
Empty file.
Empty file added .turbo/cookies/4.cookie
Empty file.
Empty file added .turbo/cookies/40.cookie
Empty file.
Empty file added .turbo/cookies/41.cookie
Empty file.
Empty file added .turbo/cookies/42.cookie
Empty file.
Empty file added .turbo/cookies/43.cookie
Empty file.
Empty file added .turbo/cookies/44.cookie
Empty file.
Empty file added .turbo/cookies/45.cookie
Empty file.
Empty file added .turbo/cookies/46.cookie
Empty file.
Empty file added .turbo/cookies/47.cookie
Empty file.
Empty file added .turbo/cookies/48.cookie
Empty file.
Empty file added .turbo/cookies/49.cookie
Empty file.
Empty file added .turbo/cookies/5.cookie
Empty file.
Empty file added .turbo/cookies/50.cookie
Empty file.
Empty file added .turbo/cookies/51.cookie
Empty file.
Empty file added .turbo/cookies/52.cookie
Empty file.
Empty file added .turbo/cookies/53.cookie
Empty file.
Empty file added .turbo/cookies/54.cookie
Empty file.
Empty file added .turbo/cookies/6.cookie
Empty file.
Empty file added .turbo/cookies/7.cookie
Empty file.
Empty file added .turbo/cookies/8.cookie
Empty file.
Empty file added .turbo/cookies/9.cookie
Empty file.
4 changes: 2 additions & 2 deletions examples/astro-svelte/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "pinceau-astro-vue",
"name": "@pinceau/astro-svelte-example",
"private": true,
"scripts": {
"dev": "astro dev --port=3000",
"start": "astro dev --port=3000",
"build": "astro build",
"build:example": "astro build",
"preview": "astro preview",
"astro": "astro"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/astro-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "pinceau-astro-vue",
"name": "@pinceau/astro-vue-example",
"private": true,
"scripts": {
"dev": "astro dev --port=3000",
"start": "astro dev --port=3000",
"build": "astro build",
"build:example": "astro build",
"preview": "astro preview",
"astro": "astro"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/astro/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "pinceau-astro",
"name": "@pinceau/astro-example",
"private": true,
"scripts": {
"dev": "astro dev --port=3000",
"start": "astro dev --port=3000",
"build": "astro build",
"build:example": "astro build",
"preview": "astro preview",
"astro": "astro"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/nuxt/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "pinceau-nuxt",
"name": "@pinceau/nuxt-example",
"private": true,
"scripts": {
"build": "nuxi build",
"build:example": "nuxi build",
"dev": "nuxi dev --port=3000",
"preview": "nuxi preview"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pinceau/examples-shared",
"private": "true",
"private": true,
"devDependencies": {
"@pinceau/configs": "workspace:*"
}
Expand Down
4 changes: 2 additions & 2 deletions examples/sveltekit/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "pinceau-sveltekit",
"name": "@pinceau/sveltekit-example",
"type": "module",
"scripts": {
"dev": "vite dev --port=3000",
"build": "vite build",
"build:example": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
Expand Down
4 changes: 2 additions & 2 deletions examples/vite-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "vite-lib",
"name": "@pinceau/vite-lib-example",
"type": "module",
"private": true,
"scripts": {
"build": "vite build",
"build:example": "vite build",
"dev": "vite --port=3000",
"preview": "vite preview"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/vite-lit/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "pinceau-lit",
"name": "@pinceau/lit-example",
"version": "0.0.0",
"exports": {
".": "./dist/my-element.es.js"
Expand All @@ -12,7 +12,7 @@
],
"scripts": {
"dev": "vite --port=3000",
"build": "tsc && vite build"
"build:example": "tsc && vite build"
},
"dependencies": {
"lit": "^3.0.0"
Expand Down
7 changes: 4 additions & 3 deletions examples/vite-preact/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "vite-pinceau-preact",
"name": "@pinceau/vite-preact-example",
"private": true,
"version": "0.0.0",
"scripts": {
"dev": "vite --port=3000",
"dev-refresh": "cross-env USE_REFRESH=true vite --port=3000",
"build": "vite build",
"build-refresh": "cross-env USE_REFRESH=true vite build",
"build:example": "vite build",
"build:example-refresh": "cross-env USE_REFRESH=true vite build",
"preview": "vite preview"
},
"dependencies": {
Expand Down
7 changes: 4 additions & 3 deletions examples/vite-react/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "vite-pinceau-react",
"name": "@pinceau/vite-react-example",
"private": true,
"version": "0.0.0",
"scripts": {
"dev": "vite --port=3000",
"dev-refresh": "cross-env USE_REFRESH=true vite --port=3000",
"build": "vite build",
"build-refresh": "cross-env USE_REFRESH=true vite build",
"build:example": "vite build",
"build:example-refresh": "cross-env USE_REFRESH=true vite build",
"preview": "vite preview"
},
"dependencies": {
Expand Down
5 changes: 3 additions & 2 deletions examples/vite-solid/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"name": "vite-pinceau-solid",
"name": "@pinceau/vite-solid-example",
"private": true,
"version": "0.0.0",
"license": "MIT",
"scripts": {
"dev": "vite --port=3000",
"build": "vite build",
"build:example": "vite build",
"serve": "vite preview"
},
"dependencies": {
Expand Down
5 changes: 3 additions & 2 deletions examples/vite-svelte/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"name": "vite-pinceau-svelte",
"name": "@pinceau/vite-svelte-example",
"private": true,
"type": "module",
"version": "0.0.0",
"scripts": {
"dev": "vite --port=3000",
"build": "vite build",
"build:example": "vite build",
"serve": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.json"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/vite-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "vite-pinceau-vue",
"name": "@pinceau/vite-vue-example",
"type": "module",
"private": true,
"scripts": {
"build": "vite build",
"build:example": "vite build",
"dev": "vite --port=3000",
"preview": "vite preview"
},
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"version": "1.0.0",
"private": true,
"packageManager": "pnpm@8.6.0",
"packageManager": "pnpm@8.9.0",
"description": "Make your <script> lighter and your <style> smarter.",
"workspaces": [
"docs",
Expand All @@ -30,7 +30,7 @@
"vite"
],
"scripts": {
"build": "pnpm -r --filter=\"./(packages|integrations)/*\" run build && pnpm -r run build:post",
"build": "turbo run build",
"build:docs": "pnpm -r --filter=\"./docs\" run build",
"build:vscode": "pnpm -r --filter=\"./integrations/(language-server|vscode)\" run build",
"clean:snapshots": "rm -rf ./tests/__snapshots__",
Expand Down Expand Up @@ -82,7 +82,9 @@
"typescript": "^5.2.2",
"unbuild": "^2.0.0",
"unenv": "^1.7.4",
"vite-plugin-inspect": "^0.7.40"
"vite-plugin-inspect": "^0.7.40",
"turbo": "^1.10.15",
"changelogithub": "^0.13.1"
},
"pnpm": {
"peerDependencyRules": {
Expand Down
Loading

0 comments on commit 8e0e44d

Please sign in to comment.