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 was archived by the owner on Oct 19, 2018. It is now read-only.
Hyperloop.require 'path', tree:true# same as saying require_tree 'path' in a manifest file
14
-
Hyperloop.require 'asset_name'# same as saying require 'asset_name' in a manifest file
9
+
Hyperloop.import 'my-gem-name'
10
+
Hyperloop.imports 'my-gem-name'# same as above
11
+
Hyperloop.import 'my-gem-name', server_only:true
12
+
Hyperloop.import 'my-gem-name', client_only:true
13
+
Hyperloop.import 'path', tree:true# same as saying require_tree 'path' in a manifest file
14
+
Hyperloop.import_tree 'path'# same as above
15
+
Hyperloop.import 'asset_name'# same as saying require 'asset_name' in a manifest file
15
16
```
16
17
17
-
The difference between `require_gem`, and `require` is that require_gem can be used inside a gem file spec.
18
-
19
-
Once a gem file spec does a `Hyperloop.require_gem` the listed gem will be automatically added to the `hyperloop-loader` manifest. This means all you do is add a gem
18
+
Once a gem file spec does a `Hyperloop.import` the listed gem will be automatically added to the `hyperloop-loader` manifest. This means all you do is add a gem
20
19
to rails, and it will get sent on to the client (plus any other dependencies you care to require.)
21
20
22
-
The require method can be used in the hyperloop initializer as well to add code to the manifest (i.e. add a gem to that is not using Hyperloop.require_gem)
21
+
The require method can be used in the hyperloop initializer as well to add code to the manifest (i.e. add a gem to that is not using Hyperloop.import)
0 commit comments