ruby-dart2js 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +36 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16bef3c3253f135f79c0432ea4e5dc365badd665
|
4
|
+
data.tar.gz: 2123dd104abde973a40074d15713d8a805f325c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f319c2981ac34063865ae61929d4f2e6299fed57c6defa4d8f9661eea466f5d47fc1c0685ad1331461e9b1eeebf6a85a7c87432c947fd0d2de8de2112074d5c
|
7
|
+
data.tar.gz: 494fb3d1f92ff0ee3a4aed52554c0fd356097b1163c0373fd40083c201d21482d42bf5d6a6807ee1567a82f1fbbd8058f992aef737589a48e84d47bb718af924
|
data/README.md
ADDED
@@ -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.
|
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-
|
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
|