forked from eclipse-langium/langium-website
-
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 'eclipse-langium:main' into main
- Loading branch information
Showing
82 changed files
with
8,080 additions
and
4,504 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Deploy Hugo site to Pages | ||
|
||
on: | ||
# Run on pushes targeting the default branch | ||
push: | ||
branches: main | ||
# Allow to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Set permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v3 | ||
- name: Build | ||
env: | ||
# For maximum backward compatibility with Hugo modules | ||
HUGO_ENVIRONMENT: production | ||
HUGO_ENV: production | ||
run: | | ||
npm install | ||
npm run build | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: ./public | ||
|
||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 | ||
|
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,86 @@ | ||
name: Deploy PR previews | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- closed | ||
|
||
concurrency: preview-${{ github.head_ref }} | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build-preview: | ||
if: github.event_name == 'pull_request_target' && github.event.action != 'closed' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Use Node.js | ||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2 | ||
with: | ||
node-version: '18' | ||
- name: Checkout | ||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Build | ||
run: | | ||
npm install | ||
npm run build | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | ||
with: | ||
name: "site" | ||
path: ./public | ||
|
||
deploy-preview: | ||
needs: build-preview | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
environment: | ||
name: pull-request-preview | ||
url: ${{ steps.deployment.outputs.deployment-url }} | ||
steps: | ||
# checkout required for pr-preview-action to succeed, | ||
# while the content will not be used | ||
- name: Checkout | ||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | ||
- name: Download the preview page | ||
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | ||
with: | ||
name: "site" | ||
path: ./public | ||
- uses: rossjrw/pr-preview-action@4668d7cb417ce7067b0b59bc152b1ae1513010de # v1.4.6 | ||
id: deployment | ||
with: | ||
source-dir: ./public | ||
preview-branch: previews | ||
umbrella-dir: pr-previews | ||
deploy-repository: eclipse-langium/langium-previews | ||
token: ${{ secrets.DEPLOY_PREVIEW_TOKEN }} | ||
action: auto | ||
|
||
# remove the preview page when the PR got closed | ||
remove-preview: | ||
if: github.event_name == 'pull_request_target' && github.event.action == 'closed' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
# checkout required for pr-preview-action to succeed, | ||
# while the content will not be used | ||
- name: Checkout | ||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | ||
- uses: rossjrw/pr-preview-action@4668d7cb417ce7067b0b59bc152b1ae1513010de # v1.4.6 | ||
id: deployment | ||
with: | ||
preview-branch: previews | ||
umbrella-dir: pr-previews | ||
deploy-repository: eclipse-langium/langium-previews | ||
token: ${{ secrets.DEPLOY_PREVIEW_TOKEN }} | ||
action: auto |
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,10 +1,4 @@ | ||
/public/ | ||
/hugo/resources/ | ||
/hugo/static/css/ | ||
hugo/static/libs | ||
hugo/static/showcase/ | ||
hugo/static/libs/ | ||
hugo/static/playground/ | ||
node_modules/ | ||
.DS_Store | ||
.hugo_build.lock |
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,15 @@ | ||
{ | ||
// Use IntelliSense to learn about possible Node.js debug attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "chrome", | ||
"request": "launch", | ||
"name": "Launch Chrome", | ||
"url": "http://localhost:1313", | ||
"webRoot": "${workspaceFolder}" | ||
} | ||
] | ||
} |
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 @@ | ||
bundle/ | ||
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,5 @@ | ||
# core/ | ||
|
||
We utilize [monaco-editor-wrapper](https://www.npmjs.com/package/monaco-editor-wrapper) and [@typefox/monaco-editor-react](https://www.npmjs.com/package/@typefox/monaco-editor-react) to make the monaco-editor intgration a smoother experience. | ||
|
||
This package provides utility `createUserConfig` that provides a fully specified user configuration to be used by either of the two packages. The other purpose is to bundle the code, so it can be integrated with hugo and remove the burden dealing with complex javascript in the hugo build process. |
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,67 @@ | ||
{ | ||
"name": "langium-website-core", | ||
"version": "1.0.0", | ||
"type": "module", | ||
"description": "Bundling complex sources for hugo", | ||
"author": "TypeFox", | ||
"license": "MIT", | ||
"private": true, | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.js", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.js" | ||
}, | ||
"./bundle": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./bundle/monaco-editor-wrapper-bundle/index.js" | ||
} | ||
}, | ||
"typesVersions": { | ||
"*": { | ||
".": [ | ||
"dist/index" | ||
], | ||
"bundle": [ | ||
"dist/index" | ||
] | ||
} | ||
}, | ||
"files": [ | ||
"dist", | ||
"bundle", | ||
"src", | ||
"LICENSE", | ||
"README.md" | ||
], | ||
"scripts": { | ||
"clean": "shx rm -rf ./bundle ./dist", | ||
"compile": "tsc", | ||
"build:bundle": "vite --config vite.bundle.ts build", | ||
"build": "npm run clean && npm run compile && npm run build:bundle" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "~18.2.28", | ||
"@types/react-dom": "~18.2.13", | ||
"@types/vscode": "~1.83.0", | ||
"typescript": "~5.2.2", | ||
"vite": "~4.4.11" | ||
}, | ||
"dependencies": { | ||
"@codingame/monaco-vscode-keybindings-service-override": "~1.83.2", | ||
"@typefox/monaco-editor-react": "2.3.0", | ||
"monaco-editor": "~0.44.0", | ||
"monaco-editor-workers": "~0.44.0", | ||
"monaco-editor-wrapper": "~3.3.0", | ||
"monaco-languageclient": "~6.6.0", | ||
"react": "~18.2.0", | ||
"react-dom": "~18.2.0", | ||
"vscode": "npm:@codingame/monaco-vscode-api@>=1.83.2 <1.84.0", | ||
"vscode-languageserver": "~8.0.2" | ||
}, | ||
"volta": { | ||
"node": "18.18.1", | ||
"npm": "9.9.0" | ||
} | ||
} |
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,17 @@ | ||
import * as monaco from "monaco-editor"; | ||
import getKeybindingsServiceOverride from '@codingame/monaco-vscode-keybindings-service-override'; | ||
import type { MonacoEditorProps } from "@typefox/monaco-editor-react"; | ||
import { MonacoEditorReactComp } from "@typefox/monaco-editor-react"; | ||
import { addMonacoStyles } from 'monaco-editor-wrapper/styles'; | ||
|
||
export * from "monaco-editor-wrapper"; | ||
export type * from "monaco-editor-wrapper"; | ||
export * from "./monaco-editor-wrapper-utils.js"; | ||
|
||
export { | ||
monaco, | ||
MonacoEditorProps, | ||
MonacoEditorReactComp, | ||
addMonacoStyles, | ||
getKeybindingsServiceOverride | ||
} |
Oops, something went wrong.