You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 19, 2018. It is now read-only.
The goal is to provide a standard and best practice way of installing and configuring all Hyperloop gems with Rails - this will include the use of Yarn (and/or NPM) and Webpack.
HyperRails gem proposed documentation:
Installation
This generator will install and configure all Hyperloop Gems with Rails 4.x or 5.x.
In your Gemfile
gem"hyper-rails"
then
bundle install
Once the HyperRails gem is installed, you can use it to install each of the family of Hyperloop gems:
Using the Installation generators
There are generators to to install and configure each of the Hyperloop gems:
Install Everything
railsghyperloop:allbundleupdate
This will install all of the gems listed below with the default configuration.
HyperReact
HyperReact is the master gem. You will always need this as a base. HyperReact provides a Ruby DSL to Facebook’s React. Much of the documentation on this site covers usage of this Gem.
railsghyperloop:install_hyper_reactbundleupdate
Options:
--include-react-source (default) latest React and ReactDOM will be included
--exclude-react-source to not include React which you will need to include yourself
--use-npm-webpack add React via NPM and include via Webpack
--use-yarn-webpack add React via Yarn and include via Webpack
HyperMesh
HyperMesh is a policy based CRUD system which wraps ActiveRecord models on the server and extends them to the client. Furthermore it implements push notifications (via a number of possible technologies) so changes to records in use by clients are pushed to those clients if authorised. Isomorphic Ruby in action.
railsghyperloop:install_hyper_meshbundleupdate
Options:
--exclude-client-sync basic CRUD functionality with no method of synchronising connected clients
--include-client-sync (default) client sync is included and you will need to use one of the push notification technologies below
--use-pusher-fake (default) the easiest way to setup client push is to use the Pusher-Fake gem
--use-pusher you will need an account with pusher.com
--use-actioncable for Rails 5
HyperRouter
HyperRouter provides a Ruby DSL to Facebook’s React Router which is a React component that loads other components depending on the current URL.
railsghyperloop:install_hyper_routerbundleupdate
Options:
--include-router-source (default) latest React Router will be included
--exclude-router-source to not include React Router which you will need to include yourself
--use-npm-webpack add React via NPM and include via Webpack
--use-yarn-webpack add React via Yarn and include via Webpack
HyperTrace
Method tracing and conditional breakpoints for Opal Ruby.
It's cool to generate webpack or npm template but I am wondering is there any best practice on
integrating webpack with rails out there people are using currently?
@catmando suggestd:
perhaps :all could be synonym for install_all ?
also drop
--include-client-sync
and instead have --use-simple-poller
other than that seems great
@zetachang. I think @barriehadfields approach is based on looking at current approaches, and represents best practice. Even for those not interested in Opal ( whaaaa?) I am recommending following the scheme, Barrie lays ou
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The goal is to provide a standard and best practice way of installing and configuring all Hyperloop gems with Rails - this will include the use of Yarn (and/or NPM) and Webpack.
HyperRails gem proposed documentation:
Installation
This generator will install and configure all Hyperloop Gems with Rails 4.x or 5.x.
In your
Gemfile
then
Once the HyperRails gem is installed, you can use it to install each of the family of Hyperloop gems:
Using the Installation generators
There are generators to to install and configure each of the Hyperloop gems:
Install Everything
This will install all of the gems listed below with the default configuration.
HyperReact
HyperReact is the master gem. You will always need this as a base. HyperReact provides a Ruby DSL to Facebook’s React. Much of the documentation on this site covers usage of this Gem.
Options:
--include-react-source
(default) latest React and ReactDOM will be included--exclude-react-source
to not include React which you will need to include yourself--use-npm-webpack
add React via NPM and include via Webpack--use-yarn-webpack
add React via Yarn and include via WebpackHyperMesh
HyperMesh is a policy based CRUD system which wraps ActiveRecord models on the server and extends them to the client. Furthermore it implements push notifications (via a number of possible technologies) so changes to records in use by clients are pushed to those clients if authorised. Isomorphic Ruby in action.
Options:
--exclude-client-sync
basic CRUD functionality with no method of synchronising connected clients--include-client-sync
(default) client sync is included and you will need to use one of the push notification technologies below--use-pusher-fake
(default) the easiest way to setup client push is to use the Pusher-Fake gem--use-pusher
you will need an account with pusher.com--use-actioncable
for Rails 5HyperRouter
HyperRouter provides a Ruby DSL to Facebook’s React Router which is a React component that loads other components depending on the current URL.
Options:
--include-router-source
(default) latest React Router will be included--exclude-router-source
to not include React Router which you will need to include yourself--use-npm-webpack
add React via NPM and include via Webpack--use-yarn-webpack
add React via Yarn and include via WebpackHyperTrace
Method tracing and conditional breakpoints for Opal Ruby.
Opal Hot Reloader
For pure programmer joy, no more page refreshes.
Additional useful generators
Creating HyperReact Components
Which will make the component
Home::Clock
inapp/views/components/home/clock.rb
You can render a component directly from a controller:
Or from a view:
See Ruby-Hyperllop.io for further examples.
Creating Router Components
Will make the router component
app/views/components/home/show.rb
See Ruby-Hyperllop.io for further examples.
How it works
(details of each gem install showing which files are added and how Rails is configured)
The text was updated successfully, but these errors were encountered: