Skip to content

Commit

Permalink
move all plugins to "plugins" directory
Browse files Browse the repository at this point in the history
  • Loading branch information
g-plane committed Jun 24, 2020
1 parent 77541ce commit cd1676d
Show file tree
Hide file tree
Showing 303 changed files with 27 additions and 563 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
4 changes: 1 addition & 3 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?php

$finder = PhpCsFixer\Finder::create()
->exclude('node_modules')
->exclude('.git')
->in(__DIR__)
->in(__DIR__.'/plugins')
;

return PhpCsFixer\Config::create()
Expand Down
13 changes: 8 additions & 5 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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'

Expand Down
3 changes: 3 additions & 0 deletions create.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -64,3 +65,5 @@ if ($Asset) {
if ($Lang) {
New-Item "./$Id/lang" -ItemType Directory | Out-Null
}

Set-Location ..
10 changes: 0 additions & 10 deletions gulpfile.ts

This file was deleted.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
},
"private": true,
"workspaces": [
"config-generator",
"restricted-email-domains"
"plugins/*"
],
"scripts": {
"dev": "webpack -d -w",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
110 changes: 0 additions & 110 deletions textures-aliyun-oss/composer.lock

This file was deleted.

Loading

0 comments on commit cd1676d

Please sign in to comment.