Skip to content

Commit

Permalink
Added check
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugos68 committed May 25, 2024
1 parent b17737c commit 6e90471
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 16 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

on:
pull_request:

env:
node_version: 20
pnpm_version: 9

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: ${{ env.pnpm_version }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.node_version }}
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Run check
run: pnpm ci:check
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: ${{ env.pnpm_version }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.node_version }}
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
14 changes: 4 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,11 @@
"type": "git",
"url": "https://github.com/Hugos68/vite-plugin-pagefind"
},
"keywords": [
"vite",
"vite-plugin",
"pagefind"
],
"keywords": ["vite", "vite-plugin", "pagefind"],
"publishConfig": {
"access": "public"
},
"files": [
"dist"
],
"files": ["dist"],
"exports": {
".": {
"types": "./dist/plugins/pagefind.d.ts",
Expand All @@ -35,8 +29,8 @@
"scripts": {
"dev": "tsc -w",
"build": "tsc",
"format": "biome format . --write",
"lint": "biome lint .",
"check": "biome check . --apply",
"ci:check": "biome check .",
"release": "pnpm build && changeset publish"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/internal/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { resolve } from "node:path";
import { promises } from "node:fs";
import { resolve } from "node:path";
import * as v from "valibot";

const PagefindConfigSchema = v.object({
Expand Down
2 changes: 1 addition & 1 deletion src/internal/log.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { blue, yellow, red, bold } from "colorette";
import { blue, bold, red, yellow } from "colorette";
import { PACKAGE_NAME } from "./constants.js";

/**
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/pagefind-dev.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { resolve } from "node:path";
import { existsSync, promises } from "node:fs";
import { exec as exec_callback } from "node:child_process";
import { existsSync, promises } from "node:fs";
import { resolve } from "node:path";
import { promisify } from "node:util";
import { get_pagefind_config } from "../internal/config.js";
import { log_info } from "../internal/log.js";
import { PACKAGE_NAME } from "../internal/constants.js";
import { log_info } from "../internal/log.js";

const exec = promisify(exec_callback);

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/pagefind.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pagefind_dev from "./pagefind-dev.js";
import pagefind_build from "./pagefind-build.js";
import pagefind_dev from "./pagefind-dev.js";

/**
* Vite plugin to allow developing and building websites with Pagefind.
Expand Down

0 comments on commit 6e90471

Please sign in to comment.