diff --git a/CHANGELOG.md b/CHANGELOG.md index fe32592..057e7de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ ## [Unreleased] +- Move from jsdelivr to esm.sh +- Inputmask wasn't working with jsdelivr ## [0.0.87] - 2024-01-13 - Import only debounce from lodash diff --git a/lib/generators/css_zero/add/templates/app/javascript/controllers/autosave_controller.js b/lib/generators/css_zero/add/templates/app/javascript/controllers/autosave_controller.js index 8bb9780..f00cf82 100644 --- a/lib/generators/css_zero/add/templates/app/javascript/controllers/autosave_controller.js +++ b/lib/generators/css_zero/add/templates/app/javascript/controllers/autosave_controller.js @@ -1,5 +1,5 @@ import { Controller } from "@hotwired/stimulus" -import { FetchRequest } from "https://cdn.jsdelivr.net/npm/@rails/request.js@0.0.11/+esm" +import { FetchRequest } from "https://esm.sh/@rails/request.js@0.0.11?standalone" const AUTOSAVE_INTERVAL = 3000 diff --git a/lib/generators/css_zero/add/templates/app/javascript/controllers/chart_controller.js b/lib/generators/css_zero/add/templates/app/javascript/controllers/chart_controller.js index d42160d..7a09eec 100644 --- a/lib/generators/css_zero/add/templates/app/javascript/controllers/chart_controller.js +++ b/lib/generators/css_zero/add/templates/app/javascript/controllers/chart_controller.js @@ -1,5 +1,5 @@ import { Controller } from "@hotwired/stimulus" -import { Chart, registerables } from "https://cdn.jsdelivr.net/npm/chart.js@4.4.7/+esm" +import { Chart, registerables } from "https://esm.sh/chart.js@4.4.7?standalone" Chart.register(...registerables) diff --git a/lib/generators/css_zero/add/templates/app/javascript/controllers/combobox_controller.js b/lib/generators/css_zero/add/templates/app/javascript/controllers/combobox_controller.js index 32772a0..c423c23 100644 --- a/lib/generators/css_zero/add/templates/app/javascript/controllers/combobox_controller.js +++ b/lib/generators/css_zero/add/templates/app/javascript/controllers/combobox_controller.js @@ -1,6 +1,6 @@ import { Controller } from "@hotwired/stimulus" -import { get } from "https://cdn.jsdelivr.net/npm/@rails/request.js@0.0.11/+esm" -import TomSelect from "https://cdn.jsdelivr.net/npm/tom-select@2.4.1/+esm" +import { get } from "https://esm.sh/@rails/request.js@0.0.11?standalone" +import TomSelect from "https://esm.sh/tom-select@2.4.1?standalone" export default class extends Controller { static values = { url: String, optionCreate: { type: String, default: "Add" }, noResults: { type: String, default: "No results found" } } diff --git a/lib/generators/css_zero/add/templates/app/javascript/controllers/command_controller.js b/lib/generators/css_zero/add/templates/app/javascript/controllers/command_controller.js index 488f608..9318d6b 100644 --- a/lib/generators/css_zero/add/templates/app/javascript/controllers/command_controller.js +++ b/lib/generators/css_zero/add/templates/app/javascript/controllers/command_controller.js @@ -1,6 +1,6 @@ import { Controller } from "@hotwired/stimulus" -import debounce from "https://cdn.jsdelivr.net/npm/lodash.debounce@4.0.8/+esm" -import Combobox from "https://cdn.jsdelivr.net/npm/@github/combobox-nav@3.0.1/+esm" +import debounce from "https://esm.sh/lodash.debounce@4.0.8?standalone" +import Combobox from "https://esm.sh/@github/combobox-nav@3.0.1?standalone" export default class extends Controller { static targets = [ "input", "list" ] diff --git a/lib/generators/css_zero/add/templates/app/javascript/controllers/copyable_input_controller.js b/lib/generators/css_zero/add/templates/app/javascript/controllers/copyable_input_controller.js index 839acb3..389d081 100644 --- a/lib/generators/css_zero/add/templates/app/javascript/controllers/copyable_input_controller.js +++ b/lib/generators/css_zero/add/templates/app/javascript/controllers/copyable_input_controller.js @@ -1,5 +1,5 @@ import { Controller } from "@hotwired/stimulus" -import debounce from "https://cdn.jsdelivr.net/npm/lodash.debounce@4.0.8/+esm" +import debounce from "https://esm.sh/lodash.debounce@4.0.8?standalone" export default class extends Controller { static targets = [ "input", "copyIcon", "successIcon" ] diff --git a/lib/generators/css_zero/add/templates/app/javascript/controllers/datepicker_controller.js b/lib/generators/css_zero/add/templates/app/javascript/controllers/datepicker_controller.js index e49287b..15b0d68 100644 --- a/lib/generators/css_zero/add/templates/app/javascript/controllers/datepicker_controller.js +++ b/lib/generators/css_zero/add/templates/app/javascript/controllers/datepicker_controller.js @@ -1,5 +1,5 @@ import { Controller } from "@hotwired/stimulus" -import flatpickr from "https://cdn.jsdelivr.net/npm/flatpickr@4.6.13/+esm" +import flatpickr from "https://esm.sh/flatpickr@4.6.13?standalone" export default class extends Controller { static targets = [ "details" ] diff --git a/lib/generators/css_zero/add/templates/app/javascript/controllers/inputmask_controller.js b/lib/generators/css_zero/add/templates/app/javascript/controllers/inputmask_controller.js index cad86eb..82ad01f 100644 --- a/lib/generators/css_zero/add/templates/app/javascript/controllers/inputmask_controller.js +++ b/lib/generators/css_zero/add/templates/app/javascript/controllers/inputmask_controller.js @@ -1,5 +1,5 @@ import { Controller } from "@hotwired/stimulus" -import Inputmask from "https://cdn.jsdelivr.net/npm/inputmask@5.0.9/+esm" +import Inputmask from "https://esm.sh/inputmask@5.0.9?standalone" export default class extends Controller { static values = { diff --git a/lib/generators/css_zero/add/templates/app/javascript/controllers/popover_controller.js b/lib/generators/css_zero/add/templates/app/javascript/controllers/popover_controller.js index ec0a9b6..4c5fbb3 100644 --- a/lib/generators/css_zero/add/templates/app/javascript/controllers/popover_controller.js +++ b/lib/generators/css_zero/add/templates/app/javascript/controllers/popover_controller.js @@ -1,5 +1,5 @@ import { Controller } from "@hotwired/stimulus" -import { computePosition, flip, shift, offset, autoUpdate } from "https://cdn.jsdelivr.net/npm/@floating-ui/dom@1.6.13/+esm" +import { computePosition, flip, shift, offset, autoUpdate } from "https://esm.sh/@floating-ui/dom@1.6.13?standalone" export default class extends Controller { static targets = [ "button", "menu" ] diff --git a/lib/generators/css_zero/add/templates/app/javascript/controllers/sortable_controller.js b/lib/generators/css_zero/add/templates/app/javascript/controllers/sortable_controller.js index 2de9ea3..47ea1df 100644 --- a/lib/generators/css_zero/add/templates/app/javascript/controllers/sortable_controller.js +++ b/lib/generators/css_zero/add/templates/app/javascript/controllers/sortable_controller.js @@ -1,6 +1,6 @@ import { Controller } from "@hotwired/stimulus" -import { put } from "https://cdn.jsdelivr.net/npm/@rails/request.js@0.0.11/+esm" -import Sortable from "https://cdn.jsdelivr.net/npm/sortablejs@1.15.6/+esm" +import { put } from "https://esm.sh/@rails/request.js@0.0.11?standalone" +import Sortable from "https://esm.sh/sortablejs@1.15.6?standalone" export default class extends Controller { static values = { url: String, group: String, handle: String }