slight-lang 1.2.3 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/example/default_engine.rb +8 -7
- data/lib/slight.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4421d101e612816dce7b36c9804ed26db05098a6
|
4
|
+
data.tar.gz: 2b113781c38799bf2eab2965e33bea31d844bca7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e6a6eee8d2c4fe0750e1394c40c5907d5497d6fa0b54013ae7617989f196a44fa67b08c62813d6f3b56536d97c43d26cfbe784919af325645c8e1ad8921077e
|
7
|
+
data.tar.gz: 7696b53efb3328a2ecdf465d53c313eef3e1f1bcd6d7aba196fa8a7afd697c078f8db4cba011ce48fb6c912904bc2608584f01feca80b15d3838c847cf8f1489
|
data/example/default_engine.rb
CHANGED
@@ -12,25 +12,26 @@ module Slight
|
|
12
12
|
|
13
13
|
begin
|
14
14
|
if ARGV[0] == "-h" then
|
15
|
-
|
15
|
+
puts "[Slight] Commands: build | <source_fn> (<dest_fn>) | -v | -h"
|
16
16
|
elsif ARGV[0] == "-v" then
|
17
|
-
|
17
|
+
puts VERSION
|
18
18
|
elsif ARGV[0] == "build" then
|
19
19
|
path = Dir.pwd#File.expand_path(".", __FILE__)
|
20
20
|
Dir.entries(path).select { |e|
|
21
|
-
e.
|
21
|
+
e.include? ".slight"
|
22
22
|
}.each{ |src_file|
|
23
23
|
buffer << default_engine.render(path + "/" + src_file)
|
24
24
|
if buffer != nil and buffer != "" then
|
25
|
-
fn =
|
26
|
-
|
27
|
-
|
25
|
+
fn = src_file.split(".")[0] << ".htm"
|
26
|
+
#puts "#{path}/#{fn}"
|
27
|
+
puts "[Slight] Source File [#{src_file}] => Dest File [#{fn}]"
|
28
|
+
io_out = File.open("#{path}/#{fn}", 'w')# if ARGV.size == 2
|
28
29
|
io_out.puts buffer
|
29
30
|
buffer.clear
|
30
31
|
end
|
31
32
|
}
|
32
33
|
else
|
33
|
-
raise IOError, "source file was not given." if ARGV.length == 0
|
34
|
+
raise IOError, "[Slight] source file was not given." if ARGV.length == 0
|
34
35
|
src_file = ARGV[0]
|
35
36
|
buffer << default_engine.render(src_file)
|
36
37
|
if buffer != nil and buffer != "" then
|
data/lib/slight.rb
CHANGED
@@ -3,10 +3,10 @@ require 'slight/engine'
|
|
3
3
|
module Slight
|
4
4
|
# Slight version string
|
5
5
|
# @api public
|
6
|
-
VERSION = '1.
|
6
|
+
VERSION = '1.3.0'
|
7
7
|
# 1.0.0 => Basic Template features | 201703
|
8
8
|
# 1.0.5 => Support Tilt | 201704
|
9
9
|
# 1.1.0 => Doc Update | 201705
|
10
10
|
# 1.2.0 => Add CONST | 20180101
|
11
|
-
# 1.
|
11
|
+
# 1.3.0 => Fix CLI | 20180217
|
12
12
|
end
|