Skip to content

Commit 226e08a

Browse files
committed
+vssbe managing & short info about provided components
1 parent 80559ec commit 226e08a

12 files changed

Lines changed: 1411 additions & 14 deletions

File tree

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
# Our batch files requires CRLF for correct work.
3+
# https://github.com/3F/hMSBuild/issues/2
4+
5+
*.bat text eol=crlf
6+
*.cmd text eol=crlf
7+
*.tpl text eol=crlf

.gnt/packages.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="vsSBE.CI.MSBuild" version="1.6.12011" output="vsSBE.CI.MSBuild" />
4+
</packages>

.version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.14.0

.vssbe

Lines changed: 395 additions & 0 deletions
Large diffs are not rendered by default.

Readme.md

Lines changed: 211 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ Core components for SobaScript. Extensible Modular Scripting Programming Languag
66

77
https://github.com/3F/SobaScript
88

9-
[![Build status](https://ci.appveyor.com/api/projects/status/SobaScript.Z.Core/branch/master?svg=true)](https://ci.appveyor.com/project/3Fs/SobaScript.Z.Core/branch/master)
9+
[![Build status](https://ci.appveyor.com/api/projects/status/i5lugbk4rgovi6ta/branch/master?svg=true)](https://ci.appveyor.com/project/3Fs/sobascript-z-core/branch/master)
1010
[![release-src](https://img.shields.io/github/release/3F/SobaScript.Z.Core.svg)](https://github.com/3F/SobaScript.Z.Core/releases/latest)
1111
[![License](https://img.shields.io/badge/License-MIT-74A5C2.svg)](https://github.com/3F/SobaScript.Z.Core/blob/master/License.txt)
1212
[![NuGet package](https://img.shields.io/nuget/v/SobaScript.Z.Core.svg)](https://www.nuget.org/packages/SobaScript.Z.Core/)
13-
[![Tests](https://img.shields.io/appveyor/tests/3Fs/SobaScript.Z.Core/master.svg)](https://ci.appveyor.com/project/3Fs/SobaScript.Z.Core/build/tests)
13+
[![Tests](https://img.shields.io/appveyor/tests/3Fs/sobascript-z-core/master.svg)](https://ci.appveyor.com/project/3Fs/sobascript-z-core/build/tests)
1414

15-
[![Build history](https://buildstats.info/appveyor/chart/3Fs/SobaScript.Z.Core?buildCount=20&includeBuildsFromPullRequest=true&showStats=true)](https://ci.appveyor.com/project/3Fs/SobaScript.Z.Core/history)
15+
[![Build history](https://buildstats.info/appveyor/chart/3Fs/SobaScript.Z.Core?buildCount=20&showStats=true)](https://ci.appveyor.com/project/3Fs/SobaScript.Z.Core/history)
1616

1717
## License
1818

@@ -26,3 +26,211 @@ Copyright (c) 2014-2019 Denis Kuzmin < x-3F@outlook.com > GitHub/3F
2626

2727
SobaScript.Z.Core contributors: https://github.com/3F/SobaScript.Z.Core/graphs/contributors
2828

29+
## Provides at least the following
30+
31+
### ConditionComponent
32+
33+
Supports composite conditions with limited short-circuit evaluation (separately for all brackets)
34+
35+
Additional Operators:
36+
37+
```text
38+
===, !==, ~=, ==, !=, >=, <=, !, >, <, ^=, =^
39+
```
40+
41+
42+
```clojure
43+
#[( #[var count] > 10 || ($(isAllow) && !false) ) {
44+
...
45+
}
46+
else{
47+
...
48+
}]
49+
```
50+
51+
```clojure
52+
#[($(Configuration) ~= Deb && $(count) > 10 || $(Configuration) == "Release" ) {
53+
...
54+
}]
55+
```
56+
57+
```clojure
58+
#[( (1 < 2 && 2 == 2 && ( true || ((false || 2 >= 2) && (1 > 7 && true)))) )
59+
{
60+
#[( #[var count] > 10 || ($(isAllow) && !false) ) {
61+
...
62+
}
63+
else{
64+
...
65+
}]
66+
}]
67+
```
68+
69+
```clojure
70+
#[( !(1 > 2) ) {
71+
is greater
72+
}]
73+
```
74+
75+
### EvMSBuildComponent
76+
77+
Through [E-MSBuild](https://github.com/3F/E-MSBuild)
78+
79+
```clojure
80+
#[$(...)]
81+
```
82+
83+
```clojure
84+
#[$(
85+
[System.Math]::Exp('$(
86+
[MSBuild]::Multiply(
87+
$([System.Math]::Log(10)),
88+
4
89+
))'
90+
)
91+
)]
92+
```
93+
94+
```clojure
95+
#[var revBuild = #[$(
96+
[System.TimeSpan]::FromTicks('$(
97+
[MSBuild]::Subtract(
98+
$(tNow),
99+
$(tBase))
100+
)')
101+
.TotalMinutes
102+
.ToString('0'))]]
103+
```
104+
105+
### UserVariableComponent
106+
107+
Through [Varhead](https://github.com/3F/Varhead).
108+
109+
```clojure
110+
#[var name = mixed value]
111+
#[var name]
112+
```
113+
114+
```clojure
115+
#[var branchSha1 = #[IO sout("git", "rev-parse --short HEAD")]]
116+
```
117+
118+
Unset variable:
119+
120+
```clojure
121+
#[var -name]
122+
```
123+
124+
Default value for variable:
125+
126+
```clojure
127+
#[var +name]
128+
```
129+
130+
### TryComponent
131+
132+
Protects from errors in try{...} block and handles it in catch{...}
133+
134+
```clojure
135+
#[try
136+
{
137+
...
138+
}
139+
catch(err, msg)
140+
{
141+
$(err) - Type of Exception
142+
$(msg) - Error Message
143+
...
144+
}]
145+
```
146+
147+
```clojure
148+
#[try
149+
{
150+
#[IO copy.file("notreal.file", "artefact.t1", false)]
151+
}
152+
catch(err, msg)
153+
{
154+
#[($(err) == System.IO.FileNotFoundException) {
155+
#[OWP item("-Build-").writeLine(true): Found error #[$(msg)]]
156+
}]
157+
}]
158+
```
159+
160+
```clojure
161+
#[try {
162+
163+
#[Box data.pack("header", false):
164+
165+
...
166+
]
167+
168+
}catch{ }]
169+
```
170+
171+
### CommentComponent
172+
173+
```clojure
174+
#["
175+
Example
176+
" Description 1 "
177+
" Description 2 "
178+
"]
179+
```
180+
181+
```clojure
182+
#[" Example "]
183+
```
184+
185+
### BoxComponent
186+
187+
Container of data for operations such for templating, repeating, etc.
188+
189+
```clojure
190+
#[Box iterate(i = 0; $(i) < 10; i += 1):
191+
...
192+
#[Box operators.sleep(250)]
193+
]
194+
```
195+
196+
```clojure
197+
#[Box repeat($(i) < 10; true):
198+
199+
#[File append("test.txt"):
200+
#[$(i)]
201+
]
202+
203+
$(i = $([MSBuild]::Add($(i), 1)))
204+
]
205+
```
206+
207+
```clojure
208+
#[Box repeat($(flag)): ...]
209+
#[Box iterate(; $(flag); ): ...]
210+
```
211+
212+
213+
214+
```clojure
215+
#[try {
216+
217+
#[Box data.pack("header", false):
218+
219+
#[$(data = "Hello $(user) !")]
220+
#[File appendLine("$(fname)"): ------ #[$(data)] ------ ]
221+
]
222+
223+
}catch{ }]
224+
225+
#[$(fname = 'f1.txt')]
226+
#[$(user = 'UserA')]
227+
#[Box data.get("header", true)]
228+
229+
#[$(user = 'UserB')]
230+
#[Box data.get("header", true)]
231+
```
232+
233+
```
234+
------ Hello UserA ! ------
235+
------ Hello UserB ! ------
236+
```

SobaScript.Z.Core.sln

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SobaScript.Mapper", "SobaSc
3636
EndProject
3737
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SobaScript.MapperTest", "SobaScript.Mapper\SobaScript.MapperTest\SobaScript.MapperTest.csproj", "{A5B92B3B-B72D-426C-8C3D-9A41DF986357}"
3838
EndProject
39-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "root", "root", "{43E42F75-1B79-4E9D-9735-68B01B7241CE}"
40-
ProjectSection(SolutionItems) = preProject
41-
SobaScript.Mapper\License.txt = SobaScript.Mapper\License.txt
42-
SobaScript.Mapper\Readme.md = SobaScript.Mapper\Readme.md
43-
EndProjectSection
44-
EndProject
45-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SobaScript", "SobaScript", "{A96CE2AF-F773-4C0A-8680-4D0ED79F53A1}"
46-
EndProject
4739
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SobaScript", "SobaScript.Mapper\SobaScript\SobaScript\SobaScript.csproj", "{5C96DF4F-267A-46DD-BA95-9F487E8DC1FE}"
4840
EndProject
4941
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SobaScriptTest", "SobaScript.Mapper\SobaScript\SobaScriptTest\SobaScriptTest.csproj", "{E03F8EC5-20CA-4D54-8CEA-291AFEF6B460}"
@@ -63,6 +55,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Varhead", "SobaScript.Mappe
6355
EndProject
6456
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LSender", "SobaScript.Mapper\SobaScript\E-MSBuild\Varhead\LSender\LSender\LSender.csproj", "{F76493C4-06AC-4B7F-A9B7-743D10336A7B}"
6557
EndProject
58+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{A43CAA25-ED05-48C0-BFC7-E067496B2DF4}"
59+
ProjectSection(SolutionItems) = preProject
60+
tools\gnt.bat = tools\gnt.bat
61+
tools\hMSBuild.bat = tools\hMSBuild.bat
62+
EndProjectSection
63+
EndProject
6664
Global
6765
GlobalSection(SolutionConfigurationPlatforms) = preSolution
6866
DBG_SDK10|Any CPU = DBG_SDK10|Any CPU
@@ -345,8 +343,6 @@ Global
345343
{09974DE1-98BF-4D9B-81EF-8F41E86861B8} = {915DDBA0-6AE8-4D14-B9E2-A415CDD7DC0F}
346344
{069A8DEC-D613-4051-BDD4-DD3F9A2C2397} = {88368C47-6D83-42C2-BF3E-79583EACF29C}
347345
{A5B92B3B-B72D-426C-8C3D-9A41DF986357} = {88368C47-6D83-42C2-BF3E-79583EACF29C}
348-
{43E42F75-1B79-4E9D-9735-68B01B7241CE} = {88368C47-6D83-42C2-BF3E-79583EACF29C}
349-
{A96CE2AF-F773-4C0A-8680-4D0ED79F53A1} = {88368C47-6D83-42C2-BF3E-79583EACF29C}
350346
{5C96DF4F-267A-46DD-BA95-9F487E8DC1FE} = {88368C47-6D83-42C2-BF3E-79583EACF29C}
351347
{E03F8EC5-20CA-4D54-8CEA-291AFEF6B460} = {88368C47-6D83-42C2-BF3E-79583EACF29C}
352348
{54A3EE80-7894-433B-80BA-E29B0331B5B3} = {88368C47-6D83-42C2-BF3E-79583EACF29C}

0 commit comments

Comments
 (0)