Created
May 4, 2017 01:05
-
-
Save y-temp4/55d95b06f5a168817877d2675eea74d2 to your computer and use it in GitHub Desktop.
Webpackerのディレクトリ構成をRailsから切り離す形に変える方法 ref: http://qiita.com/y-temp4/items/917fd541676bd04b78a9
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
# See https://help.github.com/articles/ignoring-files for more about ignoring files. | |
# | |
# If you find yourself ignoring temporary files generated by your text editor | |
# or operating system, you probably want to add a global ignore instead: | |
# git config --global core.excludesfile '~/.gitignore_global' | |
# Ignore bundler config. | |
/.bundle | |
# Ignore all logfiles and tempfiles. | |
/log/* | |
/tmp/* | |
!/log/.keep | |
!/tmp/.keep | |
/node_modules | |
/yarn-error.log | |
.byebug_history | |
+/public/entry | |
-/public/packs | |
/node_modules | |
vendor/bundle |
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
/* 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 | |
import 'stylesheets/application' | |
import 'javascripts/hello_react.jsx' | |
console.log('Hello World from Webpacker') |
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
body { | |
background: red; | |
} |
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
frontend | |
├── entry | |
├── javascripts | |
└── stylesheets |
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
<%= javascript_pack_tag 'application' %> | |
<%= stylesheet_pack_tag 'application' %> |
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
{ | |
"application.css": "http://localhost:8080/entry/application.css", | |
"application.css.map": "http://localhost:8080/entry/application.css.map", | |
"application.js": "http://localhost:8080/entry/application.js", | |
"application.js.map": "http://localhost:8080/entry/application.js.map" | |
} |
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
default: &default | |
config: config/webpack | |
- entry: packs | |
+ entry: entry | |
output: public | |
manifest: manifest.json | |
node_modules: node_modules | |
- source: app/javascript | |
+ source: frontend | |
extensions: | |
- .coffee | |
- .js | |
- .jsx | |
- .ts | |
- .vue | |
- .sass | |
- .scss | |
- .css | |
- .png | |
- .svg | |
- .gif | |
- .jpeg | |
- .jpg | |
development: | |
<<: *default | |
test: | |
<<: *default | |
manifest: manifest-test.json | |
production: | |
<<: *default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment