From a36ce51cb32221c7115ca7e464bd77ce42ef907c Mon Sep 17 00:00:00 2001 From: Adam Franco Date: Thu, 2 Mar 2023 12:12:42 -0500 Subject: [PATCH] Add a composer.json for inclusion via Composer in PHP projects. --- composer.json | 7 +++++++ gulpfile.js | 12 +++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 composer.json diff --git a/composer.json b/composer.json new file mode 100644 index 000000000..ca00827cc --- /dev/null +++ b/composer.json @@ -0,0 +1,7 @@ +{ + "name": "middlebury/midd-frontend", + "description": "Middlebury College's theme assets.", + "homepage": "https://github.com/middlebury/midd-frontend", + "type": "drupal-library", + "license": "GPL-2.0-or-later" +} diff --git a/gulpfile.js b/gulpfile.js index a898f47f7..4489ed670 100755 --- a/gulpfile.js +++ b/gulpfile.js @@ -84,7 +84,8 @@ const clean = () => './dist/**/*.html', './dist/**/*.js', './dist/**/*.css', - './dist/images/*' + './dist/images/*', + './dist/*.json' ]); const serve = () => @@ -261,6 +262,14 @@ const copyDeps = () => { .pipe(gulp.dest('./dist/js')); }; +const copyMeta = () => { + return gulp + .src([ + './composer.json' + ]) + .pipe(gulp.dest('./dist/')); +}; + const deployDist = () => { if (!THEME_DIR) { return console.error('No `--themeDir` argument passed'); @@ -356,6 +365,7 @@ const buildIconSprite = () => const build = gulp.series( clean, copyDeps, + copyMeta, gulp.parallel(html, images, lintStyles, styles, scripts), reportFilesizes );