Add coexistence checks to all enqueue methods to prevent loading both React and Grid.js assets simultaneously. Changes: - ReactAdmin.php: Only enqueue React assets when ?react=1 - Init.php: Skip Grid.js when React active on admin pages - Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0 - Customer.php, Product.php, License.php: Add coexistence checks Now the toggle between Classic and React versions works correctly. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
24 lines
874 B
Bash
Executable File
24 lines
874 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" && $TRAVIS_JOB_NUMBER =~ ".3" ]]; then
|
|
git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE '\.md$|^LICENSE$|travis-gh-pages$' && {
|
|
rm -rf ../gh-pages
|
|
git clone -b gh-pages --single-branch https://${GITHUB_TOKEN}@github.com/ajv-validator/ajv.git ../gh-pages
|
|
mkdir -p ../gh-pages/_source
|
|
cp *.md ../gh-pages/_source
|
|
cp LICENSE ../gh-pages/_source
|
|
currentDir=$(pwd)
|
|
cd ../gh-pages
|
|
$currentDir/node_modules/.bin/gh-pages-generator
|
|
# remove logo from README
|
|
sed -i -E "s/<img[^>]+ajv_logo[^>]+>//" index.md
|
|
git config user.email "$GIT_USER_EMAIL"
|
|
git config user.name "$GIT_USER_NAME"
|
|
git add .
|
|
git commit -am "updated by travis build #$TRAVIS_BUILD_NUMBER"
|
|
git push --quiet origin gh-pages > /dev/null 2>&1
|
|
}
|
|
fi
|