https://github.com/javan/sprockets-export
https://github.com/javan/sprockets-export
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/javan/sprockets-export
- Owner: javan
- License: mit
- Created: 2016-05-16T14:47:45.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2021-01-20T18:22:50.000Z (over 4 years ago)
- Last Synced: 2025-03-18T10:21:18.051Z (3 months ago)
- Language: Ruby
- Size: 18.6 KB
- Stars: 15
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Sprockets Export
A [Sprockets directive](https://github.com/rails/sprockets#sprockets-directives) for hassle-free [UMD](https://github.com/umdjs/umd)-style JavaScript module definitions.
## Using
``` ruby
# Gemfilegem 'sprockets', '>= 3.0.0'
gem 'sprockets-export'
``````js
/* widget.js *///= export Widget
//= require_selfthis.Widget = { name: "gizmo" }
```## Consuming
```js
widget = require("widget")
widget.name // gizmo
```---
Licensed under the [MIT License](LICENSE.txt)
© 2016 Javan Makhmali