alchemy_cms 8.0.0.a → 8.0.0.b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of alchemy_cms might be problematic. Click here for more details.

Files changed (182) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -0
  3. data/app/assets/builds/alchemy/admin/page-select.css +1 -1
  4. data/app/assets/builds/alchemy/admin.css +1 -1
  5. data/app/assets/builds/alchemy/dark-theme.css +1 -0
  6. data/app/assets/builds/alchemy/light-theme.css +1 -0
  7. data/app/assets/builds/alchemy/theme.css +1 -0
  8. data/app/assets/builds/alchemy/welcome.css +1 -1
  9. data/app/assets/builds/tinymce/skins/content/alchemy/content.min.css +1 -1
  10. data/app/assets/builds/tinymce/skins/content/alchemy-dark/content.min.css +1 -0
  11. data/app/assets/builds/tinymce/skins/ui/alchemy/skin.min.css +1 -1
  12. data/app/assets/builds/tinymce/skins/ui/alchemy-dark/content.min.css +1 -0
  13. data/app/assets/builds/tinymce/skins/ui/alchemy-dark/skin.min.css +1 -0
  14. data/app/assets/images/alchemy/element_icons/default.svg +1 -0
  15. data/app/assets/images/alchemy/icons-sprite.svg +1 -1
  16. data/app/components/alchemy/admin/element_select.rb +39 -0
  17. data/app/components/alchemy/ingredients/datetime_view.rb +4 -2
  18. data/app/controllers/alchemy/admin/attachments_controller.rb +2 -0
  19. data/app/controllers/alchemy/admin/elements_controller.rb +2 -0
  20. data/app/controllers/alchemy/admin/pages_controller.rb +2 -0
  21. data/app/controllers/alchemy/admin/pictures_controller.rb +19 -33
  22. data/app/controllers/alchemy/pages_controller.rb +19 -2
  23. data/app/controllers/concerns/alchemy/admin/resource_filter.rb +1 -0
  24. data/app/helpers/alchemy/admin/attachments_helper.rb +5 -5
  25. data/app/helpers/alchemy/pages_helper.rb +1 -1
  26. data/app/javascript/alchemy_admin/components/auto_submit.js +20 -0
  27. data/app/javascript/alchemy_admin/components/datepicker.js +8 -5
  28. data/app/javascript/alchemy_admin/components/element_editor/delete_element_button.js +3 -2
  29. data/app/javascript/alchemy_admin/components/element_editor.js +25 -15
  30. data/app/javascript/alchemy_admin/components/element_select.js +43 -0
  31. data/app/javascript/alchemy_admin/components/index.js +5 -0
  32. data/app/javascript/alchemy_admin/components/link_buttons.js +6 -2
  33. data/app/javascript/alchemy_admin/components/remote_select.js +5 -1
  34. data/app/javascript/alchemy_admin/components/tinymce.js +93 -16
  35. data/app/javascript/alchemy_admin/dialog.js +1 -1
  36. data/app/javascript/alchemy_admin/file_editors.js +1 -1
  37. data/app/javascript/alchemy_admin/image_loader.js +4 -2
  38. data/app/javascript/alchemy_admin/picture_editors.js +7 -4
  39. data/app/javascript/alchemy_admin/picture_selector.js +4 -4
  40. data/app/jobs/alchemy/delete_picture_job.rb +12 -0
  41. data/app/models/alchemy/attachment.rb +2 -9
  42. data/app/models/alchemy/element.rb +1 -0
  43. data/app/models/alchemy/element_definition.rb +30 -0
  44. data/app/models/alchemy/ingredient.rb +1 -1
  45. data/app/models/alchemy/language.rb +2 -7
  46. data/app/models/alchemy/page/page_naming.rb +4 -11
  47. data/app/models/alchemy/page/page_natures.rb +16 -11
  48. data/app/models/alchemy/page.rb +1 -6
  49. data/app/models/alchemy/page_definition.rb +1 -1
  50. data/app/models/alchemy/picture.rb +6 -17
  51. data/app/models/alchemy/site/layout.rb +1 -0
  52. data/app/models/alchemy/site.rb +1 -6
  53. data/app/models/alchemy/storage_adapter/dragonfly/picture_url.rb +7 -2
  54. data/app/models/alchemy/storage_adapter/dragonfly.rb +24 -2
  55. data/app/models/concerns/alchemy/relatable_resource.rb +28 -0
  56. data/app/stylesheets/alchemy/_custom-properties.scss +162 -0
  57. data/app/stylesheets/alchemy/_mixins.scss +12 -24
  58. data/app/stylesheets/alchemy/_themes.scss +540 -0
  59. data/app/stylesheets/alchemy/admin/archive.scss +28 -8
  60. data/app/stylesheets/alchemy/admin/attachments.scss +10 -33
  61. data/app/stylesheets/alchemy/admin/base.scss +4 -1
  62. data/app/stylesheets/alchemy/admin/buttons.scss +7 -32
  63. data/app/stylesheets/alchemy/admin/dialogs.scss +17 -7
  64. data/app/stylesheets/alchemy/admin/element-select.scss +11 -0
  65. data/app/stylesheets/alchemy/admin/elements.scss +94 -33
  66. data/app/stylesheets/alchemy/admin/filters.scss +8 -9
  67. data/app/stylesheets/alchemy/admin/flatpickr.scss +12 -27
  68. data/app/stylesheets/alchemy/admin/form_fields.scss +0 -15
  69. data/app/stylesheets/alchemy/admin/forms.scss +3 -8
  70. data/app/stylesheets/alchemy/admin/frame.scss +5 -7
  71. data/app/stylesheets/alchemy/admin/icons.scss +0 -9
  72. data/app/stylesheets/alchemy/admin/image_library.scss +13 -55
  73. data/app/stylesheets/alchemy/admin/navigation.scss +1 -11
  74. data/app/stylesheets/alchemy/admin/node-select.scss +1 -10
  75. data/app/stylesheets/alchemy/admin/notices.scss +5 -4
  76. data/app/stylesheets/alchemy/admin/page-select.scss +16 -0
  77. data/app/stylesheets/alchemy/admin/pagination.scss +1 -8
  78. data/app/stylesheets/alchemy/admin/preview_window.scss +12 -1
  79. data/app/stylesheets/alchemy/admin/resource_info.scss +106 -3
  80. data/app/stylesheets/alchemy/admin/search.scss +1 -1
  81. data/app/stylesheets/alchemy/admin/selects.scss +58 -31
  82. data/app/stylesheets/alchemy/admin/shoelace.scss +32 -62
  83. data/app/stylesheets/alchemy/admin/sitemap.scss +1 -1
  84. data/app/stylesheets/alchemy/admin/tables.scss +3 -3
  85. data/app/stylesheets/alchemy/admin/tags.scss +18 -35
  86. data/app/stylesheets/alchemy/admin/toolbar.scss +0 -6
  87. data/app/stylesheets/alchemy/admin/typography.scss +2 -5
  88. data/app/stylesheets/alchemy/admin.scss +1 -1
  89. data/app/stylesheets/alchemy/dark-theme.scss +5 -0
  90. data/app/stylesheets/alchemy/light-theme.scss +6 -0
  91. data/app/stylesheets/alchemy/theme.scss +13 -0
  92. data/app/stylesheets/tinymce/skins/content/alchemy/content.scss +8 -8
  93. data/app/stylesheets/tinymce/skins/content/alchemy-dark/content.scss +70 -0
  94. data/app/stylesheets/tinymce/skins/ui/alchemy/skin.scss +28 -43
  95. data/app/stylesheets/tinymce/skins/ui/alchemy-dark/content.scss +1 -0
  96. data/app/stylesheets/tinymce/skins/ui/alchemy-dark/skin.scss +3784 -0
  97. data/app/views/alchemy/admin/attachments/_files_list.html.erb +20 -10
  98. data/app/views/alchemy/admin/attachments/assign.js.erb +4 -3
  99. data/app/views/alchemy/admin/attachments/show.html.erb +55 -43
  100. data/app/views/alchemy/admin/crop.html.erb +1 -1
  101. data/app/views/alchemy/admin/elements/_form.html.erb +9 -9
  102. data/app/views/alchemy/admin/elements/_header.html.erb +4 -1
  103. data/app/views/alchemy/admin/ingredients/_picture_fields.html.erb +1 -1
  104. data/app/views/alchemy/admin/pages/info.html.erb +1 -1
  105. data/app/views/alchemy/admin/partials/_search_form.html.erb +1 -0
  106. data/app/views/alchemy/admin/pictures/_archive.html.erb +12 -22
  107. data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +1 -6
  108. data/app/views/alchemy/admin/pictures/_form.html.erb +1 -1
  109. data/app/views/alchemy/admin/pictures/_infos.html.erb +21 -52
  110. data/app/views/alchemy/admin/pictures/_library_sidebar.html.erb +7 -0
  111. data/app/views/alchemy/admin/pictures/_picture.html.erb +14 -20
  112. data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +20 -16
  113. data/app/views/alchemy/admin/pictures/_sorting_select.html.erb +13 -0
  114. data/app/views/alchemy/admin/pictures/_tag_list.html.erb +1 -1
  115. data/app/views/alchemy/admin/pictures/edit_multiple.html.erb +1 -6
  116. data/app/views/alchemy/admin/pictures/index.html.erb +3 -12
  117. data/app/views/alchemy/admin/pictures/show.html.erb +10 -5
  118. data/app/views/alchemy/admin/resources/_filter_bar.html.erb +5 -15
  119. data/app/views/alchemy/admin/resources/_resource_usage_info.html.erb +36 -0
  120. data/app/views/alchemy/admin/styleguide/index.html.erb +118 -66
  121. data/app/views/alchemy/base/error_notice.html.erb +1 -1
  122. data/app/views/alchemy/ingredients/_page_editor.html.erb +0 -1
  123. data/app/views/alchemy/ingredients/_richtext_editor.html.erb +0 -1
  124. data/app/views/alchemy/ingredients/_select_editor.html.erb +1 -2
  125. data/app/views/layouts/alchemy/admin.html.erb +22 -17
  126. data/config/locales/alchemy.en.yml +26 -8
  127. data/db/migrate/20250905140323_add_created_at_index_to_pictures_and_attachments.rb +14 -0
  128. data/lib/alchemy/configurations/format_matchers.rb +1 -1
  129. data/lib/alchemy/configurations/main.rb +7 -0
  130. data/lib/alchemy/configurations/page_cache.rb +19 -0
  131. data/lib/alchemy/engine.rb +16 -7
  132. data/lib/alchemy/install/tasks.rb +0 -12
  133. data/lib/alchemy/name_conversions.rb +6 -0
  134. data/lib/alchemy/tasks/tidy.rb +18 -0
  135. data/lib/alchemy/test_support/factories/picture_factory.rb +1 -0
  136. data/lib/alchemy/test_support/relatable_resource_examples.rb +58 -0
  137. data/lib/alchemy/tinymce.rb +0 -1
  138. data/lib/alchemy/version.rb +1 -1
  139. data/lib/alchemy.rb +2 -11
  140. data/lib/generators/alchemy/install/install_generator.rb +21 -10
  141. data/lib/generators/alchemy/install/templates/alchemy.rb.tt +10 -6
  142. data/lib/tasks/alchemy/tidy.rake +6 -0
  143. data/lib/tasks/alchemy/usage.rake +2 -0
  144. data/vendor/assets/stylesheets/tinymce/skins/content/dark/content.min.css +1 -0
  145. data/vendor/assets/stylesheets/tinymce/skins/content/default/content.min.css +1 -0
  146. data/vendor/assets/stylesheets/tinymce/skins/ui/oxide/skin.min.css +1 -0
  147. data/vendor/assets/stylesheets/tinymce/skins/ui/oxide-dark/content.min.css +1 -0
  148. data/vendor/assets/stylesheets/tinymce/skins/ui/oxide-dark/skin.min.css +1 -0
  149. data/vendor/javascript/clipboard.min.js +1 -1
  150. data/vendor/javascript/cropperjs.min.js +1 -1
  151. data/vendor/javascript/handlebars.min.js +3 -3
  152. data/vendor/javascript/jquery.min.js +1 -1
  153. data/vendor/javascript/select2.min.js +3 -3
  154. data/vendor/javascript/shoelace.min.js +92 -76
  155. data/vendor/javascript/sortable.min.js +2 -2
  156. data/vendor/javascript/tinymce.min.js +1 -1
  157. data/vendor/javascript/ungap-custom-elements.min.js +2 -2
  158. metadata +46 -32
  159. data/CHANGELOG.md +0 -2100
  160. data/CODE_OF_CONDUCT.md +0 -13
  161. data/CONTRIBUTING.md +0 -73
  162. data/Gemfile +0 -78
  163. data/Rakefile +0 -102
  164. data/SECURITY.md +0 -13
  165. data/alchemy_cms.gemspec +0 -97
  166. data/app/assets/builds/alchemy/custom-properties.css +0 -1
  167. data/app/helpers/alchemy/admin/elements_helper.rb +0 -25
  168. data/app/stylesheets/alchemy/custom-properties.css +0 -244
  169. data/bin/importmap +0 -4
  170. data/bin/rails +0 -9
  171. data/bin/rspec +0 -3
  172. data/bin/setup +0 -30
  173. data/bin/start +0 -17
  174. data/bun.lockb +0 -0
  175. data/bundles/remixicon.mjs +0 -153
  176. data/bundles/shoelace.js +0 -12
  177. data/bundles/tinymce.js +0 -22
  178. data/eslint.config.js +0 -18
  179. data/lib/alchemy/upgrader/.keep +0 -0
  180. data/lib/alchemy/upgrader/tasks/.keep +0 -0
  181. data/rollup.config.mjs +0 -108
  182. data/vitest.config.js +0 -21
data/bin/rails DELETED
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
- # This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application.
4
-
5
- ENGINE_ROOT = File.expand_path("..", __dir__)
6
- ENGINE_PATH = File.expand_path("../lib/alchemy/engine", __dir__)
7
-
8
- require "rails/all"
9
- require "rails/engine/commands"
data/bin/rspec DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require 'bundler/setup'
3
- load Gem.bin_path('rspec-core', 'rspec')
data/bin/setup DELETED
@@ -1,30 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require "fileutils"
3
-
4
- # path to dummy application root.
5
- APP_ROOT = File.expand_path("../spec/dummy", __dir__)
6
-
7
- # path to alchemy gem
8
- GEM_ROOT = File.expand_path("../", __dir__)
9
-
10
- def system!(*args)
11
- system(*args) || abort("\n== Command #{args} failed ==")
12
- end
13
-
14
- FileUtils.chdir GEM_ROOT do
15
- system! "gem install bundler --conservative"
16
- system("bundle check") || system!("bundle install")
17
- system("bun -v &> /dev/null") || system!("curl -fsSL https://bun.sh/install | bash")
18
- system!("bun install")
19
- end
20
-
21
- FileUtils.chdir APP_ROOT do
22
- puts "\n== Installing Alchemy into dummy app =="
23
- system!("bin/rails g alchemy:install --skip --skip-demo-files --auto-accept")
24
-
25
- puts "\n== Removing old logs and tempfiles =="
26
- system! "bin/rails log:clear tmp:clear"
27
- end
28
-
29
- puts "\n== Alchemy is ready 🎉 =="
30
- puts "Start server by typing:\n\n bin/start"
data/bin/start DELETED
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require "fileutils"
3
-
4
- # path to dummy application root.
5
- APP_ROOT = File.expand_path("../spec/dummy", __dir__)
6
-
7
- # path to alchemy gem
8
- GEM_ROOT = File.expand_path("../", __dir__)
9
-
10
- def system!(*args)
11
- system(*args) || abort("\n== Command #{args} failed ==")
12
- end
13
-
14
- FileUtils.chdir APP_ROOT do
15
- puts "\n== Starting dummy app =="
16
- system! "bin/dev"
17
- end
data/bun.lockb DELETED
Binary file
@@ -1,153 +0,0 @@
1
- import fs from "node:fs"
2
- import path from "node:path"
3
- import SVGSpriter from "svg-sprite"
4
- import { consola } from "consola"
5
-
6
- const icons = [
7
- "Arrows/arrow-down-line",
8
- "Arrows/arrow-down-s-line",
9
- "Arrows/arrow-left-right-line",
10
- "Arrows/arrow-left-s-line",
11
- "Arrows/arrow-left-wide-line",
12
- "Arrows/arrow-right-s-line",
13
- "Arrows/arrow-right-wide-line",
14
- "Arrows/arrow-up-line",
15
- "Arrows/contract-right-line",
16
- "Arrows/contract-up-down-line",
17
- "Arrows/expand-left-line",
18
- "Arrows/expand-right-line",
19
- "Arrows/skip-left-line",
20
- "Arrows/skip-right-line",
21
- "Buildings/home-2-line",
22
- "Business/archive-drawer-line",
23
- "Business/bookmark-fill",
24
- "Business/bookmark-line",
25
- "Business/calendar-line",
26
- "Business/cloud-line",
27
- "Business/cloud-off-line",
28
- "Business/global-line",
29
- "Business/mail-line",
30
- "Business/profile-line",
31
- "Business/shake-hands-line",
32
- "Business/stack-line",
33
- "Business/window-line",
34
- "Design/crop-line",
35
- "Design/edit-line",
36
- "Design/eraser-line",
37
- "Design/palette-line",
38
- "Design/pencil-ruler-2-line",
39
- "Design/scissors-cut-line",
40
- "Design/table-line",
41
- "Development/bug-line",
42
- "Device/computer-line",
43
- "Document/article-line",
44
- "Document/book-3-line",
45
- "Document/clipboard-fill",
46
- "Document/clipboard-line",
47
- "Document/file-3-line",
48
- "Document/file-add-line",
49
- "Document/file-cloud-line",
50
- "Document/file-copy-line",
51
- "Document/file-edit-line",
52
- "Document/file-excel-2-line",
53
- "Document/file-forbid-line",
54
- "Document/file-image-line",
55
- "Document/file-line",
56
- "Document/file-music-line",
57
- "Document/file-pdf-2-line",
58
- "Document/file-ppt-2-line",
59
- "Document/file-text-line",
60
- "Document/file-upload-line",
61
- "Document/file-video-line",
62
- "Document/file-word-2-line",
63
- "Document/file-zip-line",
64
- "Document/folder-line",
65
- "Document/folder-open-line",
66
- "Document/newspaper-line",
67
- "Document/pages-line",
68
- "Editor/draggable",
69
- "Editor/link-m",
70
- "Editor/link-unlink-m",
71
- "Editor/sort-asc",
72
- "Editor/sort-desc",
73
- "Editor/translate-2",
74
- "Finance/price-tag-3-line",
75
- "Finance/shopping-cart-line",
76
- "Finance/ticket-line",
77
- "Media/camera-line",
78
- "Media/image-add-line",
79
- "Media/image-line",
80
- "System/add-line",
81
- "System/alert-line",
82
- "System/check-line",
83
- "System/checkbox-multiple-line",
84
- "System/close-line",
85
- "System/delete-bin-2-line",
86
- "System/download-2-line",
87
- "System/external-link-line",
88
- "System/information-line",
89
- "System/lock-line",
90
- "System/lock-unlock-line",
91
- "System/logout-box-r-line",
92
- "System/menu-2-line",
93
- "System/menu-add-line",
94
- "System/menu-fold-line",
95
- "System/menu-unfold-line",
96
- "System/more-line",
97
- "System/more-2-line",
98
- "System/prohibited-line",
99
- "System/question-line",
100
- "System/refresh-line",
101
- "System/search-line",
102
- "System/settings-3-line",
103
- "System/upload-2-line",
104
- "System/upload-cloud-2-line",
105
- "System/zoom-in-line",
106
- "System/zoom-out-line",
107
- "User & Faces/group-line",
108
- "User & Faces/user-fill",
109
- "User & Faces/user-line",
110
- "User & Faces/robot-2-line"
111
- ]
112
-
113
- const config = {
114
- dest: "app/assets/images/alchemy",
115
- mode: {
116
- symbol: {
117
- dest: "",
118
- sprite: "icons-sprite.svg"
119
- }
120
- },
121
- shape: {
122
- id: {
123
- generator: (name) => {
124
- const id = name.replace(".svg", "")
125
- return `ri-${id}`
126
- }
127
- }
128
- }
129
- }
130
-
131
- const spriter = new SVGSpriter(config)
132
-
133
- consola.start(`Building svg sprite of ${icons.length} icons`)
134
-
135
- icons.forEach((icon) => {
136
- const name = icon.replace(/^.+\/(.+)$/, "$1")
137
- consola.info(`Adding ${name}.svg`)
138
- spriter.add(
139
- path.resolve(`node_modules/remixicon/icons/${icon}.svg`),
140
- `${name}.svg`,
141
- fs.readFileSync(`node_modules/remixicon/icons/${icon}.svg`, "utf-8")
142
- )
143
- })
144
-
145
- spriter.compile((error, result, _data) => {
146
- if (error) consola.error(error)
147
-
148
- for (const type of Object.values(result.symbol)) {
149
- fs.mkdirSync(path.dirname(type.path), { recursive: true })
150
- consola.success(`Writing ${type.path}`)
151
- fs.writeFileSync(type.path, type.contents)
152
- }
153
- })
data/bundles/shoelace.js DELETED
@@ -1,12 +0,0 @@
1
- // Used to bundle our own Shoelace build with Rollup
2
- import "@shoelace-style/shoelace/dist/utilities/animation-registry.js"
3
- import "@shoelace-style/shoelace/dist/components/switch/switch.js"
4
- import "@shoelace-style/shoelace/dist/components/tab/tab.js"
5
- import "@shoelace-style/shoelace/dist/components/tab-group/tab-group.js"
6
- import "@shoelace-style/shoelace/dist/components/tab-panel/tab-panel.js"
7
- import "@shoelace-style/shoelace/dist/components/tooltip/tooltip.js"
8
- import "@shoelace-style/shoelace/dist/components/progress-bar/progress-bar.js"
9
- import "@shoelace-style/shoelace/dist/components/dialog/dialog.js"
10
- import { registerIconLibrary } from "@shoelace-style/shoelace/dist/utilities/icon-library.js"
11
- import { setDefaultAnimation } from "@shoelace-style/shoelace/dist/utilities/animation-registry.js"
12
- export { registerIconLibrary, setDefaultAnimation }
data/bundles/tinymce.js DELETED
@@ -1,22 +0,0 @@
1
- /* Import TinyMCE */
2
- import tinymce from "tinymce"
3
-
4
- /* Default icons are required. After that, import custom icons if applicable */
5
- import "tinymce/icons/default"
6
- import "tinymce/icons/remixicons"
7
-
8
- /* Required TinyMCE components */
9
- import "tinymce/themes/silver"
10
- import "tinymce/models/dom"
11
-
12
- /* Import plugins */
13
- import "tinymce/plugins/anchor"
14
- import "tinymce/plugins/charmap"
15
- import "tinymce/plugins/code"
16
- import "tinymce/plugins/directionality"
17
- import "tinymce/plugins/fullscreen"
18
- import "tinymce/plugins/link"
19
- import "tinymce/plugins/lists"
20
- import "tinymce/plugins/alchemy_link"
21
-
22
- export default tinymce
data/eslint.config.js DELETED
@@ -1,18 +0,0 @@
1
- export default [
2
- {
3
- ignores: ["spec/**/*"],
4
- rules: {
5
- "no-restricted-imports": [
6
- "error",
7
- {
8
- patterns: [
9
- {
10
- group: ["./", "../"],
11
- message: "Relative imports are not allowed."
12
- }
13
- ]
14
- }
15
- ]
16
- }
17
- }
18
- ]
File without changes
File without changes
data/rollup.config.mjs DELETED
@@ -1,108 +0,0 @@
1
- import resolve from "@rollup/plugin-node-resolve"
2
- import commonjs from "@rollup/plugin-commonjs"
3
- import terser from "@rollup/plugin-terser"
4
-
5
- export default [
6
- {
7
- input: "node_modules/clipboard/dist/clipboard.min.js",
8
- output: {
9
- file: "vendor/javascript/clipboard.min.js"
10
- },
11
- context: "window"
12
- },
13
- {
14
- input: "node_modules/cropperjs/dist/cropper.esm.js",
15
- output: {
16
- file: "vendor/javascript/cropperjs.min.js"
17
- },
18
- plugins: [terser()],
19
- context: "window"
20
- },
21
- {
22
- input: "node_modules/flatpickr/dist/esm/index.js",
23
- output: {
24
- file: "vendor/javascript/flatpickr.min.js"
25
- },
26
- plugins: [resolve(), terser()],
27
- context: "window"
28
- },
29
- {
30
- input: "node_modules/handlebars/dist/handlebars.min.js",
31
- output: {
32
- file: "vendor/javascript/handlebars.min.js"
33
- },
34
- context: "window"
35
- },
36
- {
37
- input: "node_modules/jquery/dist/jquery.min.js",
38
- output: {
39
- file: "vendor/javascript/jquery.min.js"
40
- },
41
- context: "window"
42
- },
43
- {
44
- input: "node_modules/keymaster/keymaster.js",
45
- output: {
46
- file: "vendor/javascript/keymaster.min.js"
47
- },
48
- plugins: [terser()],
49
- context: "window"
50
- },
51
- {
52
- input: "node_modules/sortablejs/modular/sortable.esm.js",
53
- output: {
54
- file: "vendor/javascript/sortable.min.js"
55
- },
56
- plugins: [terser()]
57
- },
58
- {
59
- input: "node_modules/select2/select2.min.js",
60
- output: {
61
- file: "vendor/javascript/select2.min.js"
62
- },
63
- context: "window"
64
- },
65
- {
66
- input: "node_modules/@ungap/custom-elements/min.js",
67
- output: {
68
- file: "vendor/javascript/ungap-custom-elements.min.js"
69
- }
70
- },
71
- {
72
- input: "node_modules/@rails/ujs/app/assets/javascripts/rails-ujs.esm.js",
73
- output: {
74
- file: "vendor/javascript/rails-ujs.min.js"
75
- },
76
- plugins: [terser()]
77
- },
78
- {
79
- input: "bundles/shoelace.js",
80
- output: {
81
- file: "vendor/javascript/shoelace.min.js"
82
- },
83
- plugins: [resolve(), terser()]
84
- },
85
- {
86
- input: "bundles/tinymce.js",
87
- output: {
88
- file: "vendor/javascript/tinymce.min.js",
89
- name: "tinymce",
90
- format: "esm"
91
- },
92
- plugins: [
93
- resolve({
94
- modulePaths: ["app/javascript"]
95
- }),
96
- commonjs(),
97
- terser()
98
- ]
99
- },
100
- {
101
- input: "app/javascript/preview.js",
102
- output: {
103
- file: "app/assets/builds/alchemy/preview.min.js"
104
- },
105
- context: "window",
106
- plugins: [terser()]
107
- }
108
- ]
data/vitest.config.js DELETED
@@ -1,21 +0,0 @@
1
- import { defineConfig } from "vitest/config"
2
- import path from "node:path"
3
-
4
- export default defineConfig({
5
- test: {
6
- environment: "jsdom",
7
- globals: true,
8
- root: "spec/javascript/alchemy_admin/",
9
- setupFiles: ["setup.js"]
10
- },
11
- resolve: {
12
- alias: {
13
- alchemy_admin: path.resolve(__dirname, "app/javascript/alchemy_admin"),
14
- assets: path.resolve(__dirname, "vendor/assets/javascripts"),
15
- vendor: path.resolve(__dirname, "vendor/javascript")
16
- }
17
- },
18
- define: {
19
- "global.Alchemy": {}
20
- }
21
- })