Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: lts/*
cache: "npm"
cache: 'npm'

- name: Install dependencies
run: npm ci
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: lts/*
cache: "npm"
cache: 'npm'

- name: Install dependencies
run: npm ci
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,23 @@ permissions:
jobs:
# Build job
build:
# Specify runner + build & upload the static files as an artifact
# Specify runner + build & upload the static files as an artifact
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Read HEAD_COMMIT
id: webpack-ref
run: echo "ref=$(cat HEAD_COMMIT)" >> "$GITHUB_OUTPUT"

- name: Checkout webpack
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: webpack/webpack
ref: ${{ steps.webpack-ref.outputs.ref }}
path: webpack

- name: Setup Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: lts/*
cache: "npm"
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build
run: mkdir out && npm run build
run: mkdir out && npm run build-html

- name: Upload static files as artifact
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
Expand Down
25 changes: 16 additions & 9 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ name: Sync Webpack
on:
schedule:
# Run every 24 hours at 04:00 UTC
- cron: "0 4 * * *"
- cron: '0 4 * * *'
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
sync:
Expand Down Expand Up @@ -50,7 +51,7 @@ jobs:
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: lts/*
cache: "npm"
cache: 'npm'

- name: Install dependencies
if: steps.check.outputs.changed == 'true'
Expand All @@ -64,11 +65,17 @@ jobs:
if: steps.check.outputs.changed == 'true'
run: npm run generate-docs

- name: Commit and push
- name: Create pull request
if: steps.check.outputs.changed == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add HEAD_COMMIT pages/
git commit -m "chore: sync webpack docs to $(echo ${{ steps.latest.outputs.latest }} | cut -c1-7)"
git push
uses: gr2m/create-or-update-pull-request-action@b65137ca591da0b9f43bad7b24df13050ea45d1b # v1.10.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commit-message: 'chore: sync webpack docs to ${{ steps.latest.outputs.latest }}'
title: 'chore: sync webpack docs to ${{ steps.latest.outputs.latest }}'
body: |
Automated update of webpack docs.

- Latest webpack commit: ${{ steps.latest.outputs.latest }}
- Previous commit: ${{ steps.latest.outputs.current }}
branch: 'chore/sync-webpack'
10 changes: 10 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "avoid"
}
2 changes: 1 addition & 1 deletion HEAD_COMMIT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
214f361891d8f51f41bafb2e760cb3240d6014be
b5499e05b0c1c2847545a610cbaea3d352328d3d
10 changes: 5 additions & 5 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import js from "@eslint/js";
import globals from "globals";
import js from '@eslint/js';
import globals from 'globals';

export default [
js.configs.recommended,
{
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
ecmaVersion: 'latest',
sourceType: 'module',
globals: globals.node,
},
},
{
ignores: ["node_modules/", "out/", "webpack/"],
ignores: ['node_modules/', 'out/', 'webpack/'],
},
];
24 changes: 12 additions & 12 deletions generate-md.mjs
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
import { Application } from "typedoc";
import webpack from "./webpack/package.json" with { type: "json" };
import { major } from "semver";
import { Application } from 'typedoc';
import webpack from './webpack/package.json' with { type: 'json' };
import { major } from 'semver';

const app = await Application.bootstrapWithPlugins({
entryPoints: ["./webpack/types.d.ts"],
entryPoints: ['./webpack/types.d.ts'],
out: `pages/v${major(webpack.version)}.x`,

// Plugins
plugin: [
"typedoc-plugin-markdown",
"./plugins/processor.mjs",
"./plugins/theme/index.mjs",
'typedoc-plugin-markdown',
'./plugins/processor.mjs',
'./plugins/theme/index.mjs',
],
theme: "doc-kit",
theme: 'doc-kit',
router: 'doc-kit',

// Formatting
hideGroupHeadings: true,
hideBreadcrumbs: true,
hidePageHeader: true,
disableSources: true,
propertiesFormat: 'table',

router: "module",
entryFileName: "index",

tsconfig: "tsconfig.json",
entryFileName: 'index',
tsconfig: 'tsconfig.json',
});

const project = await app.convert();
Expand Down
Loading