3.11.1 • Published 1 month ago

@swim/macro v3.11.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 month ago

@swim/macro

package documentation chat

@swim/macro implements a Recon-base macro engine. @swim/macro is part of the @swim/core framework.

Installation

npm

For an npm-managed project, npm install @swim/macro to make it a dependency. TypeScript sources will be installed into node_modules/@swim/macro/main. Transpiled JavaScript and TypeScript definition files install into node_modules/@swim/macro/lib/main. And a pre-built UMD script can be found in node_modules/@swim/macro/dist/main/swim-macro.js.

Browser

Browser applications can load swim-macro.js, along with its swim-core.js dependency, directly from the SwimOS CDN.

<!-- Development -->
<script src="https://cdn.swimos.org/js/latest/swim-core.js"></script>
<script src="https://cdn.swimos.org/js/latest/swim-macro.js"></script>

<!-- Production -->
<script src="https://cdn.swimos.org/js/latest/swim-core.min.js"></script>
<script src="https://cdn.swimos.org/js/latest/swim-macro.min.js"></script>

Usage

ES6/TypeScript

@swim/macro can be imported as an ES6 module from TypeScript and other ES6-compatible environments.

import * as macro from "@swim/macro";

CommonJS/Node.js

@swim/macro can also be used as a CommonJS module in Node.js applications.

var macro = require("@swim/macro");

Browser

When loaded by a web browser, the swim-macro.js script adds all @swim/macro library exports to the global swim namespace.