No underscore style (#42898)

Just like activestorage.js
This commit is contained in:
David Heinemeier Hansson 2021-07-28 15:34:59 -04:00 committed by GitHub
parent 5970a19f1b
commit 0c2a94c265
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions

View File

@ -6,7 +6,7 @@ You can read more about Action Text in the [Action Text Overview](https://edgegu
## Development
The JavaScript for Action Text is distributed both as a npm module under @rails/actiontext and via the asset pipeline as action_text.js (and we mirror Trix as trix.js). To ensure that the latter remains in sync, you must run `yarn build` and checkin the artifacts whenever the JavaScript source or the Trix dependency is bumped. CSS changes must be brought over manually to app/assets/stylesheets/trix.css
The JavaScript for Action Text is distributed both as a npm module under @rails/actiontext and via the asset pipeline as actiontext.js (and we mirror Trix as trix.js). To ensure that the latter remains in sync, you must run `yarn build` and checkin the artifacts whenever the JavaScript source or the Trix dependency is bumped. CSS changes must be brought over manually to app/assets/stylesheets/trix.css
## License

View File

@ -28,7 +28,7 @@ module ActionText
initializer "action_text.asset" do
if Rails.application.config.respond_to?(:assets)
Rails.application.config.assets.precompile += %w( action_text trix )
Rails.application.config.assets.precompile += %w( actiontext.js trix.js trix.css )
end
end

View File

@ -45,12 +45,12 @@ module ActionText
end
else
if (application_layout_path = Rails.root.join("app/views/layouts/application.html.erb")).exist?
insert_into_file application_layout_path.to_s, %(\n <%= javascript_include_tag "trix", "action_text", "data-turbo-track": "reload", defer: true %>), before: /\s*<\/head>/
insert_into_file application_layout_path.to_s, %(\n <%= javascript_include_tag "trix", "actiontext", "data-turbo-track": "reload", defer: true %>), before: /\s*<\/head>/
else
say <<~INSTRUCTIONS, :green
You must add the action_text.js and trix.js JavaScript files to the head of your application layout:
You must add the actiontext.js and trix.js JavaScript files to the head of your application layout:
<%= javascript_include_tag "trix", "action_text", "data-turbo-track": "reload", defer: true %>
<%= javascript_include_tag "trix", "actiontext", "data-turbo-track": "reload", defer: true %>
INSTRUCTIONS
end
end

View File

@ -5,7 +5,7 @@ export default [
{
input: "app/javascript/actiontext/index.js",
output: {
file: "app/assets/javascripts/action_text.js",
file: "app/assets/javascripts/actiontext.js",
format: "es"
},
plugins: [