starter 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/starter/tasks/npm.rb +10 -0
- metadata +1 -1
data/lib/starter/tasks/npm.rb
CHANGED
@@ -18,6 +18,16 @@ task "npm:publish" do
|
|
18
18
|
sh "npm publish"
|
19
19
|
end
|
20
20
|
|
21
|
+
task "version" => "read_package" do
|
22
|
+
pp $STARTER[:version] = $STARTER[:npm_package][:version]
|
23
|
+
end
|
24
|
+
|
25
|
+
task "read_package" do
|
26
|
+
require "json"
|
27
|
+
string = File.read("package.json")
|
28
|
+
$STARTER[:npm_package] = JSON.parse(string, :symbolize_names => true)
|
29
|
+
end
|
30
|
+
|
21
31
|
|
22
32
|
|
23
33
|
def package(options={})
|