- Notifications
You must be signed in to change notification settings - Fork 380
Integrate npm bootstrap-sass; Remove bootstrap-sass gem; Update README #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
7c6fb94
3856dc8
2c97240
8e860f7
c8fc39a
5fb984d
53bf847
a98f761
8b44d97
c8172ea
142e892
e4a2a05
09efcf9
3c59196
fb28f3f
73d504b
7a314d7
f82c7ab
e979382
223b549
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
| @@ -51,7 +51,4 @@ group :development, :test do | |
gem 'spring' | ||
end | ||
| ||
| ||
gem 'bootstrap-sass', '~> 3.2.0' | ||
gem 'autoprefixer-rails' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
| @@ -17,4 +17,3 @@ | |
| ||
//= require rails-bundle | ||
//= require turbolinks | ||
//= require bootstrap-sprockets |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
@import "bootstrap-sprockets"; | ||
@import "bootstrap"; | ||
@import "../../../webpack/assets/stylesheets/test-stylesheet"; | ||
@import "../../../webpack/assets/stylesheets/test-sass-stylesheet"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
| @@ -12,7 +12,16 @@ module.exports = { | |
entry: [ | ||
// to expose something Rails specific, uncomment the next line | ||
//"./scripts/rails_only", | ||
"./assets/javascripts/example" | ||
"./assets/javascripts/example", | ||
| ||
// Alternative for including everything with no customization | ||
'bootstrap-sass-loader' | ||
// | ||
// Example of using customization file | ||
//'bootstrap-sass!./bootstrap-sass.config.js' | ||
// | ||
// Example of using customization file with ExtractTextPlugin | ||
//"bootstrap-sass!./bootstrap-sass.extract-text-plugin.config.js" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should try the ExtractTextPlugin which will make a nice CSS file that can be placed in the asset pipeline. The advantage is that you'll be able to debug the CSS a bit better! | ||
], | ||
output: { | ||
filename: railsBundleFile, | ||
| @@ -28,9 +37,18 @@ module.exports = { | |
}, | ||
module: { | ||
loaders: [ | ||
// **IMPORTANT** This is needed so that each bootstrap js file required by | ||
// bootstrap-sass-loader has access to the jQuery object | ||
{ test: /bootstrap-sass\/assets\/javascripts\//, loader: 'imports?jQuery=jquery' }, | ||
{ test: /\.scss$/, loader: "style!css!sass?outputStyle=expanded&imagePath=/assets/images"}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to be sure the different add-ons for bootstrap that were coming from the gem can still be found from the node module. | ||
{ test: /\.woff$/, loader: "url-loader?limit=10000&minetype=application/font-woff" }, | ||
{ test: /\.ttf$/, loader: "file-loader" }, | ||
{ test: /\.eot$/, loader: "file-loader" }, | ||
{ test: /\.svg$/, loader: "file-loader" }, | ||
| ||
{ test: /\.jsx$/, loaders: ['es6', 'jsx?harmony'] }, | ||
// Next 2 lines expose jQuery and $ to any JavaScript files loaded after rails-bundle.js | ||
// in the Rails Asset Pipeline. Thus, load this one prior. | ||
// in the Rails Asset Pipeline. Thus, load this one prior. | ||
{ test: require.resolve("jquery"), loader: "expose?jQuery" }, | ||
{ test: require.resolve("jquery"), loader: "expose?$" } | ||
] | ||
| @@ -47,4 +65,3 @@ if (devBuild) { | |
} else { | ||
console.log("Webpack production build for rails"); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should mention https://github.com/justin808/react-webpack-rails-tutorial/blob/master/Procfile.dev