
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
<img src=docs/logo.png?1 width=280 alt=Builder>
Builder language combines a preprocessor with an expression language and advanced imports.
Please note that the works is in-progress and published for preview purposes only.
Directives start with @ symbol.
@set <variable:identifier> <value:expression>
@set <variable:identifier> = <value:expression>
Assigns a value of an expression to a variable.
Variables are defined in a global context.
Example:
Sets SOMEVAR to 1:
@set SOMEVAR min(1, 2, 3)
@macro <name>(<arguments>) <body> @endmacro
@endmacro can be replaced with @end.
Declares a block of code that can take parameters and can be used with an @include statement. Once declared, macros are available from anywhere.
Variables declared as macro argumentys are only available within the macro scope and override global variables with the same name (but do not change them).
Example:
@macro some_macro(a, b, c)
Hello, @{a}!
Roses are @{b},
And violets are @{defined(c) ? c : "of undefiend color"}.
@end
Then some_macro can be used as:
@include some_macro("username", 123)
which will produce:
Hello, username!
Roses are red,
And violets are of undefiend color.
Conditional directive.
@if // consequent code @elseif <test:expression> // else if #1 code // ...more elseifs... @else // alternate code @endif
@endif can be replaced with @end.
Example:
@if __FILE__ == 'abc.ext' // include something @elseif __FILE__ == 'def.ext' // include something else @else // something completely different @endif
@{<expression>}
Inserts the value of the enclosed expression.
Example:
@set name "Someone"
Hello, @{name}, the result is: @{123 * 456}.
results in the following output:
Hello, Someone, the result is: 56088.
@error <message:expression>
Emits an error.
Example:
@if PLATFORM == "platform1" // platform 1 code @elseif PLATFORM == "platform2" // platform 2 code @elseif PLATFORM == "platform3" // platform 3 code @else @error "Platform is " + PLATFORM + " is unsupported" @endif
Includes local file, external source or a macro.
@include <source:expression>
@include some_macro("username", 123)
@include "somefile.ext"
@include "http://example.com/file.ext"
@include "https://example.com/file.ext"
@include "<repository_url>.git/<path>/<to>/<file>@<ref>"
For example, importing file from GitHub looks like:
Head of the default branch
@include "https://github.com/electricimp/Builder.git/README.md"
Head of the master branch
@include "https://github.com/electricimp/Builder.git/README.md<@master"
Tag v1.2.3:
@include "https://github.com/electricimp/Builder.git/README.md@v1.2.3"
Latest available tag
@include "https://github.com/electricimp/Builder.git/README.md@latest"
Directives that have parameters allow usage of expression syntax.
For example:
@include <source:expression>@set <variable:identifier> <value:expression>@if <condition:expression>@elseif <condition:expression>@{<expression>} (inline expressions)The following types are supported in expressions:
1,1E6, 1e-6, 1.567)"abc", 'abc')nulltruefalse|| && == != < > <= >= + - * / %
+ - !
somevar.membersomevar["member"]([1, 2, 3])[1]test ? consequent : alternate
<b>@set</b> statements are available in expressions.null.$, _, latin letters and digits and can start only with a non-digit.Line number (relative to the file in which this variable appears).
Example:
Hi from line @{__LINE__}!
Name of the file in which this variable appears.
Example:
Hi from file @{__FILE__}!
min(<numbers>)max(<numbers>)abs(<number>)defined(<variable_name>) – returns true if a variable is defined, false otherwise.Lines starting with @ followed by space or a line break are treated as comments and not added to the output.
Example:
@ something about platform #1 @set PLATFORM "platform1"
MIT
Mikhail Yurasov mikhail@electricimp.com
FAQs
Builder language implementation
We found that builder-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.