-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move out integration loaders (#1103)
- Loading branch information
1 parent
4f5e1ac
commit 694f5a8
Showing
23 changed files
with
225 additions
and
66 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
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,22 @@ | ||
require "webpacker/configuration" | ||
|
||
say "Copying coffee loader to config/webpack/loaders" | ||
copy_file "#{__dir__}/loaders/coffee.js", Rails.root.join("config/webpack/loaders/coffee.js").to_s | ||
|
||
say "Adding coffee loader to config/webpack/environment.js" | ||
insert_into_file Rails.root.join("config/webpack/environment.js").to_s, | ||
"const coffee = require('./loaders/coffee')\n", | ||
after: "const { environment } = require('@rails/webpacker')\n" | ||
|
||
insert_into_file Rails.root.join("config/webpack/environment.js").to_s, | ||
"environment.loaders.append('coffee', coffee)\n", | ||
before: "module.exports" | ||
|
||
say "Copying the example entry file to #{Webpacker.config.source_entry_path}" | ||
copy_file "#{__dir__}/examples/coffee/hello_coffee.coffee", | ||
"#{Webpacker.config.source_entry_path}/hello_coffee.coffee" | ||
|
||
say "Installing all Coffeescript dependencies" | ||
run "yarn add [email protected] coffee-loader" | ||
|
||
say "Webpacker now supports Coffeeescript 🎉", :green |
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,22 @@ | ||
require "webpacker/configuration" | ||
|
||
say "Copying vue loader to config/webpack/loaders" | ||
copy_file "#{__dir__}/loaders/erb.js", Rails.root.join("config/webpack/loaders/erb.js").to_s | ||
|
||
say "Adding erb loader to config/webpack/environment.js" | ||
insert_into_file Rails.root.join("config/webpack/environment.js").to_s, | ||
"const erb = require('./loaders/erb')\n", | ||
after: "const { environment } = require('@rails/webpacker')\n" | ||
|
||
insert_into_file Rails.root.join("config/webpack/environment.js").to_s, | ||
"environment.loaders.append('erb', erb)\n", | ||
before: "module.exports" | ||
|
||
say "Copying the example entry file to #{Webpacker.config.source_entry_path}" | ||
copy_file "#{__dir__}/examples/erb/hello_erb.js.erb", | ||
"#{Webpacker.config.source_entry_path}/hello_erb.js.erb" | ||
|
||
say "Installing all Erb dependencies" | ||
run "yarn add rails-erb-loader" | ||
|
||
say "Webpacker now supports Erb in JS 🎉", :green |
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,4 @@ | ||
# Run this example by adding <%%= javascript_pack_tag 'hello_coffee' %> to the head of your layout file, | ||
# like app/views/layouts/application.html.erb. | ||
|
||
console.log 'Hello world from coffeescript' |
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,6 @@ | ||
// Run this example by adding <%%= javascript_pack_tag 'hello_erb' %> to the head of your layout file, | ||
// like app/views/layouts/application.html.erb. | ||
|
||
<% name = 'Erb' %> | ||
|
||
console.log('Hello world from <%= name %>') |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
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,23 +1,11 @@ | ||
const babel = require('./babel') | ||
const coffee = require('./coffee') | ||
const elm = require('./elm') | ||
const erb = require('./erb') | ||
const file = require('./file') | ||
const url = require('./url') | ||
const css = require('./css') | ||
const sass = require('./sass') | ||
const typescript = require('./typescript') | ||
const vue = require('./vue') | ||
|
||
module.exports = { | ||
url, | ||
babel, | ||
coffee, | ||
elm, | ||
erb, | ||
css, | ||
sass, | ||
typescript, | ||
vue, | ||
file | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.