ruby-dart2js 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +36 -0
  3. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8f73670e7c60f2065c1345049de05c8d3d41eeae
4
- data.tar.gz: 026f60069b1a0add9ca7914f2b422aa058233778
3
+ metadata.gz: 16bef3c3253f135f79c0432ea4e5dc365badd665
4
+ data.tar.gz: 2123dd104abde973a40074d15713d8a805f325c6
5
5
  SHA512:
6
- metadata.gz: ff68e68eb8eba8fad3ded878988ee97bd95357f34fbcff2936be22fcd2eea6d85f26c76233928cc66e7dc3bf5b4e34b2760e5c95f5a375c887db89d61794948d
7
- data.tar.gz: bd5096eaaa9b1c45d7a24baa96f85e85d1c8b30015241b5725cd91341ab96a434d5165da0a6da7a68118b66825e2435076f14a650f9728871c99233443dfc706
6
+ metadata.gz: 7f319c2981ac34063865ae61929d4f2e6299fed57c6defa4d8f9661eea466f5d47fc1c0685ad1331461e9b1eeebf6a85a7c87432c947fd0d2de8de2112074d5c
7
+ data.tar.gz: 494fb3d1f92ff0ee3a4aed52554c0fd356097b1163c0373fd40083c201d21482d42bf5d6a6807ee1567a82f1fbbd8058f992aef737589a48e84d47bb718af924
@@ -0,0 +1,36 @@
1
+ # Dart2Js
2
+
3
+ ### Idea
4
+
5
+ Provide automated transcoding from [Dart](https://www.dartlang.org/ 'dartlang.org') to Javascript.
6
+
7
+ ### Setup
8
+
9
+ ###### Add gem
10
+
11
+ `Gemfile`
12
+
13
+ gem 'ruby-dart2js', :git => https://github.com/m0gg/ruby-dart2js.git
14
+
15
+ ###### Find SDK
16
+
17
+ `DartJs` will look for the `dart2js` binary in the following order:
18
+
19
+ 1. `DART2JS_SOURCE_PATH` direct path to binary `env DARTJS_SOURCE_PATH=/opt/dart-sdk/bin/dart2js`
20
+ 2. `DART_SDK_HOME` path to sdk `env DART_SDK_HOME=/opt/dart-sdk`
21
+ 3. `PATH` looks for dart2js in your PATH-variable
22
+
23
+ ### Usage
24
+
25
+ dart_compiler = Dart2Js.new(file, options)
26
+ dart_compiler.compile
27
+ dart_compiler.get_js_content
28
+ dart_compiler.out_file
29
+
30
+ Initialization takes either dart-sourcecode directly or an instance of `File` as first argument and
31
+ an options-hash as second argument. `:dart2js_binary` and `:out_file` may be provided with the options-hash.
32
+
33
+ `dart_compiler.compile` actually runs the `dart2js` command, the output of the run will be saved in `@result` and
34
+ the final js stays in `@out_file` and may be read with `dart_compiler.get_js_content`.
35
+
36
+ With version 0.2.0 `Dart2Js::compile` now accepts a boolean argument for minifying, it's optional and `true` by default.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-dart2js
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcel Sackermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-29 00:00:00.000000000 Z
11
+ date: 2015-02-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: ''
14
14
  email:
@@ -18,6 +18,7 @@ extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
20
  - MIT-LICENSE
21
+ - README.md
21
22
  - Rakefile
22
23
  - lib/dart2js.rb
23
24
  - lib/dart2js_exceptions.rb