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

Improvements to bassets #19

Merged
merged 1 commit into from
Feb 20, 2023
Merged

Conversation

promatik
Copy link
Collaborator

Fixes #18

  • Cache local assets
  • Use Storage to manage the files
  • Added bassetBlock

Local files may be used along with CDNs:

@basset('https://unpkg.com/jquery-ui@1.13.2/dist/jquery-ui.min.js')
@basset(base_path('vendor/backpack/crud/src/resources/assets/libs/jquery.mjs.nestedSortable2.js'))

Basset Block example:

@bassetBlock('custom/reorder.js')
	<script type="text/javascript">
		let a = "abc";
		alert(a);
	</script>
	@endBassetBlock
	
	@bassetBlock('custom/reorder.css')
	<style>
		html {
			opacity: 0.8;
		}
	</style>
@endBassetBlock

Use Storage to manage the files
Added bassetBlock
@what-the-diff
Copy link

what-the-diff bot commented Feb 20, 2023

  • Added support for internalizing code blocks
  • Fixed a bug where the asset was not being downloaded if it had query parameters or hash fragments in its url
  • Changed configuration to use disk and path instead of cache_path, cache_public_path and view paths are now optional (used by artisan basset:internalize)

@tabacitu
Copy link
Member

IT WOOORKS! IT FINALLY WORKS FOR ME TOO!! 🎉🎉🎉 Who would have known that using Laravel's abstraction would save us from fixing server differences 😅🤦‍♂️

One note though... added as a separate issue here - Laravel-Backpack/basset#5

I think this is ready to be separated into its own package now 🎉 I've created https://github.com/Laravel-Backpack/bassets for this purpose, and I've started adding the issues there, instead of here. I say:

That way, we can add individual issues for each Bassets problem... until we've got them all solved.

@tabacitu
Copy link
Member

(you might want to merge main into this branch before you move the code)

@tabacitu tabacitu mentioned this pull request Feb 20, 2023
@tabacitu tabacitu merged commit d34147d into DigitallyHappy:bassets Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants