Skip to content

Commit

Permalink
Install keymaster via npm
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdeyen committed Jan 8, 2024
1 parent fa76e8c commit 8eb56be
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 297 deletions.
1 change: 0 additions & 1 deletion app/assets/javascripts/alchemy/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// ------------------------------
//= require jquery3
//= require_tree ../../../../vendor/assets/javascripts/jquery_plugins/
//= require keymaster
//= require handlebars
//= require alchemy/templates
//= require alchemy/alchemy.dialog
Expand Down
2 changes: 2 additions & 0 deletions app/javascript/alchemy_admin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import "@ungap/custom-elements"
import "@hotwired/turbo-rails"
import "keymaster"

import Rails from "@rails/ujs"

import GUI from "alchemy_admin/gui"
Expand Down
1 change: 1 addition & 0 deletions config/importmap.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
pin "@ungap/custom-elements", to: "ungap-custom-elements.min.js", preload: true # @1.3.0
pin "clipboard", to: "clipboard.min.js", preload: true
pin "flatpickr", to: "flatpickr.min.js", preload: true # @4.6.13
pin "keymaster", to: "keymaster.min.js", preload: true
pin "sortablejs", to: "sortable.min.js", preload: true # @1.15.1
pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
pin "shoelace", to: "shoelace.min.js", preload: true
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@ungap/custom-elements": "^1.3.0",
"clipboard": "^2.0.11",
"flatpickr": "^4.6.13",
"keymaster": "^1.6.2",
"sortablejs": "^1.15.1",
"tinymce": "^6.8.2"
},
Expand Down
8 changes: 8 additions & 0 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ export default [
plugins: [resolve(), terser()],
context: "window"
},
{
input: "node_modules/keymaster/keymaster.js",
output: {
file: "vendor/javascript/keymaster.min.js"
},
plugins: [terser()],
context: "window"
},
{
input: "node_modules/sortablejs/modular/sortable.esm.js",
output: {
Expand Down
296 changes: 0 additions & 296 deletions vendor/assets/javascripts/keymaster.js

This file was deleted.

1 change: 1 addition & 0 deletions vendor/javascript/keymaster.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2942,6 +2942,11 @@ json5@^2.2.3:
resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz"
integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==

keymaster@^1.6.2:
version "1.6.2"
resolved "https://registry.yarnpkg.com/keymaster/-/keymaster-1.6.2.tgz#e1ae54d0ea9488f9f60b66b668f02e9a1946c6eb"
integrity sha512-OvA/AALN8IDKKkTk2Z+bDrzs/SQao4lo/QPbwSdDvm+frxfiYiYCSn1aHFUypJY3SruAO1y/c771agBmTXqUtg==

kleur@^3.0.3:
version "3.0.3"
resolved "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz"
Expand Down

0 comments on commit 8eb56be

Please sign in to comment.