mirror of
https://github.com/bs-community/blessing-skin-plugins.git
synced 2025-01-07 03:06:43 +08:00
move all plugins to "plugins" directory
This commit is contained in:
parent
77541cefef
commit
cd1676dd29
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,9 +1,10 @@
|
||||
.dist/*
|
||||
node_modules
|
||||
littleskin/
|
||||
*/vendor
|
||||
plugins/*/vendor
|
||||
plugin-test/
|
||||
*/assets/**/*.js
|
||||
plugins/*/assets/**/*.js
|
||||
plugins/*/assets/**/*.map
|
||||
.php_cs.cache
|
||||
composer.lock
|
||||
yarn-error.log
|
||||
|
@ -1,9 +1,7 @@
|
||||
<?php
|
||||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
->exclude('node_modules')
|
||||
->exclude('.git')
|
||||
->in(__DIR__)
|
||||
->in(__DIR__.'/plugins')
|
||||
;
|
||||
|
||||
return PhpCsFixer\Config::create()
|
||||
|
13
build.ps1
13
build.ps1
@ -23,7 +23,7 @@ function Get-Trans {
|
||||
$segment = $realKey.Split(".")
|
||||
$head = $segment[0]
|
||||
$filePath = if ($Plugin) {
|
||||
"./$Plugin/lang/$Lang/$head.yml"
|
||||
"./plugins/$Plugin/lang/$Lang/$head.yml"
|
||||
}
|
||||
else {
|
||||
"./lang/$Lang/$head.yml"
|
||||
@ -54,19 +54,19 @@ $env:NODE_ENV = 'production'
|
||||
git clone "https://github.com/bs-community/plugins-dist.git" .dist
|
||||
$registry = Get-Content '.dist/registry-preview.json' | ConvertFrom-Json
|
||||
$packages = $registry.packages
|
||||
$plugins = Get-ChildItem -Path . -Directory -Exclude @('node_modules', '.*') | ForEach-Object { $_.Name }
|
||||
$plugins = Get-ChildItem -Path ./plugins -Directory | ForEach-Object { $_.Name }
|
||||
|
||||
yarn build
|
||||
|
||||
[PSCustomObject[]]$updated = @()
|
||||
|
||||
foreach ($plugin in $plugins) {
|
||||
Set-Location $plugin
|
||||
Set-Location "./plugins/$plugin"
|
||||
$manifest = Get-Content "package.json" | ConvertFrom-Json
|
||||
$version = $manifest.version
|
||||
|
||||
if ($packages | Where-Object { $_.name -eq $plugin -and $_.version -eq $version }) {
|
||||
Set-Location '..'
|
||||
Set-Location '../../'
|
||||
continue
|
||||
}
|
||||
|
||||
@ -96,11 +96,14 @@ foreach ($plugin in $plugins) {
|
||||
|
||||
if (Test-Path 'composer.json') {
|
||||
composer install
|
||||
Remove-Item 'composer.json' -Force
|
||||
Remove-Item 'composer.lock' -Force
|
||||
}
|
||||
|
||||
Set-Location '..'
|
||||
|
||||
zip -9 -r ".dist/${plugin}_$version.zip" $plugin
|
||||
zip -9 -r "../.dist/${plugin}_$version.zip" $plugin
|
||||
Set-Location '..'
|
||||
}
|
||||
ConvertTo-Json $updated | Out-File -FilePath 'updated.json'
|
||||
|
||||
|
@ -45,6 +45,7 @@ $manifest = [PSCustomObject]@{
|
||||
}
|
||||
}
|
||||
|
||||
Set-Location ./plugins
|
||||
New-Item "./$Id/src" -ItemType Directory | Out-Null
|
||||
New-Item "./$Id/lang/en" -ItemType Directory | Out-Null
|
||||
New-Item "./$Id/lang/zh_CN" -ItemType Directory | Out-Null
|
||||
@ -64,3 +65,5 @@ if ($Asset) {
|
||||
if ($Lang) {
|
||||
New-Item "./$Id/lang" -ItemType Directory | Out-Null
|
||||
}
|
||||
|
||||
Set-Location ..
|
||||
|
10
gulpfile.ts
10
gulpfile.ts
@ -1,10 +0,0 @@
|
||||
import { src, dest, watch } from 'gulp'
|
||||
|
||||
export function copy() {
|
||||
const destPath = process.env.DEST || '../blessing-skin-server/public/plugins'
|
||||
return src('*/assets/**/*.*').pipe(dest(destPath))
|
||||
}
|
||||
|
||||
export function dev() {
|
||||
watch('*/assets/**/*.*', { ignoreInitial: false, ignored: ['**/*.ts'] }, copy)
|
||||
}
|
@ -5,8 +5,7 @@
|
||||
},
|
||||
"private": true,
|
||||
"workspaces": [
|
||||
"config-generator",
|
||||
"restricted-email-domains"
|
||||
"plugins/*"
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "webpack -d -w",
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user