mirror of
https://github.com/Mibew/mibew_slack.git
synced 2025-01-22 10:00:31 +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'),
|
||||
rename = require('gulp-rename');
|
||||
|
||||
// Get and install PHP Composer
|
||||
gulp.task('get-composer', function(callback) {
|
||||
// Check if Composer already in place
|
||||
if (fs.existsSync('./composer.phar')) {
|
||||
callback(null);
|
||||
var composer = require("gulp-composer"),
|
||||
gutils = require("gulp-util");
|
||||
|
||||
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);
|
||||
composer("init", { "no-interaction": true });
|
||||
composer('require maknz/slack', {});
|
||||
|
||||
if (gutils.env.production) {
|
||||
composer({
|
||||
"bin": "/build/share/composer.phar",
|
||||
"no-ansi": true,
|
||||
"self-install": false,
|
||||
});
|
||||
});
|
||||
} else {
|
||||
//default install
|
||||
composer();
|
||||
}
|
||||
|
||||
// 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() {
|
||||
gulp.task('prepare-release', function() {
|
||||
var version = require('./package.json').version;
|
||||
|
||||
return eventStream.merge(
|
||||
@ -65,8 +57,7 @@ var getSources = function() {
|
||||
'Plugin.php',
|
||||
'README.md',
|
||||
'LICENSE',
|
||||
'db/.htaccess',
|
||||
'vendor/**/*.*'
|
||||
'./vendor/**/*.*'
|
||||
],
|
||||
{base: './'}
|
||||
)
|
||||
|
24
package.json
24
package.json
@ -1,12 +1,16 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
"version": "1.0.0",
|
||||
"devDependencies": {
|
||||
"event-stream": "~3.1.7",
|
||||
"gulp": "~3.8.10",
|
||||
"gulp-chmod": "~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