Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neronmoon/scriptsdev
Scripts-dev directive for composer
https://github.com/neronmoon/scriptsdev
composer php scripts
Last synced: 4 days ago
JSON representation
Scripts-dev directive for composer
- Host: GitHub
- URL: https://github.com/neronmoon/scriptsdev
- Owner: neronmoon
- License: mit
- Created: 2015-11-06T01:31:38.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-12-16T08:02:30.000Z (about 4 years ago)
- Last Synced: 2025-01-01T12:10:58.913Z (11 days ago)
- Topics: composer, php, scripts
- Language: PHP
- Size: 33.2 KB
- Stars: 69
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-composer - ScriptsDev - Enables you to use a `scripts-dev` section, which triggers scripts only in dev mode. (Scripts / Support)
README
# scriptsdev for [Composer](https://github.com/composer/composer) [![Build Status](https://travis-ci.org/neronmoon/scriptsdev.svg?branch=master)](https://travis-ci.org/neronmoon/scriptsdev)
It's like require-dev, but for scripts
## Installation
Just run `composer require neronmoon/scriptsdev --dev`## Usage
After installing you able to add extra.scripts-dev directive in your `composer.json`
```json
...
"extra": {
"scripts-dev": {
"post-install-cmd": [
"npm install --dev"
],
"post-update-cmd": "php ./someCoolCommand.php",
"test": "phpunit"
},
}
...
```## Deprecated Usage
```json
...
"scripts-dev": {
"post-install-cmd": [
"npm install --dev"
],
"post-update-cmd": "php ./someCoolCommand.php"
}
...
```## Known issues
- Usage of this plugin will cause minor warning of validation process.
`composer validate` command will display something like this.
```
./composer.json is valid, but with a few warnings
See https://getcomposer.org/doc/04-schema.md for details on the schema
Description for non-existent script "test" found in "scripts-descriptions"
```