Merge pull request #8364 from cmrd-senya/use-yarn-for-assets
Use yarn for assets
This commit is contained in:
commit
0cd1080b76
21 changed files with 322 additions and 160 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -44,7 +44,7 @@ jobs:
|
|||
- 5432:5432
|
||||
steps:
|
||||
- name: Install system dependencies
|
||||
run: sudo apt update && sudo apt install -y build-essential curl git gsfonts imagemagick libcurl4-openssl-dev libidn11-dev libmagickwand-dev libssl-dev libxml2-dev libxslt1-dev
|
||||
run: sudo apt update && sudo apt install -y build-essential curl git gsfonts imagemagick libcurl4-openssl-dev libidn11-dev libmagickwand-dev libssl-dev libxml2-dev libxslt1-dev yarnpkg
|
||||
- name: Start MySQL
|
||||
run: sudo systemctl start mysql.service
|
||||
if: matrix.db == 'mysql'
|
||||
|
|
|
|||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -78,3 +78,5 @@ diaspora.iml
|
|||
# WebTranslateIt
|
||||
.wti
|
||||
/__MACOSX/
|
||||
|
||||
node_modules
|
||||
|
|
|
|||
|
|
@ -16,6 +16,10 @@ After [a discussion with our community on Discourse](https://discourse.diasporaf
|
|||
|
||||
Although the chat was never enabled per default and was marked as experimental, some production pods did set up the integration and offered an XMPP service to their users. After this release, diaspora\* will no longer contain a chat applet, so users will no longer be able to use the webchat inside diaspora\*. The existing module that is used to enable users to authenticate to Prosody using their diaspora\* credentials will continue to work, but contact list synchronization might not work without further changes to the Prosody module, which is developed independently from this project.
|
||||
|
||||
## Yarn for frontend dependencies
|
||||
|
||||
We use yarn to install the frontend dependencies now, so you need to have that installed. See here for how to install it: https://yarnpkg.com/en/docs/install
|
||||
|
||||
## Refactor
|
||||
* Add bootstrapping for using ECMAScript 6 with automatic transpiling for compatibility [#7581](https://github.com/diaspora/diaspora/pull/7581)
|
||||
* Remove backporting of mention syntax [#7788](https://github.com/diaspora/diaspora/pull/7788)
|
||||
|
|
@ -24,6 +28,7 @@ Although the chat was never enabled per default and was marked as experimental,
|
|||
* Remove the JSXC/Prosody integration [#8069](https://github.com/diaspora/diaspora/pull/8069) [#8341](https://github.com/diaspora/diaspora/pull/8341)
|
||||
* Replace factory\_girl with factory\_bot [#8218](https://github.com/diaspora/diaspora/pull/8218)
|
||||
* Drop relay support [#8243](https://github.com/diaspora/diaspora/pull/8243)
|
||||
* Use yarn to manage the frontend dependencies [#8364](https://github.com/diaspora/diaspora/pull/8364)
|
||||
|
||||
## Bug fixes
|
||||
* Fix multiple photos upload progress bar [#7655](https://github.com/diaspora/diaspora/pull/7655)
|
||||
|
|
|
|||
34
Gemfile
34
Gemfile
|
|
@ -95,39 +95,6 @@ gem "js-routes", "2.2.4"
|
|||
gem "js_image_paths", "0.1.1"
|
||||
gem "sprockets-es6", "0.9.2"
|
||||
|
||||
source "https://gems.diasporafoundation.org" do
|
||||
gem "rails-assets-jquery", "3.6.0" # Should be kept in sync with jquery-rails
|
||||
|
||||
gem "rails-assets-highlightjs", "9.12.0"
|
||||
gem "rails-assets-markdown-it", "8.4.2"
|
||||
gem "rails-assets-markdown-it-diaspora-mention", "1.2.0"
|
||||
gem "rails-assets-markdown-it-footnote", "3.0.3"
|
||||
gem "rails-assets-markdown-it-hashtag", "0.4.0"
|
||||
gem "rails-assets-markdown-it--markdown-it-for-inline", "0.1.1"
|
||||
gem "rails-assets-markdown-it-sanitizer", "0.4.3"
|
||||
gem "rails-assets-markdown-it-sub", "1.0.0"
|
||||
gem "rails-assets-markdown-it-sup", "1.0.0"
|
||||
|
||||
gem "rails-assets-backbone", "1.3.3"
|
||||
gem "rails-assets-bootstrap", "3.4.1"
|
||||
gem "rails-assets-bootstrap-markdown", "2.10.0"
|
||||
gem "rails-assets-corejs-typeahead", "1.2.1"
|
||||
gem "rails-assets-cropperjs", "1.4.3"
|
||||
gem "rails-assets-fine-uploader", "5.13.0"
|
||||
gem "rails-assets-pica", "5.0.0"
|
||||
|
||||
# jQuery plugins
|
||||
|
||||
gem "rails-assets-autosize", "4.0.2"
|
||||
gem "rails-assets-blueimp-gallery", "2.33.0"
|
||||
gem "rails-assets-jquery.are-you-sure", "1.9.0"
|
||||
gem "rails-assets-jquery-placeholder", "2.3.1"
|
||||
gem "rails-assets-jquery-textchange", "0.2.3"
|
||||
gem "rails-assets-utatti-perfect-scrollbar", "1.4.0"
|
||||
end
|
||||
|
||||
gem "markdown-it-html5-embed", "1.0.0"
|
||||
|
||||
# Localization
|
||||
|
||||
gem "http_accept_language", "2.1.1"
|
||||
|
|
@ -292,7 +259,6 @@ group :development, :test do
|
|||
gem "chrome_remote", "0.3.0"
|
||||
gem "jasmine", "3.10.0"
|
||||
gem "jasmine-jquery-rails", "2.0.3"
|
||||
gem "rails-assets-jasmine-ajax", "4.0.0", source: "https://gems.diasporafoundation.org"
|
||||
gem "sinon-rails", "1.15.0"
|
||||
|
||||
# For `assigns` in controller specs
|
||||
|
|
|
|||
61
Gemfile.lock
61
Gemfile.lock
|
|
@ -1,6 +1,5 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
remote: https://gems.diasporafoundation.org/
|
||||
specs:
|
||||
actioncable (5.2.8)
|
||||
actionpack (= 5.2.8)
|
||||
|
|
@ -382,7 +381,6 @@ GEM
|
|||
mail (2.7.1)
|
||||
mini_mime (>= 0.1.1)
|
||||
marcel (1.0.2)
|
||||
markdown-it-html5-embed (1.0.0)
|
||||
memoizable (0.4.2)
|
||||
thread_safe (~> 0.3, >= 0.3.1)
|
||||
method_source (1.0.0)
|
||||
|
|
@ -521,40 +519,6 @@ GEM
|
|||
bundler (>= 1.3.0)
|
||||
railties (= 5.2.8)
|
||||
sprockets-rails (>= 2.0.0)
|
||||
rails-assets-autosize (4.0.2)
|
||||
rails-assets-backbone (1.3.3)
|
||||
rails-assets-underscore (>= 1.8.3)
|
||||
rails-assets-blueimp-gallery (2.33.0)
|
||||
rails-assets-bootstrap (3.4.1)
|
||||
rails-assets-jquery (>= 1.9.1, < 4)
|
||||
rails-assets-bootstrap-markdown (2.10.0)
|
||||
rails-assets-bootstrap (~> 3)
|
||||
rails-assets-corejs-typeahead (1.2.1)
|
||||
rails-assets-jquery (>= 1.11)
|
||||
rails-assets-cropperjs (1.4.3)
|
||||
rails-assets-fine-uploader (5.13.0)
|
||||
rails-assets-highlightjs (9.12.0)
|
||||
rails-assets-jasmine (3.4.0)
|
||||
rails-assets-jasmine-ajax (4.0.0)
|
||||
rails-assets-jasmine (~> 3)
|
||||
rails-assets-jquery (3.6.0)
|
||||
rails-assets-jquery-placeholder (2.3.1)
|
||||
rails-assets-jquery (>= 1.6)
|
||||
rails-assets-jquery-textchange (0.2.3)
|
||||
rails-assets-jquery
|
||||
rails-assets-jquery.are-you-sure (1.9.0)
|
||||
rails-assets-jquery (>= 1.4.2)
|
||||
rails-assets-markdown-it--markdown-it-for-inline (0.1.1)
|
||||
rails-assets-markdown-it (8.4.2)
|
||||
rails-assets-markdown-it-diaspora-mention (1.2.0)
|
||||
rails-assets-markdown-it-footnote (3.0.3)
|
||||
rails-assets-markdown-it-hashtag (0.4.0)
|
||||
rails-assets-markdown-it-sanitizer (0.4.3)
|
||||
rails-assets-markdown-it-sub (1.0.0)
|
||||
rails-assets-markdown-it-sup (1.0.0)
|
||||
rails-assets-pica (5.0.0)
|
||||
rails-assets-underscore (1.9.1)
|
||||
rails-assets-utatti-perfect-scrollbar (1.4.0)
|
||||
rails-controller-testing (1.0.5)
|
||||
actionpack (>= 5.0.1.rc1)
|
||||
actionview (>= 5.0.1.rc1)
|
||||
|
|
@ -822,7 +786,6 @@ DEPENDENCIES
|
|||
leaflet-rails (= 1.7.0)
|
||||
listen (= 3.7.1)
|
||||
logging-rails (= 0.6.0)
|
||||
markdown-it-html5-embed (= 1.0.0)
|
||||
mini_magick (= 4.11.0)
|
||||
minitest (= 5.15.0)
|
||||
mobile-fu (= 1.4.0)
|
||||
|
|
@ -849,30 +812,6 @@ DEPENDENCIES
|
|||
rack-rewrite (= 1.5.1)
|
||||
rack-ssl (= 1.4.1)
|
||||
rails (= 5.2.8)
|
||||
rails-assets-autosize (= 4.0.2)!
|
||||
rails-assets-backbone (= 1.3.3)!
|
||||
rails-assets-blueimp-gallery (= 2.33.0)!
|
||||
rails-assets-bootstrap (= 3.4.1)!
|
||||
rails-assets-bootstrap-markdown (= 2.10.0)!
|
||||
rails-assets-corejs-typeahead (= 1.2.1)!
|
||||
rails-assets-cropperjs (= 1.4.3)!
|
||||
rails-assets-fine-uploader (= 5.13.0)!
|
||||
rails-assets-highlightjs (= 9.12.0)!
|
||||
rails-assets-jasmine-ajax (= 4.0.0)!
|
||||
rails-assets-jquery (= 3.6.0)!
|
||||
rails-assets-jquery-placeholder (= 2.3.1)!
|
||||
rails-assets-jquery-textchange (= 0.2.3)!
|
||||
rails-assets-jquery.are-you-sure (= 1.9.0)!
|
||||
rails-assets-markdown-it (= 8.4.2)!
|
||||
rails-assets-markdown-it--markdown-it-for-inline (= 0.1.1)!
|
||||
rails-assets-markdown-it-diaspora-mention (= 1.2.0)!
|
||||
rails-assets-markdown-it-footnote (= 3.0.3)!
|
||||
rails-assets-markdown-it-hashtag (= 0.4.0)!
|
||||
rails-assets-markdown-it-sanitizer (= 0.4.3)!
|
||||
rails-assets-markdown-it-sub (= 1.0.0)!
|
||||
rails-assets-markdown-it-sup (= 1.0.0)!
|
||||
rails-assets-pica (= 5.0.0)!
|
||||
rails-assets-utatti-perfect-scrollbar (= 1.4.0)!
|
||||
rails-controller-testing (= 1.0.5)
|
||||
rails-i18n (= 5.1.3)
|
||||
rails-timeago (= 2.20.0)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
//= require_tree ./collections
|
||||
//= require_tree ./views
|
||||
|
||||
//= require utatti-perfect-scrollbar/dist/perfect-scrollbar
|
||||
//= require perfect-scrollbar/dist/perfect-scrollbar
|
||||
|
||||
var app = {
|
||||
collections: {},
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
//= require ./publisher/poll_creator_view
|
||||
//= require ./publisher/services_view
|
||||
//= require ./publisher/uploader_view
|
||||
//= require jquery-textchange
|
||||
|
||||
app.views.Publisher = Backbone.View.extend({
|
||||
|
||||
|
|
@ -22,7 +21,7 @@ app.views.Publisher = Backbone.View.extend({
|
|||
"focus textarea" : "open",
|
||||
"submit form" : "createStatusMessage",
|
||||
"click #submit" : "createStatusMessage",
|
||||
"textchange #status_message_text": "checkSubmitAvailability",
|
||||
"input #status_message_text": "checkSubmitAvailability",
|
||||
"click #locator" : "showLocation",
|
||||
"click #poll_creator" : "togglePollCreator",
|
||||
"click #hide_location" : "destroyLocation",
|
||||
|
|
@ -52,10 +51,6 @@ app.views.Publisher = Backbone.View.extend({
|
|||
this.$(".question_mark").hide();
|
||||
}
|
||||
|
||||
// this has to be here, otherwise for some reason the callback for the
|
||||
// textchange event won't be called in Backbone...
|
||||
this.inputEl.bind("textchange", $.noop);
|
||||
|
||||
$("body").click(function(event) {
|
||||
var $target = $(event.target);
|
||||
if ($target.closest("#publisher").length === 0 && !$target.hasClass("dropdown-backdrop")) {
|
||||
|
|
@ -134,10 +129,6 @@ app.views.Publisher = Backbone.View.extend({
|
|||
if (photoAttachments.length > 0) {
|
||||
new app.views.Gallery({el: photoAttachments});
|
||||
}
|
||||
},
|
||||
|
||||
onChange: function() {
|
||||
self.inputEl.trigger("textchange");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -369,8 +360,7 @@ app.views.Publisher = Backbone.View.extend({
|
|||
|
||||
// clear text
|
||||
this.inputEl.val("");
|
||||
this.inputEl.trigger("keyup")
|
||||
.trigger("keydown");
|
||||
this.inputEl.trigger("input");
|
||||
autosize.update(this.inputEl);
|
||||
|
||||
// remove photos
|
||||
|
|
@ -404,9 +394,6 @@ app.views.Publisher = Backbone.View.extend({
|
|||
// clear poll form
|
||||
this.viewPollCreator.clearInputs();
|
||||
|
||||
// force textchange plugin to update lastValue
|
||||
this.inputEl.data("lastValue", "");
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
//= require jquery3
|
||||
//= require handlebars.runtime
|
||||
//= require main
|
||||
//= require fine-uploader/fine-uploader
|
||||
//= require fine-uploader/fine-uploader/fine-uploader
|
||||
//= require mobile/mobile
|
||||
//= require jquery.autoSuggest.custom
|
||||
//= require contact-list
|
||||
//= require sinon
|
||||
//= require jasmine-ajax
|
||||
//= require jasmine-ajax/lib/mock-ajax
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
*/
|
||||
//= require js_image_paths
|
||||
//= require js-routes
|
||||
//= require underscore
|
||||
//= require backbone
|
||||
//= require autosize
|
||||
//= require underscore/underscore-umd
|
||||
//= require backbone/backbone
|
||||
//= require autosize/dist/autosize
|
||||
//= require charcount
|
||||
//= require jquery-placeholder
|
||||
//= require jquery-placeholder/jquery.placeholder
|
||||
//= require jquery.timeago
|
||||
//= require jquery-ui/core
|
||||
//= require jquery-ui/widget
|
||||
|
|
@ -16,11 +16,11 @@
|
|||
//= require jquery-ui/sortable
|
||||
//= require keycodes
|
||||
//= require jquery.autoSuggest.custom
|
||||
//= require fine-uploader/fine-uploader
|
||||
//= require fine-uploader/fine-uploader/fine-uploader
|
||||
//= require handlebars.runtime
|
||||
//= require_tree ../templates
|
||||
//= require posix-bracket-expressions
|
||||
//= require markdown-it
|
||||
//= require markdown-it/dist/markdown-it
|
||||
//= require markdown-it-diaspora-mention
|
||||
//= require markdown-it-for-inline
|
||||
//= require markdown-it-footnote
|
||||
|
|
@ -40,13 +40,13 @@
|
|||
//= require bootstrap
|
||||
//= require osmlocator
|
||||
//= require bootstrap-switch
|
||||
//= require blueimp-gallery
|
||||
//= require blueimp-gallery/blueimp-gallery-indicator
|
||||
//= require blueimp-gallery/js/blueimp-gallery
|
||||
//= require blueimp-gallery/js/blueimp-gallery-indicator
|
||||
//= require leaflet
|
||||
//= require api/authorization_page
|
||||
//= require bootstrap-markdown/bootstrap-markdown
|
||||
//= require bootstrap-markdown/js/bootstrap-markdown
|
||||
//= require helpers/markdown_editor
|
||||
//= require helpers/protocol_handler
|
||||
//= require jquery.are-you-sure
|
||||
//= require cropperjs/dist/cropper.js
|
||||
//= require pica
|
||||
//= require pica/dist/pica
|
||||
|
|
|
|||
|
|
@ -4,21 +4,20 @@
|
|||
*/
|
||||
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
|
||||
|
||||
//= require jquery-textchange
|
||||
//= require charcount
|
||||
//= require js-routes
|
||||
//= require autosize
|
||||
//= require autosize/dist/autosize
|
||||
//= require keycodes
|
||||
//= require jquery.autoSuggest.custom
|
||||
//= require fine-uploader/fine-uploader
|
||||
//= require fine-uploader/fine-uploader/fine-uploader
|
||||
//= require jquery.timeago
|
||||
//= require underscore
|
||||
//= require underscore/underscore-umd
|
||||
//= require bootstrap
|
||||
//= require pica
|
||||
//= require pica/dist/pica
|
||||
//= require diaspora
|
||||
//= require helpers/i18n
|
||||
//= require helpers/tags_autocomplete
|
||||
//= require bootstrap-markdown/bootstrap-markdown
|
||||
//= require bootstrap-markdown/js/bootstrap-markdown
|
||||
//= require helpers/markdown_editor
|
||||
//= require helpers/post_photo_uploader
|
||||
//= require widgets/timeago
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
@import 'utatti-perfect-scrollbar/css/perfect-scrollbar';
|
||||
@import 'perfect-scrollbar/css/perfect-scrollbar';
|
||||
|
||||
@import 'color-variables';
|
||||
@import 'bootstrap-complete';
|
||||
|
|
@ -94,14 +94,14 @@
|
|||
|
||||
// code
|
||||
@import 'code';
|
||||
@import 'highlightjs/github';
|
||||
@import 'highlightjs/styles/github';
|
||||
|
||||
// statistics
|
||||
@import 'statistics';
|
||||
|
||||
// gallery
|
||||
@import 'blueimp-gallery';
|
||||
@import 'blueimp-gallery/blueimp-gallery-indicator';
|
||||
@import 'blueimp-gallery/css/blueimp-gallery';
|
||||
@import 'blueimp-gallery/css/blueimp-gallery-indicator';
|
||||
@import 'gallery';
|
||||
|
||||
// settings
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ body {
|
|||
|
||||
pre code { border: 0; }
|
||||
|
||||
@import 'highlightjs/darcula';
|
||||
@import 'highlightjs/styles/darcula';
|
||||
|
||||
#single-post-content .head {
|
||||
.author-name { color: lighten($gray-lighter, 27%); }
|
||||
|
|
|
|||
|
|
@ -14,6 +14,14 @@ $margin: 15px;
|
|||
top: $margin;
|
||||
}
|
||||
|
||||
.slide-error {
|
||||
background-image: image-url("blueimp-gallery/img/error.svg");
|
||||
}
|
||||
|
||||
.slide-loading {
|
||||
background-image: image-url("blueimp-gallery/img/loading.gif");
|
||||
}
|
||||
|
||||
.too-tall {
|
||||
margin-bottom: $margin * 2 + $thumbnail-size;
|
||||
max-height: none;
|
||||
|
|
|
|||
11
bin/yarn
Executable file
11
bin/yarn
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env ruby
|
||||
APP_ROOT = File.expand_path('..', __dir__)
|
||||
Dir.chdir(APP_ROOT) do
|
||||
begin
|
||||
exec "yarnpkg", *ARGV
|
||||
rescue Errno::ENOENT
|
||||
$stderr.puts "Yarn executable was not detected in the system."
|
||||
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
|
||||
exit 1
|
||||
end
|
||||
end
|
||||
|
|
@ -2,27 +2,12 @@
|
|||
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# bootstrap-markdown plugin relies on rails-assets-bootstrap gem but we use
|
||||
# bootstrap-sass this line makes sure we exclude every asset comming
|
||||
# from rails-assets-bootstrap to prevent conflicts with bootstrap-sass
|
||||
|
||||
# See https://github.com/tenex/rails-assets/issues/314
|
||||
Rails.application.config.after_initialize do
|
||||
# add the gem names you wish to reject to the below array
|
||||
excluded_gem_names = ["rails-assets-bootstrap"]
|
||||
|
||||
excluded_gem_full_names = Gem::Specification.select {|g| excluded_gem_names.include? g.name }.flat_map(&:full_name)
|
||||
Rails.application.config.assets.paths.reject! do |path|
|
||||
excluded_gem_full_names.any? {|gem_name| path.include? gem_name }
|
||||
end
|
||||
end
|
||||
|
||||
# Version of your assets, change this if you want to expire all your assets.
|
||||
Rails.application.config.assets.version = "1.0"
|
||||
|
||||
# Add additional assets to the asset load path.
|
||||
# Rails.application.config.assets.paths << Emoji.images_path
|
||||
# Add Yarn node_modules folder to the asset load path.
|
||||
# Rails.application.config.assets.paths << Rails.root.join("node_modules")
|
||||
Rails.application.config.assets.paths << Rails.root.join("node_modules")
|
||||
|
||||
Rails.application.config.public_file_server.enabled = AppConfig.environment.assets.serve?
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ RUN DEBIAN_FRONTEND=noninteractive \
|
|||
libxslt1-dev \
|
||||
nodejs \
|
||||
gosu \
|
||||
yarnpkg \
|
||||
&& \
|
||||
curl https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o ./google-chrome.deb && \
|
||||
apt install -y -qq --no-install-recommends ./google-chrome.deb && \
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ $.fn.charCount = function(opts) {
|
|||
counter.text(opts.allowed - count);
|
||||
};
|
||||
|
||||
$this.on("textchange", update);
|
||||
$this.on("input", update);
|
||||
update();
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -34,3 +34,5 @@ namespace :assets do
|
|||
Rake::Task["assets:non_digest_assets"].invoke
|
||||
end
|
||||
end
|
||||
|
||||
Rake::Task["assets:generate_error_pages"].enhance [ "yarn:install" ]
|
||||
|
|
|
|||
33
package.json
Normal file
33
package.json
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"repository": "git@github.com:diaspora/diaspora.git",
|
||||
"author": "diaspora* team",
|
||||
"license": "AGPL-3.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"autosize": "4.0.2",
|
||||
"backbone": "1.3.3",
|
||||
"blueimp-gallery": "2.33.0",
|
||||
"bootstrap-markdown": "2.10.0",
|
||||
"corejs-typeahead": "1.2.1",
|
||||
"cropperjs": "1.4.3",
|
||||
"fine-uploader": "5.13.0",
|
||||
"highlightjs": "9.12.0",
|
||||
"jquery": "3.6.0",
|
||||
"jquery-placeholder": "2.3.1",
|
||||
"jquery.are-you-sure": "1.9.0",
|
||||
"markdown-it": "8.4.2",
|
||||
"markdown-it-diaspora-mention": "^1.2.0",
|
||||
"markdown-it-footnote": "3.0.3",
|
||||
"markdown-it-for-inline": "0.1.1",
|
||||
"markdown-it-hashtag": "0.4.0",
|
||||
"markdown-it-html5-embed": "^1.0.0",
|
||||
"markdown-it-sanitizer": "0.4.3",
|
||||
"markdown-it-sub": "1.0.0",
|
||||
"markdown-it-sup": "1.0.0",
|
||||
"perfect-scrollbar": "1.4.0",
|
||||
"pica": "5.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"jasmine-ajax": "4.0.0"
|
||||
}
|
||||
}
|
||||
|
|
@ -55,15 +55,15 @@ describe("$.fn.charCount", function() {
|
|||
expect(this.counter.text()).toEqual("99");
|
||||
|
||||
this.input.val(this.repeat("a", 99));
|
||||
this.input.trigger("textchange");
|
||||
this.input.trigger("input");
|
||||
expect(this.counter.text()).toEqual("1");
|
||||
|
||||
this.input.val(this.repeat("a", 102));
|
||||
this.input.trigger("textchange");
|
||||
this.input.trigger("input");
|
||||
expect(this.counter.text()).toEqual("-2");
|
||||
|
||||
this.input.val("");
|
||||
this.input.trigger("textchange");
|
||||
this.input.trigger("input");
|
||||
expect(this.counter.text()).toEqual("100");
|
||||
});
|
||||
|
||||
|
|
@ -74,27 +74,27 @@ describe("$.fn.charCount", function() {
|
|||
expect(this.counter).not.toHaveClass("text-danger");
|
||||
|
||||
this.input.val(this.repeat("a", 90));
|
||||
this.input.trigger("textchange");
|
||||
this.input.trigger("input");
|
||||
expect(this.counter).not.toHaveClass("text-warning");
|
||||
expect(this.counter).not.toHaveClass("text-danger");
|
||||
|
||||
this.input.val(this.repeat("a", 91));
|
||||
this.input.trigger("textchange");
|
||||
this.input.trigger("input");
|
||||
expect(this.counter).toHaveClass("text-warning");
|
||||
expect(this.counter).not.toHaveClass("text-danger");
|
||||
|
||||
this.input.val(this.repeat("a", 100));
|
||||
this.input.trigger("textchange");
|
||||
this.input.trigger("input");
|
||||
expect(this.counter).toHaveClass("text-warning");
|
||||
expect(this.counter).not.toHaveClass("text-danger");
|
||||
|
||||
this.input.val(this.repeat("a", 101));
|
||||
this.input.trigger("textchange");
|
||||
this.input.trigger("input");
|
||||
expect(this.counter).not.toHaveClass("text-warning");
|
||||
expect(this.counter).toHaveClass("text-danger");
|
||||
|
||||
this.input.val("");
|
||||
this.input.trigger("textchange");
|
||||
this.input.trigger("input");
|
||||
expect(this.counter).not.toHaveClass("text-warning");
|
||||
expect(this.counter).not.toHaveClass("text-danger");
|
||||
});
|
||||
|
|
|
|||
224
yarn.lock
Normal file
224
yarn.lock
Normal file
|
|
@ -0,0 +1,224 @@
|
|||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
argparse@^1.0.7:
|
||||
version "1.0.10"
|
||||
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
|
||||
integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==
|
||||
dependencies:
|
||||
sprintf-js "~1.0.2"
|
||||
|
||||
autosize@4.0.2:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/autosize/-/autosize-4.0.2.tgz#073cfd07c8bf45da4b9fd153437f5bafbba1e4c9"
|
||||
integrity sha512-jnSyH2d+qdfPGpWlcuhGiHmqBJ6g3X+8T+iRwFrHPLVcdoGJE/x6Qicm6aDHfTsbgZKxyV8UU/YB2p4cjKDRRA==
|
||||
|
||||
backbone@1.3.3:
|
||||
version "1.3.3"
|
||||
resolved "https://registry.yarnpkg.com/backbone/-/backbone-1.3.3.tgz#4cc80ea7cb1631ac474889ce40f2f8bc683b2999"
|
||||
integrity sha512-aK+k3TiU4tQDUrRCymDDE7XDFnMVuyE6zbZ4JX7mb4pJbQTVOH997/kyBzb8wB2s5Y/Oh7EUfj+sZhwRPxWwow==
|
||||
dependencies:
|
||||
underscore ">=1.8.3"
|
||||
|
||||
blueimp-gallery@2.33.0:
|
||||
version "2.33.0"
|
||||
resolved "https://registry.yarnpkg.com/blueimp-gallery/-/blueimp-gallery-2.33.0.tgz#f897912a1bbf65be904454d5990be6155799dd45"
|
||||
integrity sha512-gz++nODmcJkENLXizdazy4z4EqoJCXyOisrH6M/fR3JE507yO+tPgoEsRCBggGwMAmQsu6kWACfldlq7RIa+Lg==
|
||||
|
||||
bootstrap-markdown@2.10.0:
|
||||
version "2.10.0"
|
||||
resolved "https://registry.yarnpkg.com/bootstrap-markdown/-/bootstrap-markdown-2.10.0.tgz#65234277840454ee1adc7482b2f4a5e3975dace5"
|
||||
integrity sha512-dh2uKRsa8Fjy+oZNndproaJx0hFmV4SdpU/d/4kH+QggA6iVEiEE7Ga4Fb0BOpnhfagcCRI6eBAgmJtHELh+rg==
|
||||
|
||||
core-js@^2.4.1:
|
||||
version "2.6.12"
|
||||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec"
|
||||
integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==
|
||||
|
||||
corejs-typeahead@1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/corejs-typeahead/-/corejs-typeahead-1.2.1.tgz#345a8afe664cc494075b59b64777807f0b3f132b"
|
||||
integrity sha512-g22FqtnuB8CPq4K/dpPW2Th4fW50PCBBc4H1XWyrZQl22BM6JKDw2owfCLMHoCaQQapMkAPfNsUoR/TJeFEgrg==
|
||||
dependencies:
|
||||
jquery ">=1.11"
|
||||
|
||||
cropperjs@1.4.3:
|
||||
version "1.4.3"
|
||||
resolved "https://registry.yarnpkg.com/cropperjs/-/cropperjs-1.4.3.tgz#dc44d6c9e73269e7f96894c726ab91e8913f9e90"
|
||||
integrity sha512-fsUjHuS9mvKVh2aXVRgNcUDlFplW+v4eEB6sOHVI9kMV4G3GViSD4p1qvNLg1ko4ZhOnF0L8/9uXcY4s2bFQPg==
|
||||
|
||||
entities@~1.1.1:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56"
|
||||
integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==
|
||||
|
||||
fine-uploader@5.13.0:
|
||||
version "5.13.0"
|
||||
resolved "https://registry.yarnpkg.com/fine-uploader/-/fine-uploader-5.13.0.tgz#091c1fafb2ee7219283f259fd9aae828c0e45574"
|
||||
integrity sha512-qRNMJ/7vMwVchnByflf6xd4zqkTpoHmplMRu2ZXZQ+rTM/kGh8Zz2PM9HFAn1R8T7dBnVJg8pW+aoE9XQzlbsw==
|
||||
|
||||
glur@^1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/glur/-/glur-1.1.2.tgz#f20ea36db103bfc292343921f1f91e83c3467689"
|
||||
integrity sha512-l+8esYHTKOx2G/Aao4lEQ0bnHWg4fWtJbVoZZT9Knxi01pB8C80BR85nONLFwkkQoFRCmXY+BUcGZN3yZ2QsRA==
|
||||
|
||||
highlightjs@9.12.0:
|
||||
version "9.12.0"
|
||||
resolved "https://registry.yarnpkg.com/highlightjs/-/highlightjs-9.12.0.tgz#9b84eb42a7aa8488eb69ac79fec44cf495bf72a1"
|
||||
integrity sha512-eAhWMtDZaOZIQdxIP4UEB1vNp/CVXQPdMSihTSuaExhFIRC0BVpXbtP3mTP1hDoGOyh7nbB3cuC3sOPhG5wGDA==
|
||||
|
||||
inherits@^2.0.3:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||
|
||||
jasmine-ajax@4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/jasmine-ajax/-/jasmine-ajax-4.0.0.tgz#7d8ba7e47e3f7e780e155fe9aa563faafa7e1a26"
|
||||
integrity sha512-htTxNw38BSHxxmd8RRMejocdPqLalGHU6n3HWFbzp/S8AuTQd1MYjkSH3dYDsbZ7EV1Xqx/b94m3tKaVSVBV2A==
|
||||
|
||||
jquery-placeholder@2.3.1:
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/jquery-placeholder/-/jquery-placeholder-2.3.1.tgz#6025a1241019c08a8fb3ab8ed076285c05ba5e91"
|
||||
integrity sha512-5MK5cRqAfgLrnky1vlLOoK/1SSivYmCFDWwYWLI92aD7VhiIBMmmI6V56F5xyROIXCJnd4BtTBtWzEZ3SiIGTw==
|
||||
|
||||
jquery.are-you-sure@1.9.0:
|
||||
version "1.9.0"
|
||||
resolved "https://registry.yarnpkg.com/jquery.are-you-sure/-/jquery.are-you-sure-1.9.0.tgz#16aaa2c6080fa214f64027239ae3a34ad6a6265e"
|
||||
integrity sha512-2r0uFx8CyAopjeHGOdvvwpFP921TnW1+v1uJXcAWQYHYGB1tryTDhQY+5u6HsVeMwbWiRTKVZFWnLaFpDvIqZQ==
|
||||
dependencies:
|
||||
jquery ">=1.4.2"
|
||||
|
||||
jquery@3.6.0, jquery@>=1.11, jquery@>=1.4.2:
|
||||
version "3.6.0"
|
||||
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.0.tgz#c72a09f15c1bdce142f49dbf1170bdf8adac2470"
|
||||
integrity sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==
|
||||
|
||||
linkify-it@^2.0.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-2.2.0.tgz#e3b54697e78bf915c70a38acd78fd09e0058b1cf"
|
||||
integrity sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==
|
||||
dependencies:
|
||||
uc.micro "^1.0.1"
|
||||
|
||||
markdown-it-diaspora-mention@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/markdown-it-diaspora-mention/-/markdown-it-diaspora-mention-1.2.0.tgz#30bf441947fbd425943326d8de975b2b21f7ab5f"
|
||||
integrity sha512-wpi4ll/QIFbaZUz/mA9dvqTbNYaRupWv7OhNqZ9AeXlyzvwAWc1ooJnrNZuq7NAtajYj2Q3884Bd6YzdbpE+cA==
|
||||
dependencies:
|
||||
core-js "^2.4.1"
|
||||
|
||||
markdown-it-footnote@3.0.3:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/markdown-it-footnote/-/markdown-it-footnote-3.0.3.tgz#e0e4c0d67390a4c5f0c75f73be605c7c190ca4d8"
|
||||
integrity sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w==
|
||||
|
||||
markdown-it-for-inline@0.1.1:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/markdown-it-for-inline/-/markdown-it-for-inline-0.1.1.tgz#435f2316f5b5e68e1450cfa2242f2b8d59adc75f"
|
||||
integrity sha512-lLQuczOg90a9q9anIUbmq+M+FFrIYNN5TfpccLDRchQic8nj/uTqaJKoYr73FF2tR4O8mFfh2ZzCDAAB2MZJgA==
|
||||
|
||||
markdown-it-hashtag@0.4.0:
|
||||
version "0.4.0"
|
||||
resolved "https://registry.yarnpkg.com/markdown-it-hashtag/-/markdown-it-hashtag-0.4.0.tgz#99824c44eb06a82167574cc271398fa80d79b631"
|
||||
integrity sha512-+VCMH+f4/Ud5wPEtcAMrlLbUrrGViwR9JvjPy//X3Z7ZG1j5nQuHtDLTGZfMhkqYTMY+cTZgZkVNBsXMfU93Yg==
|
||||
|
||||
markdown-it-html5-embed@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/markdown-it-html5-embed/-/markdown-it-html5-embed-1.0.0.tgz#f36bedca1eb12ce4df2d53b5ec72f62ba5e094b3"
|
||||
integrity sha512-SPgugO/1+/9sZcgxoxijoTHSUpCUgFCNe1MSuTmDxDkV6NQrVzMclhRMFgE/rcHO+2rhIg3U7Oy80XA/E8ytpg==
|
||||
dependencies:
|
||||
markdown-it "^8.4.0"
|
||||
mimoza "~1.0.0"
|
||||
|
||||
markdown-it-sanitizer@0.4.3:
|
||||
version "0.4.3"
|
||||
resolved "https://registry.yarnpkg.com/markdown-it-sanitizer/-/markdown-it-sanitizer-0.4.3.tgz#2ba34e9fe16e6372ce7192fb50b37d9dfbff0102"
|
||||
integrity sha512-0Q2ua8+oDN7/3r5UXMnbVq8C+LRfT2pzVKA+h4nXTLEMBFQDwp7qJZOe7DkBa79C7V2cSBXJyScxJ7vYs9kE2w==
|
||||
|
||||
markdown-it-sub@1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/markdown-it-sub/-/markdown-it-sub-1.0.0.tgz#375fd6026eae7ddcb012497f6411195ea1e3afe8"
|
||||
integrity sha512-z2Rm/LzEE1wzwTSDrI+FlPEveAAbgdAdPhdWarq/ZGJrGW/uCQbKAnhoCsE4hAbc3SEym26+W2z/VQB0cQiA9Q==
|
||||
|
||||
markdown-it-sup@1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/markdown-it-sup/-/markdown-it-sup-1.0.0.tgz#cb9c9ff91a5255ac08f3fd3d63286e15df0a1fc3"
|
||||
integrity sha512-E32m0nV9iyhRR7CrhnzL5msqic7rL1juWre6TQNxsnApg7Uf+F97JOKxUijg5YwXz86lZ0mqfOnutoryyNdntQ==
|
||||
|
||||
markdown-it@8.4.2, markdown-it@^8.4.0:
|
||||
version "8.4.2"
|
||||
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.4.2.tgz#386f98998dc15a37722aa7722084f4020bdd9b54"
|
||||
integrity sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==
|
||||
dependencies:
|
||||
argparse "^1.0.7"
|
||||
entities "~1.1.1"
|
||||
linkify-it "^2.0.0"
|
||||
mdurl "^1.0.1"
|
||||
uc.micro "^1.0.5"
|
||||
|
||||
mdurl@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e"
|
||||
integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==
|
||||
|
||||
mime-db@^1.6.0:
|
||||
version "1.52.0"
|
||||
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70"
|
||||
integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==
|
||||
|
||||
mimoza@~1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/mimoza/-/mimoza-1.0.0.tgz#d74aa4fe08932f005e430bdc7bfcfa95fcab4e62"
|
||||
integrity sha512-+j7SSye/hablu66K/jjeyPmk6WL8RoXfeZ+MMn37vSNDGuaWY/5wm10LpSpxAHX4kNoEwkTWYHba8ePVip+Hqg==
|
||||
dependencies:
|
||||
mime-db "^1.6.0"
|
||||
|
||||
multimath@^1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/multimath/-/multimath-1.0.3.tgz#eadee6fb9d727d329d64d60bba247af42334451d"
|
||||
integrity sha512-Pfkai+VVbWSBL2XyzKIisZ2HFJ4a6lTWoyfjUUMu34bFkewmmYuG9/mB6l8/7O/Zs2Ap3u81ueKxTHoOmkZp4Q==
|
||||
dependencies:
|
||||
glur "^1.1.2"
|
||||
object-assign "^4.1.1"
|
||||
|
||||
object-assign@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
|
||||
integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
|
||||
|
||||
perfect-scrollbar@1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/perfect-scrollbar/-/perfect-scrollbar-1.4.0.tgz#5d014ef9775e1f43058a1dbae9ed1daf0e7091f1"
|
||||
integrity sha512-/2Sk/khljhdrsamjJYS5NjrH+GKEHEwh7zFSiYyxROyYKagkE4kSn2zDQDRTOMo8mpT2jikxx6yI1dG7lNP/hw==
|
||||
|
||||
pica@5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/pica/-/pica-5.0.0.tgz#c01ca5bce8ba07c0e7fd4d0c408199e8ad0a2f86"
|
||||
integrity sha512-g+Ik3Co+2ybRYOrh77xUz+BsFF+anyAdqX+XRGTWbEW6u7CbNA6/m2wKAiloZPFngmomh6HOKcY9AperpV5Zzg==
|
||||
dependencies:
|
||||
inherits "^2.0.3"
|
||||
multimath "^1.0.3"
|
||||
object-assign "^4.1.1"
|
||||
webworkify "^1.5.0"
|
||||
|
||||
sprintf-js@~1.0.2:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
|
||||
integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==
|
||||
|
||||
uc.micro@^1.0.1, uc.micro@^1.0.5:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac"
|
||||
integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==
|
||||
|
||||
underscore@>=1.8.3:
|
||||
version "1.13.4"
|
||||
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.4.tgz#7886b46bbdf07f768e0052f1828e1dcab40c0dee"
|
||||
integrity sha512-BQFnUDuAQ4Yf/cYY5LNrK9NCJFKriaRbD9uR1fTeXnBeoa97W0i41qkZfGO9pSo8I5KzjAcSY2XYtdf0oKd7KQ==
|
||||
|
||||
webworkify@^1.5.0:
|
||||
version "1.5.0"
|
||||
resolved "https://registry.yarnpkg.com/webworkify/-/webworkify-1.5.0.tgz#734ad87a774de6ebdd546e1d3e027da5b8f4a42c"
|
||||
integrity sha512-AMcUeyXAhbACL8S2hqqdqOLqvJ8ylmIbNwUIqQujRSouf4+eUFaXbG6F1Rbu+srlJMmxQWsiU7mOJi0nMBfM1g==
|
||||
Loading…
Reference in a new issue