forked from knex/knex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'knex:master' into master
- Loading branch information
Showing
69 changed files
with
11,794 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Knex / Documentation deployment | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
paths: | ||
- docs/** | ||
- .github/workflows/** | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./docs | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
|
||
# cache node_modules | ||
- name: Restore cached dependencies | ||
uses: actions/cache@v3 | ||
id: npm-cache | ||
with: | ||
path: | | ||
**/node_modules | ||
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-npm- | ||
# install dependencies if the cache did not hit | ||
- name: Install dependencies | ||
if: steps.npm-cache.outputs.cache-hit != 'true' | ||
run: npm ci | ||
|
||
- name: Build documentation | ||
run: npm run build | ||
|
||
- name: Deploy to gh-pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs/.vitepress/dist | ||
cname: knexjs.org | ||
force_orphan: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
name: Legacy Types Linting | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: Legacy Types Linting | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup Node ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
always-auth: false | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Run npm install | ||
run: npm install | ||
|
||
- name: Run lint:everything | ||
run: npm run lint:types:legacy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
yarn.lock | ||
package-lock.json | ||
!docs/package-lock.json | ||
raw | ||
*.sw? | ||
.idea | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
.vitepress/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
import { defineConfig } from 'vitepress'; | ||
import KnexDialectsPlugins from './knexDialects'; | ||
|
||
export default defineConfig({ | ||
title: 'Knex.js', | ||
description: 'Beta knex.js documentation.', | ||
base: '/', | ||
srcDir: 'src', | ||
head: [['link', { rel: 'icon', type: 'image/png', href: '/knex-logo.png' }]], | ||
themeConfig: { | ||
logo: '/knex-logo.png', | ||
repo: 'knex/knex', | ||
docsRepo: 'knex/knex', | ||
docsDir: 'docs/src', | ||
docsBranch: 'master', | ||
editLinks: true, | ||
editLinkText: 'Edit this page on GitHub', | ||
lastUpdated: 'Last Updated', | ||
nav: [ | ||
{ text: 'Guide', link: '/guide/', activeMatch: '^/guide/' }, | ||
{ | ||
text: 'F.A.Q.', | ||
link: '/faq/', | ||
}, | ||
{ | ||
text: 'Changelog', | ||
link: '/changelog.html', | ||
}, | ||
], | ||
sidebar: { | ||
'/guide/': getGuideSidebar(), | ||
'/faq/': getFaqSidebar(), | ||
}, | ||
algolia: { | ||
appId: 'V7E3EHUPD6', | ||
apiKey: '44b5077836c1c8fba0f364383dde7fb4', | ||
indexName: 'knex', | ||
initialQuery: '', | ||
}, | ||
}, | ||
vite: { | ||
plugins: [KnexDialectsPlugins()], | ||
}, | ||
}); | ||
|
||
function getGuideSidebar() { | ||
return [ | ||
{ | ||
text: 'Installation', | ||
link: '/guide/', | ||
}, | ||
{ | ||
text: 'Query Builder', | ||
link: '/guide/query-builder', | ||
}, | ||
{ | ||
text: 'Transactions', | ||
link: '/guide/transactions', | ||
}, | ||
{ | ||
text: 'Schema Builder', | ||
link: '/guide/schema-builder', | ||
}, | ||
{ | ||
text: 'Raw', | ||
link: '/guide/raw', | ||
}, | ||
{ | ||
text: 'Ref', | ||
link: '/guide/ref', | ||
}, | ||
{ | ||
text: 'Utility', | ||
link: '/guide/utility', | ||
}, | ||
{ | ||
text: 'Interfaces', | ||
link: '/guide/interfaces', | ||
}, | ||
{ | ||
text: 'Migrations', | ||
link: '/guide/migrations', | ||
}, | ||
{ | ||
text: 'Extending', | ||
link: '/guide/extending', | ||
}, | ||
]; | ||
} | ||
function getFaqSidebar() { | ||
return [ | ||
{ | ||
text: 'F.A.Q.', | ||
link: '/faq/', | ||
}, | ||
{ | ||
text: 'Recipes', | ||
link: '/faq/recipes', | ||
}, | ||
{ | ||
text: 'Support', | ||
link: '/faq/support', | ||
}, | ||
]; | ||
} |
Oops, something went wrong.