Skip to content
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

Add sprockets precompile rake task #190

Merged
merged 1 commit into from
Sep 9, 2021

Conversation

kinow
Copy link
Member

@kinow kinow commented Sep 5, 2021

Closes #189

To test:

  1. copy file into a dashboards project (we assume bundle install etc has run, the dashboard is running fine)
  2. rake precompile-assets
  3. confirm assets/javascripts/application.js was created
  4. start your dashboard, make sure widgets, jobs, etc, are all working
  5. enjoy! 🎉

@kinow kinow added this to the 1.3.5 milestone Sep 5, 2021
@kinow kinow self-assigned this Sep 5, 2021
@qume
Copy link

qume commented Sep 8, 2021

Ok so this runs, and generates application.js which looks sensible. However the page just shows the background and no widgets.

In the console it says "Yeah! The dashboard has started!", and that's it.

The generated application.js is here: https://termbin.com/oaolz

I tried diffing the precompiled one with the live one, but diff choked (I guess doesn't like the long minified lines). Doing a manual look through they seem identical. When I fetch the live generated one with curl and name it application.js - same problem, just a gray background with no widgets.

Probably something really simple I'm missing here but a bit stumped. There are no errors logged to the console or 404's etc.

@kinow
Copy link
Member Author

kinow commented Sep 9, 2021

@qume is there any chance you used the old Rakefile? I had the same result with the previous Rakefile as that was missing the sassc/sass and coffee-script imports. But after adding them, the generated application.js worked fine.

@qume
Copy link

qume commented Sep 9, 2021

Awesome my bad I didn't copy over the new Rakefile from the template directory in the gem.

It works. Thank you!!

@kinow
Copy link
Member Author

kinow commented Sep 9, 2021

Excellent news @qume ! Thanks for testing it! I'll merge it, and wait a few more days/weeks to see if we get any other gem updates, issues, improvements, etc. A new version should be released in the next weeks with this Rakefile. I'll update documentation too. Cheers, Bruno.

@kinow kinow merged commit 351e075 into Smashing:master Sep 9, 2021
@kinow kinow deleted the add-rakefile-precompile branch September 9, 2021 03:02
kinow added a commit that referenced this pull request Sep 9, 2021
Add entry for #190
@kinow
Copy link
Member Author

kinow commented Sep 9, 2021

Change log updated. Milestone updated. Docs added too to sidebar with a link to this new wiki page: https://github.com/Smashing/smashing/wiki/How-to%3A-precompile-assets

@kinow kinow modified the milestones: 1.3.5, 1.3.6 Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slow to generate application.js
2 participants