mirror of
https://github.com/Mibew/mibew_slack.git
synced 2024-11-15 00:34:20 +03:00
Updating gulp packages to include composer and vendor folder
This commit is contained in:
parent
d086f5fe5f
commit
5814fd3405
8
composer.json
Normal file
8
composer.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"require": {
|
||||
"maknz/slack": "^1.7"
|
||||
},
|
||||
"config": {
|
||||
"bin-dir": "bin"
|
||||
}
|
||||
}
|
38
gulpfile.js
38
gulpfile.js
@ -1,4 +1,7 @@
|
||||
var eventStream = require('event-stream'),
|
||||
var fs = require('fs'),
|
||||
https = require('https'),
|
||||
exec = require('child_process').exec,
|
||||
eventStream = require('event-stream'),
|
||||
gulp = require('gulp'),
|
||||
chmod = require('gulp-chmod'),
|
||||
zip = require('gulp-zip'),
|
||||
@ -6,7 +9,34 @@ var eventStream = require('event-stream'),
|
||||
gzip = require('gulp-gzip'),
|
||||
rename = require('gulp-rename');
|
||||
|
||||
gulp.task('prepare-release', function() {
|
||||
// Get and install PHP Composer
|
||||
gulp.task('get-composer', function(callback) {
|
||||
// Check if Composer already in place
|
||||
if (fs.existsSync('./composer.phar')) {
|
||||
callback(null);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Get installer from the internet
|
||||
https.get('https://getcomposer.org/installer', function(response) {
|
||||
// Run PHP to install Composer
|
||||
var php = exec('php', function(error, stdout, stderr) {
|
||||
callback(error ? stderr : null);
|
||||
});
|
||||
// Pass installer code to PHP via STDIN
|
||||
response.pipe(php.stdin);
|
||||
});
|
||||
});
|
||||
|
||||
// Install Composer dependencies
|
||||
gulp.task('composer-install', ['get-composer'], function(callback) {
|
||||
exec('php -d "suhosin.executor.include.whitelist = phar" composer.phar install --no-dev', function(error, stdout, stderr) {
|
||||
callback(error ? stderr : null);
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('prepare-release', ['composer-install'], function() {
|
||||
var version = require('./package.json').version;
|
||||
|
||||
return eventStream.merge(
|
||||
@ -34,7 +64,9 @@ var getSources = function() {
|
||||
return gulp.src([
|
||||
'Plugin.php',
|
||||
'README.md',
|
||||
'LICENSE'
|
||||
'LICENSE',
|
||||
'db/.htaccess',
|
||||
'vendor/**/*.*'
|
||||
],
|
||||
{base: './'}
|
||||
)
|
||||
|
25
package.json
25
package.json
@ -1,13 +1,12 @@
|
||||
{
|
||||
"version": "1.1.0",
|
||||
"devDependencies": {
|
||||
"gulp": "~3.8.10",
|
||||
"event-stream": "~3.1.7",
|
||||
"gulp-zip": "~2.0.2",
|
||||
"gulp-tar": "~1.3.1",
|
||||
"gulp-gzip": "~0.0.8",
|
||||
"gulp-chmod": "~1.2.0",
|
||||
"gulp-rename": "~1.2.0",
|
||||
"maknz/slack": "^1.7"
|
||||
}
|
||||
}
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"devDependencies": {
|
||||
"gulp": "~3.8.10",
|
||||
"event-stream": "~3.1.7",
|
||||
"gulp-zip": "~2.0.2",
|
||||
"gulp-tar": "~1.3.1",
|
||||
"gulp-gzip": "~0.0.8",
|
||||
"gulp-chmod": "~1.2.0",
|
||||
"gulp-rename": "~1.2.0"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user