mirror of
https://github.com/Mibew/mibew_slack.git
synced 2025-01-22 18:10:30 +03:00
Finished up package.js and gulpfile.js fixes
This commit is contained in:
parent
5814fd3405
commit
3d5a4661e6
43
gulpfile.js
43
gulpfile.js
@ -9,34 +9,26 @@ var fs = require('fs'),
|
|||||||
gzip = require('gulp-gzip'),
|
gzip = require('gulp-gzip'),
|
||||||
rename = require('gulp-rename');
|
rename = require('gulp-rename');
|
||||||
|
|
||||||
// Get and install PHP Composer
|
var composer = require("gulp-composer"),
|
||||||
gulp.task('get-composer', function(callback) {
|
gutils = require("gulp-util");
|
||||||
// Check if Composer already in place
|
|
||||||
if (fs.existsSync('./composer.phar')) {
|
|
||||||
callback(null);
|
|
||||||
|
|
||||||
return;
|
// ...
|
||||||
}
|
|
||||||
|
|
||||||
// Get installer from the internet
|
composer("init", { "no-interaction": true });
|
||||||
https.get('https://getcomposer.org/installer', function(response) {
|
composer('require maknz/slack', {});
|
||||||
// Run PHP to install Composer
|
|
||||||
var php = exec('php', function(error, stdout, stderr) {
|
if (gutils.env.production) {
|
||||||
callback(error ? stderr : null);
|
composer({
|
||||||
|
"bin": "/build/share/composer.phar",
|
||||||
|
"no-ansi": true,
|
||||||
|
"self-install": false,
|
||||||
});
|
});
|
||||||
// Pass installer code to PHP via STDIN
|
} else {
|
||||||
response.pipe(php.stdin);
|
//default install
|
||||||
});
|
composer();
|
||||||
});
|
}
|
||||||
|
|
||||||
// Install Composer dependencies
|
gulp.task('prepare-release', function() {
|
||||||
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;
|
var version = require('./package.json').version;
|
||||||
|
|
||||||
return eventStream.merge(
|
return eventStream.merge(
|
||||||
@ -65,8 +57,7 @@ var getSources = function() {
|
|||||||
'Plugin.php',
|
'Plugin.php',
|
||||||
'README.md',
|
'README.md',
|
||||||
'LICENSE',
|
'LICENSE',
|
||||||
'db/.htaccess',
|
'./vendor/**/*.*'
|
||||||
'vendor/**/*.*'
|
|
||||||
],
|
],
|
||||||
{base: './'}
|
{base: './'}
|
||||||
)
|
)
|
||||||
|
14
package.json
14
package.json
@ -1,12 +1,16 @@
|
|||||||
{
|
{
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"gulp": "~3.8.10",
|
|
||||||
"event-stream": "~3.1.7",
|
"event-stream": "~3.1.7",
|
||||||
"gulp-zip": "~2.0.2",
|
"gulp": "~3.8.10",
|
||||||
"gulp-tar": "~1.3.1",
|
|
||||||
"gulp-gzip": "~0.0.8",
|
|
||||||
"gulp-chmod": "~1.2.0",
|
"gulp-chmod": "~1.2.0",
|
||||||
"gulp-rename": "~1.2.0"
|
"gulp-composer": "^0.4.0",
|
||||||
|
"gulp-gzip": "~0.0.8",
|
||||||
|
"gulp-rename": "~1.2.0",
|
||||||
|
"gulp-tar": "~1.3.1",
|
||||||
|
"gulp-zip": "~2.0.2",
|
||||||
|
"gulp-composer":"*",
|
||||||
|
"gulp-util": "*"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user