mirror of
https://github.com/flarum/core.git
synced 2025-08-03 06:57:54 +02:00
chore: unify JS actions into one (rewritten flarum/action-build
) (#3573)
* chore: unify JS actions into one (rewritten `flarum/action-build)` * chore: maintain backwards compatibility * fix: wrong default format check script Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
This commit is contained in:
166
.github/workflows/REUSABLE_frontend.yml
vendored
166
.github/workflows/REUSABLE_frontend.yml
vendored
@@ -3,6 +3,32 @@ name: Flarum Frontend Jobs
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
build_script:
|
||||||
|
description: "Script to run for production build. Empty value to disable."
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: build
|
||||||
|
build_typings_script:
|
||||||
|
description: "Script to run for typings build. Empty value to disable."
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: build-typings
|
||||||
|
format_script:
|
||||||
|
description: "Script to run for code formatting. Empty value to disable."
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: format-check
|
||||||
|
check_typings_script:
|
||||||
|
description: "Script to run for tyiping check. Empty value to disable."
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: check-typings
|
||||||
|
type_coverage_script:
|
||||||
|
description: "Script to run for type coverage. Empty value to disable."
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: check-typings-coverage
|
||||||
|
|
||||||
enable_bundlewatch:
|
enable_bundlewatch:
|
||||||
description: "Enable Bundlewatch?"
|
description: "Enable Bundlewatch?"
|
||||||
type: boolean
|
type: boolean
|
||||||
@@ -61,66 +87,9 @@ env:
|
|||||||
cache_dependency_path: ${{ inputs.cache_dependency_path || format(inputs.js_package_manager == 'yarn' && '{0}/yarn.lock' || '{0}/package-lock.json', inputs.frontend_directory) }}
|
cache_dependency_path: ${{ inputs.cache_dependency_path || format(inputs.js_package_manager == 'yarn' && '{0}/yarn.lock' || '{0}/package-lock.json', inputs.frontend_directory) }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bundlewatch:
|
build:
|
||||||
name: Bundlewatch
|
name: Checks & Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: inputs.enable_bundlewatch
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: ${{ inputs.node_version }}
|
|
||||||
cache: ${{ inputs.js_package_manager }}
|
|
||||||
cache-dependency-path: ${{ env.cache_dependency_path }}
|
|
||||||
|
|
||||||
- name: Build production assets
|
|
||||||
uses: flarum/action-build@2
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.github_token }}
|
|
||||||
build_script: build
|
|
||||||
package_manager: ${{ inputs.js_package_manager }}
|
|
||||||
js_path: ${{ inputs.frontend_directory }}
|
|
||||||
do_not_commit: true
|
|
||||||
|
|
||||||
- name: Check bundle size change
|
|
||||||
run: node_modules/.bin/bundlewatch --config .bundlewatch.config.json
|
|
||||||
working-directory: ${{ inputs.frontend_directory }}
|
|
||||||
env:
|
|
||||||
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.bundlewatch_github_token }}
|
|
||||||
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
|
|
||||||
|
|
||||||
prettier:
|
|
||||||
name: Prettier
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: inputs.enable_prettier
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: ${{ inputs.node_version }}
|
|
||||||
cache: ${{ inputs.js_package_manager }}
|
|
||||||
cache-dependency-path: ${{ env.cache_dependency_path }}
|
|
||||||
|
|
||||||
- name: Install JS dependencies
|
|
||||||
run: ${{ env.ci_script }}
|
|
||||||
working-directory: ${{ inputs.frontend_directory }}
|
|
||||||
|
|
||||||
- name: Check JS formatting
|
|
||||||
run: ${{ inputs.js_package_manager }} run format-check
|
|
||||||
working-directory: ${{ inputs.frontend_directory }}
|
|
||||||
|
|
||||||
typecheck:
|
|
||||||
name: Typecheck
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: inputs.enable_typescript
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
@@ -149,72 +118,23 @@ jobs:
|
|||||||
run: ${{ env.ci_script }}
|
run: ${{ env.ci_script }}
|
||||||
working-directory: ${{ inputs.frontend_directory }}
|
working-directory: ${{ inputs.frontend_directory }}
|
||||||
|
|
||||||
- name: Typecheck
|
- name: JS Checks & Production Build
|
||||||
run: ${{ inputs.js_package_manager }} run check-typings
|
uses: flarum/action-build@3
|
||||||
working-directory: ${{ inputs.frontend_directory }}
|
|
||||||
|
|
||||||
type-coverage:
|
|
||||||
name: Type Coverage
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: inputs.enable_typescript
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: ${{ inputs.node_version }}
|
|
||||||
cache: ${{ inputs.js_package_manager }}
|
|
||||||
cache-dependency-path: ${{ env.cache_dependency_path }}
|
|
||||||
|
|
||||||
- name: Install JS dependencies
|
|
||||||
run: ${{ env.ci_script }}
|
|
||||||
working-directory: ${{ inputs.frontend_directory }}
|
|
||||||
|
|
||||||
- name: Check type coverage
|
|
||||||
run: ${{ inputs.js_package_manager }} run check-typings-coverage
|
|
||||||
working-directory: ${{ inputs.frontend_directory }}
|
|
||||||
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: "always() && !contains(needs.*.result, 'failed') && !contains(needs.*.result, 'cancelled')"
|
|
||||||
needs: [bundlewatch, prettier, typecheck, type-coverage]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: ${{ inputs.node_version }}
|
|
||||||
cache: ${{ inputs.js_package_manager }}
|
|
||||||
cache-dependency-path: ${{ env.cache_dependency_path }}
|
|
||||||
|
|
||||||
# Our action will install npm/yarn, cd into `${{ inputs.frontend_directory }}`, build dist JS and typings,
|
|
||||||
# then commit and upload any changes iff we are on the main branch and have just pushed.
|
|
||||||
- name: Build production JS
|
|
||||||
if: inputs.enable_typescript
|
|
||||||
uses: flarum/action-build@2
|
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
build_script: build
|
build_script: ${{ inputs.build_script }}
|
||||||
package_manager: ${{ inputs.js_package_manager }}
|
build_typings_script: ${{ inputs.build_typings_script }}
|
||||||
typings_script: build-typings
|
format_script: ${{ inputs.enable_prettier == true && inputs.format_script || '' }}
|
||||||
js_path: ${{ inputs.frontend_directory }}
|
check_typings_script: ${{ inputs.enable_typescript == true && inputs.check_typings_script || '' }}
|
||||||
do_not_commit: ${{ github.ref != format('refs/heads/{0}', inputs.main_git_branch) || github.event_name != 'push' }}
|
type_coverage_script: ${{ inputs.enable_typescript == true && inputs.type_coverage_script || '' }}
|
||||||
|
|
||||||
# Our action will install npm/yarn, cd into `${{ inputs.frontend_directory }}`, build dist JS and typings,
|
|
||||||
# then commit and upload any changes iff we are on the main branch and have just pushed.
|
|
||||||
- name: Build production JS
|
|
||||||
if: "! inputs.enable_typescript"
|
|
||||||
uses: flarum/action-build@2
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
build_script: build
|
|
||||||
package_manager: ${{ inputs.js_package_manager }}
|
package_manager: ${{ inputs.js_package_manager }}
|
||||||
js_path: ${{ inputs.frontend_directory }}
|
js_path: ${{ inputs.frontend_directory }}
|
||||||
do_not_commit: ${{ github.ref != format('refs/heads/{0}', inputs.main_git_branch) || github.event_name != 'push' }}
|
do_not_commit: ${{ github.ref != format('refs/heads/{0}', inputs.main_git_branch) || github.event_name != 'push' }}
|
||||||
|
|
||||||
|
- name: Check bundle size change
|
||||||
|
if: ${{ inputs.enable_bundlewatch }}
|
||||||
|
run: node_modules/.bin/bundlewatch --config .bundlewatch.config.json
|
||||||
|
working-directory: ${{ inputs.frontend_directory }}
|
||||||
|
env:
|
||||||
|
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.bundlewatch_github_token }}
|
||||||
|
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
|
||||||
|
20
.github/workflows/flarum-akismet-frontend.yml
vendored
20
.github/workflows/flarum-akismet-frontend.yml
vendored
@@ -1,20 +0,0 @@
|
|||||||
name: Akismet JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: ./.github/workflows/REUSABLE_frontend.yml
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: true
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/akismet/js
|
|
||||||
backend_directory: ./extensions/akismet
|
|
||||||
js_package_manager: yarn
|
|
||||||
cache_dependency_path: ./yarn.lock
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
20
.github/workflows/flarum-approval-frontend.yml
vendored
20
.github/workflows/flarum-approval-frontend.yml
vendored
@@ -1,20 +0,0 @@
|
|||||||
name: Approval JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: ./.github/workflows/REUSABLE_frontend.yml
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/approval/js
|
|
||||||
backend_directory: ./extensions/approval
|
|
||||||
js_package_manager: yarn
|
|
||||||
cache_dependency_path: ./yarn.lock
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
20
.github/workflows/flarum-embed-frontend.yml
vendored
20
.github/workflows/flarum-embed-frontend.yml
vendored
@@ -1,20 +0,0 @@
|
|||||||
name: Embed JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: ./.github/workflows/REUSABLE_frontend.yml
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/embed/js
|
|
||||||
backend_directory: ./extensions/embed
|
|
||||||
js_package_manager: yarn
|
|
||||||
cache_dependency_path: ./yarn.lock
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
20
.github/workflows/flarum-emoji-frontend.yml
vendored
20
.github/workflows/flarum-emoji-frontend.yml
vendored
@@ -1,20 +0,0 @@
|
|||||||
name: Emoji JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: ./.github/workflows/REUSABLE_frontend.yml
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/emoji/js
|
|
||||||
backend_directory: ./extensions/emoji
|
|
||||||
js_package_manager: yarn
|
|
||||||
cache_dependency_path: ./yarn.lock
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
20
.github/workflows/flarum-flags-frontend.yml
vendored
20
.github/workflows/flarum-flags-frontend.yml
vendored
@@ -1,20 +0,0 @@
|
|||||||
name: Flags JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: ./.github/workflows/REUSABLE_frontend.yml
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: true
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/flags/js
|
|
||||||
backend_directory: ./extensions/flags
|
|
||||||
js_package_manager: yarn
|
|
||||||
cache_dependency_path: ./yarn.lock
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
20
.github/workflows/flarum-likes-frontend.yml
vendored
20
.github/workflows/flarum-likes-frontend.yml
vendored
@@ -1,20 +0,0 @@
|
|||||||
name: Likes JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: ./.github/workflows/REUSABLE_frontend.yml
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/likes/js
|
|
||||||
backend_directory: ./extensions/likes
|
|
||||||
js_package_manager: yarn
|
|
||||||
cache_dependency_path: ./yarn.lock
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
20
.github/workflows/flarum-lock-frontend.yml
vendored
20
.github/workflows/flarum-lock-frontend.yml
vendored
@@ -1,20 +0,0 @@
|
|||||||
name: Lock JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: ./.github/workflows/REUSABLE_frontend.yml
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/lock/js
|
|
||||||
backend_directory: ./extensions/lock
|
|
||||||
js_package_manager: yarn
|
|
||||||
cache_dependency_path: ./yarn.lock
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
20
.github/workflows/flarum-markdown-frontend.yml
vendored
20
.github/workflows/flarum-markdown-frontend.yml
vendored
@@ -1,20 +0,0 @@
|
|||||||
name: Markdown JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: ./.github/workflows/REUSABLE_frontend.yml
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/markdown/js
|
|
||||||
backend_directory: ./extensions/markdown
|
|
||||||
js_package_manager: yarn
|
|
||||||
cache_dependency_path: ./yarn.lock
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
20
.github/workflows/flarum-mentions-frontend.yml
vendored
20
.github/workflows/flarum-mentions-frontend.yml
vendored
@@ -1,20 +0,0 @@
|
|||||||
name: Mentions JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: ./.github/workflows/REUSABLE_frontend.yml
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/mentions/js
|
|
||||||
backend_directory: ./extensions/mentions
|
|
||||||
js_package_manager: yarn
|
|
||||||
cache_dependency_path: ./yarn.lock
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
20
.github/workflows/flarum-nicknames-frontend.yml
vendored
20
.github/workflows/flarum-nicknames-frontend.yml
vendored
@@ -1,20 +0,0 @@
|
|||||||
name: Nicknames JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: ./.github/workflows/REUSABLE_frontend.yml
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/nicknames/js
|
|
||||||
backend_directory: ./extensions/nicknames
|
|
||||||
js_package_manager: yarn
|
|
||||||
cache_dependency_path: ./yarn.lock
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
@@ -1,20 +0,0 @@
|
|||||||
name: Package Manager JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: ./.github/workflows/REUSABLE_frontend.yml
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: true
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/package-manager/js
|
|
||||||
backend_directory: ./extensions/package-manager
|
|
||||||
js_package_manager: yarn
|
|
||||||
cache_dependency_path: ./yarn.lock
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
20
.github/workflows/flarum-pusher-frontend.yml
vendored
20
.github/workflows/flarum-pusher-frontend.yml
vendored
@@ -1,20 +0,0 @@
|
|||||||
name: Pusher JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: ./.github/workflows/REUSABLE_frontend.yml
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: true
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/pusher/js
|
|
||||||
backend_directory: ./extensions/pusher
|
|
||||||
js_package_manager: yarn
|
|
||||||
cache_dependency_path: ./yarn.lock
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
20
.github/workflows/flarum-statistics-frontend.yml
vendored
20
.github/workflows/flarum-statistics-frontend.yml
vendored
@@ -1,20 +0,0 @@
|
|||||||
name: Statistics JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: ./.github/workflows/REUSABLE_frontend.yml
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: true
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/statistics/js
|
|
||||||
backend_directory: ./extensions/statistics
|
|
||||||
js_package_manager: yarn
|
|
||||||
cache_dependency_path: ./yarn.lock
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
20
.github/workflows/flarum-sticky-frontend.yml
vendored
20
.github/workflows/flarum-sticky-frontend.yml
vendored
@@ -1,20 +0,0 @@
|
|||||||
name: Sticky JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: ./.github/workflows/REUSABLE_frontend.yml
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/sticky/js
|
|
||||||
backend_directory: ./extensions/sticky
|
|
||||||
js_package_manager: yarn
|
|
||||||
cache_dependency_path: ./yarn.lock
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
@@ -1,20 +0,0 @@
|
|||||||
name: Subscriptions JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: ./.github/workflows/REUSABLE_frontend.yml
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/subscriptions/js
|
|
||||||
backend_directory: ./extensions/subscriptions
|
|
||||||
js_package_manager: yarn
|
|
||||||
cache_dependency_path: ./yarn.lock
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
20
.github/workflows/flarum-suspend-frontend.yml
vendored
20
.github/workflows/flarum-suspend-frontend.yml
vendored
@@ -1,20 +0,0 @@
|
|||||||
name: Suspend JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: ./.github/workflows/REUSABLE_frontend.yml
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/suspend/js
|
|
||||||
backend_directory: ./extensions/suspend
|
|
||||||
js_package_manager: yarn
|
|
||||||
cache_dependency_path: ./yarn.lock
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
19
.github/workflows/flarum-tags-frontend.yml
vendored
19
.github/workflows/flarum-tags-frontend.yml
vendored
@@ -1,19 +0,0 @@
|
|||||||
name: Tags JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: ./.github/workflows/REUSABLE_frontend.yml
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: true
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/tags/js
|
|
||||||
backend_directory: ./extensions/tags
|
|
||||||
js_package_manager: yarn
|
|
||||||
cache_dependency_path: ./yarn.lock
|
|
||||||
main_git_branch: main
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
@@ -1,4 +1,4 @@
|
|||||||
name: Core JS
|
name: Framework JS
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
@@ -6,12 +6,8 @@ jobs:
|
|||||||
run:
|
run:
|
||||||
uses: ./.github/workflows/REUSABLE_frontend.yml
|
uses: ./.github/workflows/REUSABLE_frontend.yml
|
||||||
with:
|
with:
|
||||||
enable_bundlewatch: true
|
frontend_directory: ./
|
||||||
enable_prettier: true
|
backend_directory: ./
|
||||||
enable_typescript: true
|
|
||||||
|
|
||||||
frontend_directory: ./framework/core/js
|
|
||||||
backend_directory: ./framework/core
|
|
||||||
js_package_manager: yarn
|
js_package_manager: yarn
|
||||||
cache_dependency_path: ./yarn.lock
|
cache_dependency_path: ./yarn.lock
|
||||||
main_git_branch: main
|
main_git_branch: main
|
@@ -9,11 +9,11 @@
|
|||||||
"analyze": "cross-env ANALYZER=true yarn run build",
|
"analyze": "cross-env ANALYZER=true yarn run build",
|
||||||
"format": "prettier --write src",
|
"format": "prettier --write src",
|
||||||
"format-check": "prettier --check src",
|
"format-check": "prettier --check src",
|
||||||
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
|
|
||||||
"check-typings-coverage": "typescript-coverage-report",
|
|
||||||
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
|
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
|
||||||
"build-typings": "yarn run clean-typings && ([ -e src/@types ] && cp -r src/@types dist-typings/@types || true) && tsc && yarn run post-build-typings",
|
"build-typings": "yarn run clean-typings && ([ -e src/@types ] && cp -r src/@types dist-typings/@types || true) && tsc && yarn run post-build-typings",
|
||||||
"post-build-typings": "find dist-typings -type f -name '*.d.ts' -print0 | xargs -0 sed -i 's,../src/@types,@types,g'"
|
"post-build-typings": "find dist-typings -type f -name '*.d.ts' -print0 | xargs -0 sed -i 's,../src/@types,@types,g'",
|
||||||
|
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
|
||||||
|
"check-typings-coverage": "typescript-coverage-report"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@flarum/prettier-config": "^1.0.0",
|
"@flarum/prettier-config": "^1.0.0",
|
||||||
|
@@ -4,13 +4,18 @@
|
|||||||
// This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder
|
// This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder
|
||||||
// and also tells your Typescript server to read core's global typings for
|
// and also tells your Typescript server to read core's global typings for
|
||||||
// access to `dayjs` and `$` in the global namespace.
|
// access to `dayjs` and `$` in the global namespace.
|
||||||
"include": ["src/**/*", "../vendor/*/*/js/dist-typings/@types/**/*", "@types/**/*"],
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"../../../framework/core/js/dist-typings/@types/**/*",
|
||||||
|
"../../flags/js/dist-typings/@types/**/*",
|
||||||
|
"@types/**/*"
|
||||||
|
],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
// This will output typings to `dist-typings`
|
// This will output typings to `dist-typings`
|
||||||
"declarationDir": "./dist-typings",
|
"declarationDir": "./dist-typings",
|
||||||
"paths": {
|
"paths": {
|
||||||
"flarum/*": ["../vendor/flarum/core/js/dist-typings/*"],
|
"flarum/*": ["../../../framework/core/js/dist-typings/*"],
|
||||||
"flarum/flags/*": ["../vendor/flarum/flags/js/dist-typings/*"]
|
"flarum/flags/*": ["../../flags/js/dist-typings/*"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -22,10 +22,6 @@
|
|||||||
"build": "webpack --mode production",
|
"build": "webpack --mode production",
|
||||||
"format": "prettier --write src",
|
"format": "prettier --write src",
|
||||||
"format-check": "prettier --check src",
|
"format-check": "prettier --check src",
|
||||||
"analyze": "cross-env ANALYZER=true yarn run build",
|
"analyze": "cross-env ANALYZER=true yarn run build"
|
||||||
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
|
|
||||||
"build-typings": "npm run clean-typings && cp -r src/@types dist-typings/@types && tsc",
|
|
||||||
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
|
|
||||||
"check-typings-coverage": "typescript-coverage-report"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -17,13 +17,13 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "webpack --mode development --watch",
|
"dev": "webpack --mode development --watch",
|
||||||
"build": "webpack --mode production",
|
"build": "webpack --mode production",
|
||||||
|
"analyze": "cross-env ANALYZER=true yarn run build",
|
||||||
"format": "prettier --write src",
|
"format": "prettier --write src",
|
||||||
"format-check": "prettier --check src",
|
"format-check": "prettier --check src",
|
||||||
"analyze": "cross-env ANALYZER=true yarn run build",
|
|
||||||
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
|
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
|
||||||
"build-typings": "yarn run clean-typings && ([ -e src/@types ] && cp -r src/@types dist-typings/@types || true) && tsc && yarn run post-build-typings",
|
"build-typings": "yarn run clean-typings && ([ -e src/@types ] && cp -r src/@types dist-typings/@types || true) && tsc && yarn run post-build-typings",
|
||||||
|
"post-build-typings": "find dist-typings -type f -name '*.d.ts' -print0 | xargs -0 sed -i 's,../src/@types,@types,g'",
|
||||||
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
|
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
|
||||||
"check-typings-coverage": "typescript-coverage-report",
|
"check-typings-coverage": "typescript-coverage-report"
|
||||||
"post-build-typings": "find dist-typings -type f -name '*.d.ts' -print0 | xargs -0 sed -i 's,../src/@types,@types,g'"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -4,13 +4,13 @@
|
|||||||
// This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder
|
// This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder
|
||||||
// and also tells your Typescript server to read core's global typings for
|
// and also tells your Typescript server to read core's global typings for
|
||||||
// access to `dayjs` and `$` in the global namespace.
|
// access to `dayjs` and `$` in the global namespace.
|
||||||
"include": ["src/**/*", "../vendor/*/*/js/dist-typings/@types/**/*", "@types/**/*"],
|
"include": ["src/**/*", "../../../*/*/js/dist-typings/@types/**/*", "@types/**/*"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
// This will output typings to `dist-typings`
|
// This will output typings to `dist-typings`
|
||||||
"declarationDir": "./dist-typings",
|
"declarationDir": "./dist-typings",
|
||||||
"paths": {
|
"paths": {
|
||||||
"flarum/*": ["../vendor/flarum/core/js/dist-typings/*"],
|
"flarum/*": ["../../../framework/core/js/dist-typings/*"],
|
||||||
"@flarum/core/*": ["../vendor/flarum/core/js/dist-typings/*"]
|
"@flarum/core/*": ["../../../framework/core/js/dist-typings/*"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -18,10 +18,6 @@
|
|||||||
"build": "webpack --mode production",
|
"build": "webpack --mode production",
|
||||||
"format": "prettier --write src",
|
"format": "prettier --write src",
|
||||||
"format-check": "prettier --check src",
|
"format-check": "prettier --check src",
|
||||||
"analyze": "cross-env ANALYZER=true yarn run build",
|
"analyze": "cross-env ANALYZER=true yarn run build"
|
||||||
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
|
|
||||||
"build-typings": "npm run clean-typings && cp -r src/@types dist-typings/@types && tsc",
|
|
||||||
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
|
|
||||||
"check-typings-coverage": "typescript-coverage-report"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,12 +16,12 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "webpack --mode development --watch",
|
"dev": "webpack --mode development --watch",
|
||||||
"build": "webpack --mode production",
|
"build": "webpack --mode production",
|
||||||
|
"analyze": "cross-env ANALYZER=true yarn run build",
|
||||||
"format": "prettier --write src",
|
"format": "prettier --write src",
|
||||||
"format-check": "prettier --check src",
|
"format-check": "prettier --check src",
|
||||||
"ci": "yarn install --immutable --immutable-cache",
|
|
||||||
"analyze": "cross-env ANALYZER=true yarn run build",
|
|
||||||
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
|
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
|
||||||
"build-typings": "yarn run clean-typings && tsc && [ -e src/@types ] && cp -r src/@types dist-typings/@types",
|
"build-typings": "yarn run clean-typings && ([ -e src/@types ] && cp -r src/@types dist-typings/@types || true) && tsc && yarn run post-build-typings",
|
||||||
|
"post-build-typings": "find dist-typings -type f -name '*.d.ts' -print0 | xargs -0 sed -i 's,../src/@types,@types,g'",
|
||||||
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
|
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
|
||||||
"check-typings-coverage": "typescript-coverage-report"
|
"check-typings-coverage": "typescript-coverage-report"
|
||||||
},
|
},
|
||||||
|
@@ -4,13 +4,13 @@
|
|||||||
// This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder
|
// This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder
|
||||||
// and also tells your Typescript server to read core's global typings for
|
// and also tells your Typescript server to read core's global typings for
|
||||||
// access to `dayjs` and `$` in the global namespace.
|
// access to `dayjs` and `$` in the global namespace.
|
||||||
"include": ["src/**/*", "../vendor/flarum/core/js/dist-typings/@types/**/*", "@types/**/*"],
|
"include": ["src/**/*", "../../../framework/core/js/dist-typings/@types/**/*", "@types/**/*"],
|
||||||
"files": ["src/admin/shims.d.ts"],
|
"files": ["src/admin/shims.d.ts"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
// This will output typings to `dist-typings`
|
// This will output typings to `dist-typings`
|
||||||
"declarationDir": "./dist-typings",
|
"declarationDir": "./dist-typings",
|
||||||
"paths": {
|
"paths": {
|
||||||
"flarum/*": ["../vendor/flarum/core/js/dist-typings/*"]
|
"flarum/*": ["../../../framework/core/js/dist-typings/*"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -11,9 +11,9 @@
|
|||||||
"format-check": "prettier --check src",
|
"format-check": "prettier --check src",
|
||||||
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
|
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
|
||||||
"build-typings": "yarn run clean-typings && ([ -e src/@types ] && cp -r src/@types dist-typings/@types || true) && tsc && yarn run post-build-typings",
|
"build-typings": "yarn run clean-typings && ([ -e src/@types ] && cp -r src/@types dist-typings/@types || true) && tsc && yarn run post-build-typings",
|
||||||
|
"post-build-typings": "find dist-typings -type f -name '*.d.ts' -print0 | xargs -0 sed -i 's,../src/@types,@types,g'",
|
||||||
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
|
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
|
||||||
"check-typings-coverage": "typescript-coverage-report",
|
"check-typings-coverage": "typescript-coverage-report"
|
||||||
"post-build-typings": "find dist-typings -type f -name '*.d.ts' -print0 | xargs -0 sed -i 's,../src/@types,@types,g'"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@flarum/prettier-config": "^1.0.0",
|
"@flarum/prettier-config": "^1.0.0",
|
||||||
|
@@ -4,13 +4,13 @@
|
|||||||
// This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder
|
// This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder
|
||||||
// and also tells your Typescript server to read core's global typings for
|
// and also tells your Typescript server to read core's global typings for
|
||||||
// access to `dayjs` and `$` in the global namespace.
|
// access to `dayjs` and `$` in the global namespace.
|
||||||
"include": ["src/**/*", "../vendor/*/*/js/dist-typings/@types/**/*", "@types/**/*"],
|
"include": ["src/**/*", "../../../*/*/js/dist-typings/@types/**/*", "@types/**/*"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
// This will output typings to `dist-typings`
|
// This will output typings to `dist-typings`
|
||||||
"declarationDir": "./dist-typings",
|
"declarationDir": "./dist-typings",
|
||||||
"paths": {
|
"paths": {
|
||||||
"flarum/*": ["../vendor/flarum/core/js/dist-typings/*"],
|
"flarum/*": ["../../../framework/core/js/dist-typings/*"],
|
||||||
"flarum/tags/*": ["../vendor/flarum/tags/js/dist-typings/*"]
|
"flarum/tags/*": ["../../tags/js/dist-typings/*"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,14 +20,13 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "webpack --mode development --watch",
|
"dev": "webpack --mode development --watch",
|
||||||
"build": "webpack --mode production",
|
"build": "webpack --mode production",
|
||||||
|
"analyze": "cross-env ANALYZER=true yarn run build",
|
||||||
"format": "prettier --write src",
|
"format": "prettier --write src",
|
||||||
"format-check": "prettier --check src",
|
"format-check": "prettier --check src",
|
||||||
"analyze": "cross-env ANALYZER=true yarn run build",
|
|
||||||
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
|
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
|
||||||
"build-typings": "yarn run clean-typings && ([ -e src/@types ] && cp -r src/@types dist-typings/@types || true) && tsc && yarn run post-build-typings",
|
"build-typings": "yarn run clean-typings && ([ -e src/@types ] && cp -r src/@types dist-typings/@types || true) && tsc && yarn run post-build-typings",
|
||||||
|
"post-build-typings": "find dist-typings -type f -name '*.d.ts' -print0 | xargs -0 sed -i 's,../src/@types,@types,g'",
|
||||||
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
|
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
|
||||||
"check-typings-coverage": "typescript-coverage-report",
|
"check-typings-coverage": "typescript-coverage-report"
|
||||||
"ci": "yarn install --immutable --immutable-cache",
|
|
||||||
"post-build-typings": "find dist-typings -type f -name '*.d.ts' -print0 | xargs -0 sed -i 's,../src/@types,@types,g'"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -4,12 +4,12 @@
|
|||||||
// This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder
|
// This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder
|
||||||
// and also tells your Typescript server to read core's global typings for
|
// and also tells your Typescript server to read core's global typings for
|
||||||
// access to `dayjs` and `$` in the global namespace.
|
// access to `dayjs` and `$` in the global namespace.
|
||||||
"include": ["src/**/*", "../vendor/flarum/core/js/dist-typings/@types/**/*", "@types/**/*"],
|
"include": ["src/**/*", "../../../framework/core/js/dist-typings/@types/**/*", "@types/**/*"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
// This will output typings to `dist-typings`
|
// This will output typings to `dist-typings`
|
||||||
"declarationDir": "./dist-typings",
|
"declarationDir": "./dist-typings",
|
||||||
"paths": {
|
"paths": {
|
||||||
"flarum/*": ["../vendor/flarum/core/js/dist-typings/*"]
|
"flarum/*": ["../../../framework/core/js/dist-typings/*"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -10,13 +10,13 @@
|
|||||||
"dev": "webpack --mode development --watch",
|
"dev": "webpack --mode development --watch",
|
||||||
"build": "webpack --mode production",
|
"build": "webpack --mode production",
|
||||||
"analyze": "cross-env ANALYZER=true yarn run build",
|
"analyze": "cross-env ANALYZER=true yarn run build",
|
||||||
|
"format": "prettier --write src",
|
||||||
|
"format-check": "prettier --check src",
|
||||||
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
|
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
|
||||||
"build-typings": "yarn run clean-typings && ([ -e src/@types ] && cp -r src/@types dist-typings/@types || true) && tsc && yarn run post-build-typings",
|
"build-typings": "yarn run clean-typings && ([ -e src/@types ] && cp -r src/@types dist-typings/@types || true) && tsc && yarn run post-build-typings",
|
||||||
"post-build-typings": "find dist-typings -type f -name '*.d.ts' -print0 | xargs -0 sed -i 's,../src/@types,@types,g'",
|
"post-build-typings": "find dist-typings -type f -name '*.d.ts' -print0 | xargs -0 sed -i 's,../src/@types,@types,g'",
|
||||||
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
|
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
|
||||||
"check-typings-coverage": "typescript-coverage-report",
|
"check-typings-coverage": "typescript-coverage-report"
|
||||||
"format": "prettier --write src",
|
|
||||||
"format-check": "prettier --check src"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"flarum-tsconfig": "^1.0.2",
|
"flarum-tsconfig": "^1.0.2",
|
||||||
|
@@ -4,17 +4,17 @@
|
|||||||
// This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder
|
// This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder
|
||||||
// and also tells your Typescript server to read core's global typings for
|
// and also tells your Typescript server to read core's global typings for
|
||||||
// access to `dayjs` and `$` in the global namespace.
|
// access to `dayjs` and `$` in the global namespace.
|
||||||
"include": ["src/**/*", "../vendor/flarum/core/js/dist-typings/@types/**/*", "@types/**/*"],
|
"include": ["src/**/*", "../../../framework/core/js/dist-typings/@types/**/*", "@types/**/*"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
// This will output typings to `dist-typings`
|
// This will output typings to `dist-typings`
|
||||||
"declarationDir": "./dist-typings",
|
"declarationDir": "./dist-typings",
|
||||||
"paths": {
|
"paths": {
|
||||||
"flarum/*": ["../vendor/flarum/core/js/dist-typings/*"],
|
"flarum/*": ["../../../framework/core/js/dist-typings/*"],
|
||||||
// TODO: remove after export registry system implemented
|
// TODO: remove after export registry system implemented
|
||||||
// Without this, the old-style `@flarum/core` import is resolved to
|
// Without this, the old-style `@flarum/core` import is resolved to
|
||||||
// source code in flarum/core instead of the dist typings.
|
// source code in flarum/core instead of the dist typings.
|
||||||
// This causes an inaccurate "duplicate export" error.
|
// This causes an inaccurate "duplicate export" error.
|
||||||
"@flarum/core/*": ["../vendor/flarum/core/js/dist-typings/*"],
|
"@flarum/core/*": ["../../../framework/core/js/dist-typings/*"],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user