Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit 2e6a6ee

Browse files
committed
version bump
1 parent 0728148 commit 2e6a6ee

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,19 @@ To indicate gems to be autoloaded on client side:
66

77
```ruby
88
require 'hyperloop-config'
9-
Hyperloop.require 'my-gem-name', gem: true
10-
Hyperloop.require_gem 'my-gem_name' # short for above
11-
Hyperloop.require_gem 'my-gem-name', server_only: true
12-
Hyperloop.require_gem 'my-gem-name', client_only: true
13-
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
1516
```
1617

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
2019
to rails, and it will get sent on to the client (plus any other dependencies you care to require.)
2120

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)
2322

2423
To define an initializer:
2524

hyperloop-config.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
44

55
Gem::Specification.new do |spec|
66
spec.name = "hyperloop-config"
7-
spec.version = "0.9.2"
7+
spec.version = "0.9.3"
88
spec.authors = ["catmando"]
99
spec.email = ["mitch@catprint.com"]
1010

0 commit comments

Comments
 (0)