Skip to content

Commit fbe80c7

Browse files
committed
Add build step to composer for easy install
- Removes the 'assets' symlink - Copies the assets to the plugin on installation and update
1 parent 63ad44b commit fbe80c7

File tree

4 files changed

+21
-16
lines changed

4 files changed

+21
-16
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ phpcs.xml
1111
.phplint-cache
1212
*.zip
1313
*.tar.gz
14+
assets
1415

1516
## PhpStorm
1617
.idea/**/workspace.xml

assets

Lines changed: 0 additions & 1 deletion
This file was deleted.

composer.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@
5353
"overtrue/phplint": "^3.4"
5454
},
5555
"scripts": {
56+
"build": [
57+
"rm -rf assets && cp -r ./vendor/datakit/sdk/assets assets"
58+
],
5659
"suite": [
5760
"composer test",
5861
"composer linter",
@@ -65,10 +68,12 @@
6568
"format": "./vendor/bin/phpcbf --standard=phpcs.xml.dist --report-summary --report-source",
6669
"linter": "./vendor/bin/phplint --no-progress --no-cache -v",
6770
"post-install-cmd": [
68-
"composer dump-autoload -o"
71+
"composer dump-autoload -o",
72+
"@build"
6973
],
7074
"post-update-cmd": [
71-
"composer dump-autoload -o"
75+
"composer dump-autoload -o",
76+
"@build"
7277
]
7378
}
7479
}

composer.lock

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)