devlocker / breakfast Goto Github PK
View Code? Open in Web Editor NEWBrunch.io with Rails
License: MIT License
Brunch.io with Rails
License: MIT License
Breakfast is doing live reloads only on saving files with .html
inside file name (besides css/js assets). Is it possible to reload on slim/haml saving without having .html
inside template name? Also, is it possible to reload on ruby files changes?
I am trying to make the simplest implementation work in production
environment.
In browser console:
Failed to load resource: the server responded with a status of 404 (Not Found)
during production for assets/app.js
, javascripts/app.js
and stylesheets/app.css
.Uncaught ReferenceError: require is not defined
The compiled assets exist.
Pretty sure the Asset Pipeline is causing issues here (everything works easily in development), can you suggest the proposed method of solving this?
Thank you for creating an awesome gem.
I found there is an error in the guideline of Elm page.
http://breakfast.devlocker.io/examples/elm.html
Configure plugin:
plugins: {
elmBrunch: {
mainModule: ['app/frontend/js/elm/Main.elm'],
outputFile: 'elm.js',
outputFolder: "public/assets/"
},
It should be mainModules, a final s is missing.
I am running a puma server for local development. Probably because of the the condition:
defined?(Rails::Server)
Any clues on how to get this working via puma?
There is a little mistake on http://breakfast.devlocker.io/getting_started/configuration
config.breakfast.asset_output_folders = [Rails.root.join("public")]
should be
config.breakfast.asset_output_folder = Rails.root.join("public")
I'm quite new to brunch asset building etc. and I really would like to try out Postcss. But I can't seem to get autoprefixer to work, not sure if it's an issue with breakfast, brunch, Postcss-brunch or I'm doing something wrong but anyone knows how to get it working? (with .scss files)
Hello! Is there something special I need to configure to get in-template sass/scss to work?
Trying this currently:
<style lang="scss">
li
color: red
</style>
but the error is: error: Compiling of app/frontend/js/components/video-tags.vue failed. Error: Invalid CSS after "": expected 1 selector or at-rule, was "li"
Cheers.
I've recently been working with converting a project gradually from Sprockets to Webpacker, but I'm getting frustrated, and finding Webpack messy, counter-intuitive and full of weird, barely-documented "features".
So I'm trying Breakfast, and it seems promising, but I can't get it to work and Rails complains about app.css not being in the asset pipeline. Could it be that it's because I still have a few assets that are handled by Sprockets? Webpacker and Sprockets can happily co-exist, but since Breakfast uses the same stylesheet_link_tag
, I'm starting to suspect this is not the case with Breakfast?
Sorry if this is obvious, but I can't find any mention of this in the docs.
(I think the fact that Breakfast's running as a sub-process of rails s
and that it's using the same stylesheet and javascript tags for Rails views are strengths, but I can see if it makes co-existing with Sprockets difficult, and it would make converting my project step by step much harder, sadly.)
Issue: Code compiles - but there's a runtime error. The Breakfast Status Bar won't show you the error. I've definitely thought Breakfast wasn't working right but it turns out I had to open up the developer console to see what was wrong.
Ideal Solution: Find a way to pull errors out of the developer console (Chrome, Firefox, Safari, etc.) and stick them into the Status Bar.
Do you have any plans to favor yarn over straight npm, since I'd wager most people would benefit from the yarn.lock file? https://yarnpkg.com/
I'm not seeing a bottom bar or livereloading work by default. I can get livereloading working separately by using the livereload app in the mac app store..
however, I'm not seeing the bar at the bottom that I see in the documentation, on my mac..
Hi guys, I'm having some problems with the auto reload function.
When I save a file I can see in my console that it is compiling end sending the reload massage to my browser(chrome) only nothing happens.
I'm running rails on a Ubuntu 16.04.2 machine.
Part of my packege.json
{
"repository": {},
"dependencies": {
"actioncable": "^5.0.0",
"bourbon": "^4.3.3",
"breakfast-rails": "0.5.0",
"copycat-brunch": "^1.1.0",
"highcharts": "^5.0.9",
"jquery": "^3.1.0",
"jquery-ujs": "^1.2.2",
"postcss-lh": "^1.1.4",
"turbolinks": "^5.0.0"
},
"devDependencies": {
"autoprefixer": "^6.5.4",
"babel-brunch": "~6.0.0",
"brunch": "^2.10.8",
"clean-css-brunch": "~1.8.0",
"coffee-script-brunch": "^2.10.1",
"postcss-brunch": "^0.5.0",
"postcss-responsive-font": "^1.0.0",
"postcss-scss": "^0.4.1",
"sass-brunch": "^2.10.4",
"uglify-js-brunch": "~2.1.0"
}
}
Anybody worked on using opal
with brunch
?
I'm having some trouble with deploying my Rails application with Breakfast to Heroku. Before I installed breakfast I didn't had to specify any database configuration for the staging and production environments. Heroku was handling this with the ENV['DATABASE_URL']
variable. But now when I want to deploy my Rails app to staging It's giving me this error:
ActiveRecord::AdapterNotSpecified: 'staging' database is not configured.
This error shows up during this rake task:
breakfast:assets:build_production
I have the feeling that the environment variables are not set. Because when I add all the staging database configuration directly into the configuration file, it gives me the error that Redis is trying to connect with localhost.
Does anyone have an idea how to solve this problem?
I am starting with vue but I have been working with Rails for some years now. Almost give up with Brunch because I struggled for 2 days to figure out how to make them work.
If one follow the instructions as here http://breakfast.devlocker.io/examples/vue.html wont be able to make it work. It's missing the following:
Create directory assets
under /public
directory before firing up the rails s
command
Import MUST be capitalized if your file is app/frontend/components/Hello.vue
. So in app.js
put:
import Hello from './components/Hello';
instead of
import Hello from './components/hello';
You MUST add this to the brunch-fonfig.js
module.exports = {
files: {
javascripts: {
joinTo: {
'app.js': /^app\/frontend\/js\//,
'vendor.js': /^(?!app\/frontend\/js)/
}
},
stylesheets: {
joinTo: 'app.css'
},
templates: { <<============ MISSING THING!
joinTo: {
'app.js': 'app/frontend/js/components/*.vue'
}
}
},
...rest of file
More info on second issue here https://github.com/nblackburn/vue-brunch/issues/5
PD: To anyone having this issue I just put this question on stackoverflow with link to a working example on my github
http://stackoverflow.com/a/42057658/1248725
When I began to deploy to Heroku I found that my breakfast assets were always being update one push behind. I did a little digging in the logs and noticed the asset:precompile was being executed before the breakfast:assets and the new version was not being served.
I was able to find the asset:precompile enhancement in breakfast.rake. I was able to instead prepend the tasks breakfast:yarn:install and breakfast:assets:compile by passing them as an array of strings.
if Rake::Task.task_defined?("assets:precompile")
Rake::Task["assets:precompile"].enhance ["breakfast:yarn:install", "breakfast:assets:compile"]
end
I also noticed I was having a duplicate yarn install, but I do not know that it was being initiated though breakfast.
Rails 5.1.4
At the moment there are at least two brunch libraries for adding digests to your assets:
https://github.com/meleyal/git-digest-brunch
https://github.com/mutewinter/digest-brunch
But I'm not the biggest fan of the approaches taken by either of those libraries. I would much prefer to function just like sprockets - where it all works without the end user having to modify their code.
To get this to work Breakfast is going to have to generate an asset manifest on deploy. Then the Rails asset tags will probably need to be modified to take the manifest into account.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.