easyappointments/tools/gulp/composer.js

47 lines
1.6 KiB
JavaScript
Raw Normal View History

/* ----------------------------------------------------------------------------
* Easy!Appointments - Open Source Web Scheduler
*
* @package EasyAppointments
* @author A.Tselegidis <alextselegidis@gmail.com>
* @copyright Copyright (c) 2013 - 2018, Alex Tselegidis
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
* @link http://easyappointments.org
* @since v1.4.0
* ---------------------------------------------------------------------------- */
const del = require('del');
/**
* Install and copy the required files from the "composer_modules" directory.
*
* Composer needs to be installed and configured in order for this command to
* work properly.
*/
module.exports = (gulp, plugins) => {
return () => {
del.sync([
'./src/vendor/**/*',
'!./src/vendor/index.html'
]);
return gulp.src([
'vendor/**/*',
'!vendor/**/demo{,/**}',
'!vendor/**/{demo,docs,examples,test,tests,extras,language}{,/**}',
'!vendor/**/{composer.json,composer.lock,.gitignore}',
'!vendor/**/{*.yml,*.md,*phpunit*,*.mdown}',
'!vendor/bin{,/**}',
'!vendor/codeigniter{,/**}',
'!vendor/doctrine{,/**}',
'!vendor/myclabs{,/**}',
'!vendor/phpdocumentor{,/**}',
'!vendor/phpspec{,/**}',
'!vendor/phpunit{,/**}',
'!vendor/sebastian{,/**}',
'!vendor/symfony{,/**}',
'!vendor/webmozart{,/**}'
])
.pipe(gulp.dest('./src/vendor/'));
};
};