ruby-typescript 0.1.0 → 0.1.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.
- checksums.yaml +7 -0
- data/lib/ruby-typescript.rb +13 -2
- metadata +43 -58
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 58bb694d7fa83deff84ddb9a258db7afda4262c4
|
4
|
+
data.tar.gz: bbe6fb62b64f3ee6fc97e8f9693222a0d4530a38
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 42b06e7265d5aeb4a25903c5a32503e9743e81131685ebcebfd7f070b2290aa8da3bb21a6572c011d455f96323f9676867858ceaba0323611a32cfdf56a9dbdd
|
7
|
+
data.tar.gz: 7801027150bc3435db6bf7d0058a38cc09dbac98dada06c47924a535a4d1c24b7ab70a79c22ee294a99446c787a30f1df38f073a249f67b7d8415f4ebf42c833
|
data/lib/ruby-typescript.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require "open3"
|
2
2
|
|
3
3
|
module TypeScript
|
4
|
-
VERSION = '0.1.
|
4
|
+
VERSION = '0.1.1'
|
5
5
|
|
6
6
|
class Error < StandardError
|
7
7
|
end
|
@@ -13,7 +13,7 @@ module TypeScript
|
|
13
13
|
|
14
14
|
def node_compile(*args)
|
15
15
|
if typescript_path
|
16
|
-
cmd = [
|
16
|
+
cmd = [typescript_path] + args
|
17
17
|
else
|
18
18
|
cmd = ['tsc'] + args
|
19
19
|
end
|
@@ -32,6 +32,15 @@ module TypeScript
|
|
32
32
|
if options[:source_map]
|
33
33
|
args << '--sourceMap'
|
34
34
|
end
|
35
|
+
|
36
|
+
if options[:module]
|
37
|
+
args << '--module' << options[:module]
|
38
|
+
end
|
39
|
+
|
40
|
+
if options[:target]
|
41
|
+
args << '--target' << options[:target]
|
42
|
+
end
|
43
|
+
|
35
44
|
return args
|
36
45
|
end
|
37
46
|
|
@@ -42,6 +51,8 @@ module TypeScript
|
|
42
51
|
# @param [Hash] options the options for the execution
|
43
52
|
# @option options [String] :output the output path
|
44
53
|
# @option options [Boolean] :source_map create the source map or not
|
54
|
+
# @option options [String] :module module type to compile for (commonjs or amd)
|
55
|
+
# @option options [String] :target the target to compile toward: ES3 (default) or ES5
|
45
56
|
def compile_file(filepath, options={})
|
46
57
|
options = options.clone
|
47
58
|
if not options[:output]
|
metadata
CHANGED
@@ -1,90 +1,75 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-typescript
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
segments:
|
6
|
-
- 0
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
version: 0.1.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
10
5
|
platform: ruby
|
11
|
-
authors:
|
6
|
+
authors:
|
12
7
|
- Payton Yao
|
13
8
|
autorequire:
|
14
9
|
bindir: bin
|
15
10
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2014-10-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
21
14
|
name: bundler
|
22
|
-
|
23
|
-
|
24
|
-
requirements:
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
25
17
|
- - ">="
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
- 0
|
29
|
-
version: "0"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
30
20
|
type: :development
|
31
|
-
version_requirements: *id001
|
32
|
-
- !ruby/object:Gem::Dependency
|
33
|
-
name: rspec
|
34
21
|
prerelease: false
|
35
|
-
|
36
|
-
requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
37
31
|
- - ">="
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
|
40
|
-
- 0
|
41
|
-
version: "0"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
42
34
|
type: :development
|
43
|
-
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
44
41
|
description: Ruby TypeScript is a wrapper for the JavaScript TypeScript compiler.
|
45
|
-
email:
|
42
|
+
email:
|
46
43
|
- payton.yao@gmail.com
|
47
44
|
executables: []
|
48
|
-
|
49
45
|
extensions: []
|
50
|
-
|
51
46
|
extra_rdoc_files: []
|
52
|
-
|
53
|
-
files:
|
54
|
-
- lib/ruby-typescript.rb
|
47
|
+
files:
|
55
48
|
- LICENSE
|
56
49
|
- README.md
|
57
|
-
|
50
|
+
- lib/ruby-typescript.rb
|
58
51
|
homepage: http://github.com/jabbawookiees/ruby-typescript
|
59
|
-
licenses:
|
52
|
+
licenses:
|
60
53
|
- MIT
|
54
|
+
metadata: {}
|
61
55
|
post_install_message:
|
62
56
|
rdoc_options: []
|
63
|
-
|
64
|
-
require_paths:
|
57
|
+
require_paths:
|
65
58
|
- lib
|
66
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
-
requirements:
|
59
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
68
61
|
- - ">="
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
|
-
requirements:
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
64
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
75
66
|
- - ">="
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
segments:
|
78
|
-
- 1
|
79
|
-
- 3
|
80
|
-
- 6
|
67
|
+
- !ruby/object:Gem::Version
|
81
68
|
version: 1.3.6
|
82
69
|
requirements: []
|
83
|
-
|
84
70
|
rubyforge_project: ruby-typescript
|
85
|
-
rubygems_version:
|
71
|
+
rubygems_version: 2.2.2
|
86
72
|
signing_key:
|
87
|
-
specification_version:
|
73
|
+
specification_version: 4
|
88
74
|
summary: Ruby TypeScript Compiler
|
89
75
|
test_files: []
|
90
|
-
|