-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove sassc/sprockets dependencies.
add propshaft + css/js-bundling-rails instead
- Loading branch information
Showing
20 changed files
with
563 additions
and
12,990 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
web: env RUBY_DEBUG_OPEN=true bin/rails server | ||
js: yarn build --watch | ||
css: yarn build:css --watch |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//= link_tree ../builds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,34 @@ | ||
//= require rails-ujs | ||
//= require jquery3 | ||
import "@rails/ujs"; | ||
import "jquery"; | ||
|
||
import "../../vendor/sortable.min"; | ||
import "../../vendor/bootstrap.bundle.min"; | ||
import "../../vendor/diff/diff_match_patch.min"; | ||
import "../../vendor/diff/pretty_text_diff"; | ||
import "../../vendor/fontawesome"; | ||
import "../../vendor/redactor"; | ||
import "../../vendor/redactor/filemanager"; | ||
import "../../vendor/redactor/imagemanager"; | ||
import "../../vendor/redactor/definedlinks"; | ||
import "../../vendor/redactor/table"; | ||
import "../../vendor/redactor/video"; | ||
|
||
//= require comfy/vendor/codemirror | ||
//= require comfy/vendor/codemirror/mode/css/css | ||
//= require comfy/vendor/codemirror/mode/htmlmixed/htmlmixed | ||
//= require comfy/vendor/codemirror/mode/javascript/javascript | ||
//= require comfy/vendor/codemirror/mode/markdown/markdown | ||
//= require comfy/vendor/codemirror/mode/xml/xml | ||
//= require comfy/vendor/codemirror/addon/edit/closetag | ||
//= require comfy/vendor/sortable.min | ||
//= require comfy/vendor/bootstrap.bundle.min | ||
//= require comfy/vendor/diff/diff_match_patch.min | ||
//= require comfy/vendor/diff/pretty_text_diff | ||
//= require comfy/vendor/fontawesome | ||
//= require comfy/vendor/redactor | ||
//= require comfy/vendor/redactor/filemanager | ||
//= require comfy/vendor/redactor/imagemanager | ||
//= require comfy/vendor/redactor/definedlinks | ||
//= require comfy/vendor/redactor/table | ||
//= require comfy/vendor/redactor/video | ||
//= require_directory ../../vendor/redactor/i18n/ | ||
//= require comfy/vendor/flatpickr.min | ||
|
||
import "../../vendor/flatpickr.min"; | ||
//= require_directory ../../vendor/flatpickr/i18n/ | ||
|
||
//= require comfy/admin/cms/base | ||
//= require comfy/admin/cms/categories | ||
//= require comfy/admin/cms/codemirror | ||
//= require comfy/admin/cms/diff | ||
//= require comfy/admin/cms/file_link | ||
//= require comfy/admin/cms/file_upload | ||
//= require comfy/admin/cms/files_modal | ||
//= require comfy/admin/cms/page_fragments | ||
//= require comfy/admin/cms/sortable_list | ||
//= require comfy/admin/cms/slugify | ||
//= require comfy/admin/cms/timepicker | ||
//= require comfy/admin/cms/wysiwyg | ||
import "./base"; | ||
import "./categories"; | ||
// import "./codemirror"; | ||
import "./diff"; | ||
import "./file_link"; | ||
import "./file_upload"; | ||
import "./files_modal"; | ||
import "./page_fragments"; | ||
import "./sortable_list"; | ||
import "./slugify"; | ||
import "./timepicker"; | ||
import "./wysiwyg"; | ||
|
||
//= require comfy/admin/cms/custom | ||
import "./custom"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,46 @@ | ||
import { EditorView } from "@codemirror/view"; | ||
|
||
(() => { | ||
const codeMirrorInstances = []; | ||
window.CMS.codemirror = { | ||
init(root = document) { | ||
for (const textarea of root.querySelectorAll('textarea[data-cms-cm-mode]')) { | ||
const codemirror = CodeMirror.fromTextArea(textarea, { | ||
mode: textarea.dataset.cmsCmMode, | ||
tabSize: 2, | ||
lineWrapping: true, | ||
autoCloseTags: true, | ||
lineNumbers: true, | ||
viewportMargin: Infinity | ||
for (const textarea of root.querySelectorAll( | ||
"textarea[data-cms-cm-mode]" | ||
)) { | ||
const codemirror = new EditorView({ | ||
doc: textarea.value, | ||
// extensions: [], | ||
parent: textarea, | ||
}); | ||
|
||
// const codemirror = CodeMirror.fromTextArea(textarea, { | ||
// mode: textarea.dataset.cmsCmMode, | ||
// tabSize: 2, | ||
// lineWrapping: true, | ||
// autoCloseTags: true, | ||
// lineNumbers: true, | ||
// viewportMargin: Infinity, | ||
// }); | ||
codeMirrorInstances.push(codemirror); | ||
} | ||
|
||
const tabsRoot = root.id === 'form-fragments' ? root : root.querySelector('#form-fragments'); | ||
jQuery(tabsRoot).find('a[data-toggle="tab"]').on('shown.bs.tab', () => { | ||
for (const codemirror of codeMirrorInstances) { | ||
codemirror.refresh(); | ||
} | ||
}); | ||
const tabsRoot = | ||
root.id === "form-fragments" | ||
? root | ||
: root.querySelector("#form-fragments"); | ||
jQuery(tabsRoot) | ||
.find('a[data-toggle="tab"]') | ||
.on("shown.bs.tab", () => { | ||
for (const codemirror of codeMirrorInstances) { | ||
codemirror.refresh(); | ||
} | ||
}); | ||
}, | ||
dispose() { | ||
for (const codemirror of codeMirrorInstances) { | ||
codemirror.toTextArea(); | ||
} | ||
codeMirrorInstances.length = 0; | ||
} | ||
} | ||
}, | ||
}; | ||
})(); |
Oops, something went wrong.