-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bundle and transpile all javascript with webpacker
Now we can write es6 code in any .js file! All the coffeescript has been converted into js. Changes: - Use es6 modules instead of globals. This is better encapsulation. This results in the removal of `window.Refuge`. Instead, to use a module, like Geocoder, just import it like this: `import { Geocoder } from 'path/to/geocoder';`
- Loading branch information
1 parent
1d8c468
commit fa0af01
Showing
10 changed files
with
50 additions
and
59 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,10 +1,9 @@ | ||
/* eslint no-console:0 */ | ||
// This file is automatically compiled by Webpack, along with any other files | ||
// present in this directory. You're encouraged to place your actual application logic in | ||
// a relevant structure within app/javascript and only use these pack files to reference | ||
// that code so it'll be compiled. | ||
// | ||
// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate | ||
// layout file, like app/views/layouts/application.html.erb | ||
// Vendor | ||
import { } from 'jquery-ujs' | ||
import 'bootstrap/dist/js/bootstrap' | ||
|
||
console.log('Hello World from Webpacker') | ||
// Views | ||
import './views/restrooms/index' | ||
import './views/restrooms/new' | ||
import './views/restrooms/restrooms' | ||
import './views/restrooms/search' |
2 changes: 1 addition & 1 deletion
2
app/assets/javascripts/lib/geocoder.es6 → app/javascript/packs/lib/geocoder.js
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
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