mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
chore: flarum-cli audit infra --fix
This commit is contained in:
@@ -15,5 +15,5 @@ indent_size = 2
|
|||||||
[*.{diff,md}]
|
[*.{diff,md}]
|
||||||
trim_trailing_whitespace = false
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
[*.php]
|
[*.{php,xml,json}]
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
15
extensions/markdown/.gitattributes
vendored
15
extensions/markdown/.gitattributes
vendored
@@ -1,3 +1,18 @@
|
|||||||
.gitattributes export-ignore
|
.gitattributes export-ignore
|
||||||
.gitignore export-ignore
|
.gitignore export-ignore
|
||||||
|
.gitmodules export-ignore
|
||||||
|
.github export-ignore
|
||||||
|
.travis export-ignore
|
||||||
.travis.yml export-ignore
|
.travis.yml export-ignore
|
||||||
|
.editorconfig export-ignore
|
||||||
|
.styleci.yml export-ignore
|
||||||
|
|
||||||
|
phpunit.xml export-ignore
|
||||||
|
tests export-ignore
|
||||||
|
|
||||||
|
js/dist/* -diff
|
||||||
|
js/dist/* linguist-generated
|
||||||
|
js/dist-typings/* linguist-generated
|
||||||
|
js/yarn.lock -diff
|
||||||
|
|
||||||
|
* text=auto eol=lf
|
||||||
|
15
extensions/markdown/.github/workflows/backend.yml
vendored
Normal file
15
extensions/markdown/.github/workflows/backend.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
name: Markdown PHP
|
||||||
|
|
||||||
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
|
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
||||||
|
# This will break your current script.
|
||||||
|
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run:
|
||||||
|
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
||||||
|
with:
|
||||||
|
enable_backend_testing: false
|
||||||
|
|
||||||
|
backend_directory: .
|
135
extensions/markdown/.github/workflows/build.yml
vendored
135
extensions/markdown/.github/workflows/build.yml
vendored
@@ -1,135 +0,0 @@
|
|||||||
name: JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
env:
|
|
||||||
NODE_VERSION: 16
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
prettier:
|
|
||||||
name: Prettier
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: ${{ env.NODE_VERSION }}
|
|
||||||
cache: "yarn"
|
|
||||||
cache-dependency-path: js/yarn.lock
|
|
||||||
|
|
||||||
- name: Install JS dependencies
|
|
||||||
run: yarn install --immutable
|
|
||||||
working-directory: ./js
|
|
||||||
|
|
||||||
- name: Check JS formatting
|
|
||||||
run: yarn run format-check
|
|
||||||
working-directory: ./js
|
|
||||||
|
|
||||||
# typecheck:
|
|
||||||
# name: Typecheck
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
# steps:
|
|
||||||
# - name: Check out code
|
|
||||||
# uses: actions/checkout@v2
|
|
||||||
|
|
||||||
# - name: Set up Node
|
|
||||||
# uses: actions/setup-node@v2
|
|
||||||
# with:
|
|
||||||
# node-version: ${{ env.NODE_VERSION }}
|
|
||||||
# cache: "yarn"
|
|
||||||
# cache-dependency-path: js/yarn.lock
|
|
||||||
|
|
||||||
# - name: Install JS dependencies
|
|
||||||
# run: yarn --frozen-lockfile
|
|
||||||
# working-directory: ./js
|
|
||||||
|
|
||||||
# - name: Typecheck
|
|
||||||
# run: yarn run check-typings
|
|
||||||
# working-directory: ./js
|
|
||||||
|
|
||||||
# type-coverage:
|
|
||||||
# name: Type Coverage
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
# steps:
|
|
||||||
# - name: Check out code
|
|
||||||
# uses: actions/checkout@v2
|
|
||||||
|
|
||||||
# - name: Set up Node
|
|
||||||
# uses: actions/setup-node@v2
|
|
||||||
# with:
|
|
||||||
# node-version: ${{ env.NODE_VERSION }}
|
|
||||||
# cache: "yarn"
|
|
||||||
# cache-dependency-path: js/yarn.lock
|
|
||||||
|
|
||||||
# - name: Install JS dependencies
|
|
||||||
# run: yarn --frozen-lockfile
|
|
||||||
# working-directory: ./js
|
|
||||||
|
|
||||||
# - name: Check type coverage
|
|
||||||
# run: yarn run check-typings-coverage
|
|
||||||
# working-directory: ./js
|
|
||||||
|
|
||||||
build-prod:
|
|
||||||
name: Build and commit
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [prettier]
|
|
||||||
|
|
||||||
# Only commit JS on push to master branch
|
|
||||||
# Remember to change in `build-test` job too
|
|
||||||
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: ${{ env.NODE_VERSION }}
|
|
||||||
cache: "yarn"
|
|
||||||
cache-dependency-path: js/yarn.lock
|
|
||||||
|
|
||||||
# Our action will install npm, cd into `./js`, run `npm run build`,
|
|
||||||
# then commit and upload any changes
|
|
||||||
- name: Build production JS
|
|
||||||
uses: flarum/action-build@2
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
build_script: build
|
|
||||||
package_manager: yarn
|
|
||||||
|
|
||||||
build-test:
|
|
||||||
name: Test build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [prettier]
|
|
||||||
|
|
||||||
# Inverse check of `build-prod`
|
|
||||||
# Remember to change in `build-prod` job too
|
|
||||||
if: github.ref != 'refs/heads/master' || github.event_name != 'push'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: ${{ env.NODE_VERSION }}
|
|
||||||
cache: "yarn"
|
|
||||||
cache-dependency-path: js/yarn.lock
|
|
||||||
|
|
||||||
# Our action will install npm, cd into `./js`, run `npm run build`,
|
|
||||||
# then commit and upload any changes
|
|
||||||
- name: Build production JS
|
|
||||||
uses: flarum/action-build@2
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
build_script: build
|
|
||||||
package_manager: yarn
|
|
||||||
do_not_commit: true
|
|
21
extensions/markdown/.github/workflows/frontend.yml
vendored
Normal file
21
extensions/markdown/.github/workflows/frontend.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
name: Markdown JS
|
||||||
|
|
||||||
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
|
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
||||||
|
# This will break your current script.
|
||||||
|
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run:
|
||||||
|
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
||||||
|
with:
|
||||||
|
enable_bundlewatch: false
|
||||||
|
enable_prettier: true
|
||||||
|
enable_typescript: false
|
||||||
|
|
||||||
|
frontend_directory: ./js
|
||||||
|
main_git_branch: master
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
20
extensions/markdown/.gitignore
vendored
20
extensions/markdown/.gitignore
vendored
@@ -1,16 +1,12 @@
|
|||||||
/vendor
|
/vendor
|
||||||
|
composer.lock
|
||||||
composer.phar
|
composer.phar
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
bower_components
|
tests/.phpunit.result.cache
|
||||||
node_modules
|
/tests/integration/tmp
|
||||||
composer.lock
|
.vagrant
|
||||||
|
.idea/*
|
||||||
# Yarn 2+
|
.vscode
|
||||||
js/.pnp.*
|
js/coverage-ts
|
||||||
js/.yarn/*
|
|
||||||
!js/.yarn/patches
|
|
||||||
!js/.yarn/plugins
|
|
||||||
!js/.yarn/releases
|
|
||||||
!js/.yarn/sdks
|
|
||||||
!js/.yarn/versions
|
|
||||||
|
@@ -1,41 +1,58 @@
|
|||||||
{
|
{
|
||||||
"name": "flarum/markdown",
|
"name": "flarum/markdown",
|
||||||
"description": "Allow posts to be formatted with Markdown.",
|
"description": "Allow posts to be formatted with Markdown.",
|
||||||
"type": "flarum-extension",
|
"type": "flarum-extension",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"formatting"
|
"formatting"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/flarum/core/issues",
|
"issues": "https://github.com/flarum/core/issues",
|
||||||
"source": "https://github.com/flarum/markdown",
|
"source": "https://github.com/flarum/markdown",
|
||||||
"forum": "https://discuss.flarum.org"
|
"forum": "https://discuss.flarum.org"
|
||||||
},
|
|
||||||
"homepage": "https://flarum.org",
|
|
||||||
"funding": [
|
|
||||||
{
|
|
||||||
"type": "website",
|
|
||||||
"url": "https://flarum.org/donate/"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"require": {
|
|
||||||
"flarum/core": "^1.1"
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.x-dev"
|
|
||||||
},
|
},
|
||||||
"flarum-extension": {
|
"homepage": "https://flarum.org",
|
||||||
"title": "Markdown",
|
"funding": [
|
||||||
"category": "feature",
|
{
|
||||||
"icon": {
|
"type": "website",
|
||||||
"image": "icon.svg",
|
"url": "https://flarum.org/donate/"
|
||||||
"backgroundColor": "#000",
|
}
|
||||||
"backgroundSize": "100%",
|
],
|
||||||
"backgroundRepeat": "no-repeat",
|
"require": {
|
||||||
"backgroundPosition": "center",
|
"flarum/core": "^1.1"
|
||||||
"color": "#fff"
|
},
|
||||||
}
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.x-dev"
|
||||||
|
},
|
||||||
|
"flarum-extension": {
|
||||||
|
"title": "Markdown",
|
||||||
|
"category": "feature",
|
||||||
|
"icon": {
|
||||||
|
"image": "icon.svg",
|
||||||
|
"backgroundColor": "#000",
|
||||||
|
"backgroundSize": "100%",
|
||||||
|
"backgroundRepeat": "no-repeat",
|
||||||
|
"backgroundPosition": "center",
|
||||||
|
"color": "#fff"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flarum-cli": {
|
||||||
|
"modules": {
|
||||||
|
"admin": false,
|
||||||
|
"forum": true,
|
||||||
|
"js": true,
|
||||||
|
"jsCommon": false,
|
||||||
|
"css": true,
|
||||||
|
"gitConf": true,
|
||||||
|
"githubActions": true,
|
||||||
|
"prettier": true,
|
||||||
|
"typescript": false,
|
||||||
|
"bundlewatch": false,
|
||||||
|
"backendTesting": false,
|
||||||
|
"editorConfig": true,
|
||||||
|
"styleci": true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
9
extensions/markdown/js/.gitignore
vendored
Normal file
9
extensions/markdown/js/.gitignore
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
.pnp.*
|
||||||
|
.yarn/*
|
||||||
|
!.yarn/patches
|
||||||
|
!.yarn/plugins
|
||||||
|
!.yarn/releases
|
||||||
|
!.yarn/sdks
|
||||||
|
!.yarn/versions
|
||||||
|
|
||||||
|
node_modules
|
@@ -1,2 +0,0 @@
|
|||||||
.yarn
|
|
||||||
dist
|
|
768
extensions/markdown/js/.yarn/releases/yarn-3.1.1.cjs
vendored
768
extensions/markdown/js/.yarn/releases/yarn-3.1.1.cjs
vendored
File diff suppressed because one or more lines are too long
@@ -1,3 +0,0 @@
|
|||||||
nodeLinker: node-modules
|
|
||||||
|
|
||||||
yarnPath: .yarn/releases/yarn-3.1.1.cjs
|
|
@@ -1,22 +1,26 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"name": "@flarum/markdown",
|
"name": "@flarum/markdown",
|
||||||
"prettier": "@flarum/prettier-config",
|
"prettier": "@flarum/prettier-config",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"flarum-webpack-config": "^2.0.0",
|
"flarum-webpack-config": "^2.0.0",
|
||||||
"webpack": "^5.65.0",
|
"webpack": "^5.65.0",
|
||||||
"webpack-cli": "^4.9.1"
|
"webpack-cli": "^4.9.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "webpack --mode development --watch",
|
"dev": "webpack --mode development --watch",
|
||||||
"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 build"
|
||||||
"packageManager": "yarn@3.1.1",
|
},
|
||||||
"devDependencies": {
|
"packageManager": "yarn@3.1.1",
|
||||||
"@flarum/prettier-config": "^1.0.0",
|
"devDependencies": {
|
||||||
"flarum-tsconfig": "^1.0.2",
|
"@flarum/prettier-config": "^1.0.0",
|
||||||
"prettier": "^2.5.1"
|
"flarum-tsconfig": "^1.0.2",
|
||||||
}
|
"prettier": "^2.5.1",
|
||||||
|
"flarum-webpack-config": "^2.0.0",
|
||||||
|
"webpack": "^5.65.0",
|
||||||
|
"webpack-cli": "^4.9.1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
// Use Flarum's tsconfig as a starting point
|
|
||||||
"extends": "flarum-tsconfig",
|
|
||||||
// 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
|
|
||||||
// access to `dayjs` and `$` in the global namespace.
|
|
||||||
"include": ["src/**/*", "../vendor/flarum/core/js/dist-typings/@types/**/*"],
|
|
||||||
"compilerOptions": {
|
|
||||||
// This will output typings to `dist-typings`
|
|
||||||
"declarationDir": "./dist-typings",
|
|
||||||
"baseUrl": ".",
|
|
||||||
"paths": {
|
|
||||||
"flarum/*": ["../vendor/flarum/core/js/dist-typings/*"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,3 +1 @@
|
|||||||
const config = require('flarum-webpack-config');
|
module.exports = require('flarum-webpack-config')();
|
||||||
|
|
||||||
module.exports = config();
|
|
||||||
|
Reference in New Issue
Block a user