Skip to content

Commit

Permalink
Missing asset weaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Camwyn committed May 24, 2024
1 parent 9711805 commit 37a2aa8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 33 deletions.
16 changes: 2 additions & 14 deletions .puprc
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
{
"build": [
"cd common && rm -rf vendor",
"cd common && git checkout -- vendor",
"cd common && composer install --no-dev",
"cd common && npm run build",
"cd common && pup build",
"composer install --no-dev",
"npm ci",
"npm run build"
],
"build_dev": [
"cd common && rm -rf vendor",
"cd common && git checkout -- vendor",
"cd common && composer install --no-dev",
"cd common && npm run build",
"cd common && pup build",
"composer install",
"npm ci",
"npm run build"
Expand All @@ -31,12 +25,6 @@
"textdomain": "event-tickets",
"url": "https://translate.wordpress.org",
"slug": "wp-plugins/event-tickets/stable"
},
{
"path": "common/lang",
"textdomain": "tribe-common",
"url": "https://translations.theeventscalendar.com",
"slug": "tribe-common"
}
],
"paths": {
Expand Down
10 changes: 2 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
"_glotPressUrl": "https://translate.wordpress.org",
"_glotPressSlug": "wp-plugins/event-tickets/stable",
"_glotPressFileFormat": "%textdomain%-%wp_locale%.%format%",
"_glotPressFormats": [
"po",
"mo"
],
"_glotPressFormats": ["po", "mo"],
"_glotPressFilter": {
"translation_sets": false,
"minimum_percentage": 30,
Expand Down Expand Up @@ -82,10 +79,7 @@
"zip": "node node_modules/@the-events-calendar/product-taskmaster/util/zip.js",
"glotpress": "gulp glotpress"
},
"engines": {
"node": "18.13.0",
"npm": "8.19.3"
},
"engines": { "node": "18.13.0", "npm": "8.19.3" },
"devDependencies": {
"@playwright/test": "^1.40.1",
"@the-events-calendar/product-taskmaster": "^3.0.0",
Expand Down
14 changes: 3 additions & 11 deletions src/Tribe/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ public function enqueue_scripts() {
/** @var Tribe__Tickets__Main $tickets_main */
$tickets_main = tribe( 'tickets.main' );

$tickets_deps = [
'dashicons',
'event-tickets-reset-css',
];
$tickets_deps = [ 'dashicons' ];

if ( $this->should_enqueue_common_full() ) {
$tickets_deps[] = 'tribe-common-full-style';
Expand All @@ -33,11 +30,9 @@ public function enqueue_scripts() {
tribe_assets(
$tickets_main,
[
[ 'event-tickets-reset-css', 'reset.css' ],
[ 'event-tickets-tickets-css', $tickets_stylesheet, $tickets_deps ],
[ 'event-tickets-tickets-rsvp-css', 'rsvp-v1.css', [ 'tec-variables-full' ] ],
[ 'event-tickets-tickets-rsvp-js', 'rsvp.js', [ 'jquery' ] ],
[ 'event-tickets-attendees-list-js', 'attendees-list.js', [ 'jquery' ] ],
[ 'event-tickets-details-js', 'ticket-details.js', [] ],
],
'wp_enqueue_scripts',
Expand Down Expand Up @@ -225,17 +220,14 @@ public function admin_enqueue_scripts() {
$ticket_js_deps = [ 'jquery-ui-datepicker', 'tribe-bumpdown', 'tribe-attrchange', 'underscore', 'tribe-validation', 'event-tickets-admin-accordion-js', 'tribe-timepicker' ];

// While TEC is active, make sure we are loading TEC admin JS as dependency.
if ( class_exists( 'Tribe__Events__Main' ) ) {
$ticket_js_deps[] = 'tribe-events-admin';
if ( class_exists( 'Tribe__Events__Main', false ) ) {
//$ticket_js_deps[] = 'tribe-events-admin';
}

$assets = [
[ 'event-tickets-admin-css', 'tickets-admin.css', [ 'tribe-validation-style', 'tribe-jquery-timepicker-css', 'tribe-common-admin' ] ],
[ 'event-tickets-admin-refresh-css', 'tickets-refresh.css', [ 'event-tickets-admin-css', 'tribe-common-admin' ] ],
[ 'event-tickets-admin-tables-css', 'tickets-tables.css', [ 'tec-variables-full', 'event-tickets-admin-css' ] ],
[ 'event-tickets-attendees-list-js', 'attendees-list.js', [ 'jquery' ] ],
[ 'event-tickets-admin-accordion-js', 'accordion.js', [] ],
[ 'event-tickets-admin-accordion-css', 'accordion.css', [] ],
[ 'event-tickets-admin-js', 'tickets.js', $ticket_js_deps ],
];

Expand Down

0 comments on commit 37a2aa8

Please sign in to comment.