Skip to content

Commit

Permalink
Port appropriate plugins/methods/directives ...
Browse files Browse the repository at this point in the history
Scrapped the polyfill, it's so widely supported.
Scrapped the underscore mixins, we don't use them.
Scrapped file_icon and resource_url, we don't use them.
  • Loading branch information
jasonvarga committed Jan 30, 2025
1 parent cb00b2d commit 7874361
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 133 deletions.
11 changes: 0 additions & 11 deletions resources/js/bootstrap/directives.js

This file was deleted.

12 changes: 0 additions & 12 deletions resources/js/bootstrap/plugins.js

This file was deleted.

16 changes: 0 additions & 16 deletions resources/js/bootstrap/polyfills.js

This file was deleted.

11 changes: 11 additions & 0 deletions resources/js/bootstrap/statamic.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import FieldConditions from '../components/FieldConditions';
import Reveal from '../components/Reveal';
import Echo from '../components/Echo';
import Permission from '../components/Permission';
import autosize from 'autosize';

const darkMode = ref(null);
let bootingCallbacks = [];
Expand Down Expand Up @@ -178,6 +179,12 @@ export default {
$markdown(value) {
return markdown(value);
},
cp_url(url) {
return cp_url(url);
},
docs_url(url) {
return docs_url(url);
},
can(permission) {
const permissions = JSON.parse(atob(Statamic.$config.get('permissions')));

Expand All @@ -190,6 +197,10 @@ export default {
}
});

this.$app.directive('elastic', {
mounted: (el) => autosize(el)
});

registerGlobalComponents(this.$app);
registerFieldtypes(this.$app);
registerVueSelect(this.$app);
Expand Down
33 changes: 0 additions & 33 deletions resources/js/bootstrap/underscore-mixins.js

This file was deleted.

9 changes: 0 additions & 9 deletions resources/js/directives/elastic.js

This file was deleted.

11 changes: 0 additions & 11 deletions resources/js/plugins/cp_url.js

This file was deleted.

11 changes: 0 additions & 11 deletions resources/js/plugins/docs_url.js

This file was deleted.

11 changes: 0 additions & 11 deletions resources/js/plugins/file_icon.js

This file was deleted.

11 changes: 0 additions & 11 deletions resources/js/plugins/resource_url.js

This file was deleted.

8 changes: 0 additions & 8 deletions resources/js/plugins/slugify.js

This file was deleted.

0 comments on commit 7874361

Please sign in to comment.