Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: allow dist files in release #16

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,8 @@ local.json
!.editorconfig
!.github

# -------------------------
# Whitelist Dist Files
# -------------------------
!/dist/

22 changes: 0 additions & 22 deletions build.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/* Parameters:
--no-composer Does not install vendors. Just create the autoloader.
--cleanup Remove removeables.
--install-npm Install NPM package instead
*/

// Any command needed to run and build plugin assets when newly cheched out of repo.
Expand All @@ -24,27 +23,6 @@
$buildCommands[] = 'composer dump-autoload';
}

//Run npm if package.json is found
if(file_exists('package.json') && file_exists('package-lock.json')) {
if(is_array($argv) && !in_array('--install-npm', $argv)) {
$buildCommands[] = 'npm ci --no-progress --no-audit';
} else {
$npmPackage = json_decode(file_get_contents('package.json'));
$buildCommands[] = "npm install $npmPackage->name --omit=dev";
$buildCommands[] = "rm -rf ./dist";
$buildCommands[] = "mv node_modules/$npmPackage->name/dist ./";
}
} elseif(file_exists('package.json') && !file_exists('package-lock.json')) {
if(is_array($argv) && !in_array('--install-npm', $argv)) {
$buildCommands[] = 'npm install --no-progress --no-audit';
} else {
$npmPackage = json_decode(file_get_contents('package.json'));
$buildCommands[] = "npm install $npmPackage->name --omit=dev";
$buildCommands[] = "rm -rf ./dist";
$buildCommands[] = "mv node_modules/$npmPackage->name/dist ./";
}
}

// Files and directories not suitable for prod to be removed.
$removables = [
'.git',
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,5 @@
"allow-plugins": {
"php-http/discovery": true
}
},
"version": "3.2.2"
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions dist/js/assignment-form.ea09e1ddcf77f6629c32.js

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions dist/js/assignment-form.ea09e1ddcf77f6629c32.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react-is.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
1 change: 1 addition & 0 deletions dist/js/assignment-form.ea09e1ddcf77f6629c32.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dist/js/assignment-form.f91c08016307fdb8e0dc.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading