midge 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -2
- data/lib/midge/version.rb +1 -1
- metadata +4 -23
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Midge
|
2
2
|
|
3
3
|
Midge is a quick and cheap [javascript module](http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth)
|
4
|
-
system for the rails asset pipeline.
|
4
|
+
system for the rails asset pipeline. It supports multiple namespaces and
|
5
5
|
|
6
6
|
## Installation
|
7
7
|
|
@@ -47,7 +47,7 @@ With this setup you can create a file with the extension of ".midge.js" or
|
|
47
47
|
functionality onto the `exports` object. For example:
|
48
48
|
|
49
49
|
``` javascript
|
50
|
-
|
50
|
+
// /app/assets/javascripts/person.midge.js
|
51
51
|
|
52
52
|
exports.Person = function() {
|
53
53
|
this.name = "A guy";
|
data/lib/midge/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: midge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -75,26 +75,7 @@ dependencies:
|
|
75
75
|
- - ! '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
|
-
description:
|
79
|
-
for the rails asset pipeline.\n\n## Installation\n\nAdd this line to your application's
|
80
|
-
Gemfile:\n\n``` ruby\ngem 'midge'\n```\n\nAnd then execute:\n\n``` console\n$ bundle\n```\n\nOr
|
81
|
-
install it yourself as:\n\n``` console\n$ gem install midge\n```\n\n## Usage\n\nFirst
|
82
|
-
run the install.\n\n``` console\n$ rails generate midge:install\n```\n\nIn the initializer
|
83
|
-
you setup what file extensions will go to what \"module\".\n\n``` ruby\n# /config/initializers/midge.rb\n\nMidge.setup
|
84
|
-
do |config|\n config.jst_processor \".midge_template\", \"Midge\"\n config.js_processor
|
85
|
-
\".midge\", \"Midge\"\nend\n```\n\nWith this setup you can create a file with the
|
86
|
-
extension of \".midge.js\" or\n\".midge.coffee\" and it will be module enabled.
|
87
|
-
In the file attach public\nfunctionality onto the `exports` object. For example:\n\n```
|
88
|
-
javascript\n# /app/assets/javascripts/person.midge.js\n\nexports.Person = function()
|
89
|
-
{\n this.name = \"A guy\";\n};\n```\n\nThe output for this after running through
|
90
|
-
the asset pipeline would be something\nlike:\n\n``` javascript\n(function(exports)
|
91
|
-
{\n exports.Person = function() {\n this.name = \"A guy\";\n };\n}).call(this,
|
92
|
-
(this.Midge || (this.Midge = {})));\n```\n\nSo with this in place you can access
|
93
|
-
the `Person` object on the `Midge`\nnamespace.\n\n``` javascript\nvar guy = new
|
94
|
-
Midge.Person;\n```\n\nVoila! Simple albeit limited javascript modules.\n\n## Contributing\n\n1.
|
95
|
-
Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit
|
96
|
-
your changes (`git commit -am 'Added some feature'`)\n4. Push to the branch (`git
|
97
|
-
push origin my-new-feature`)\n5. Create new Pull Request\n"
|
78
|
+
description:
|
98
79
|
email:
|
99
80
|
- bigjasonwebb@gmail.com
|
100
81
|
executables: []
|
@@ -178,7 +159,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
178
159
|
version: '0'
|
179
160
|
segments:
|
180
161
|
- 0
|
181
|
-
hash:
|
162
|
+
hash: 3582730657541668864
|
182
163
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
183
164
|
none: false
|
184
165
|
requirements:
|
@@ -187,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
168
|
version: '0'
|
188
169
|
segments:
|
189
170
|
- 0
|
190
|
-
hash:
|
171
|
+
hash: 3582730657541668864
|
191
172
|
requirements: []
|
192
173
|
rubyforge_project:
|
193
174
|
rubygems_version: 1.8.24
|