0.0.44 • Published 9 months ago

@subjektifylabs/subjektify-build v0.0.44

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
9 months ago

@subjektifylabs/subjektify-build

NPM Version

subjektify-build is a core package of the Subjektify toolkit, designed to facilitate the build process the Subjekt model. This package provides tools and utilities to parse, validate, and compile Subjekt model files, ensuring a seamless and efficient build workflow.

Features

  • Model Parsing: Parse Subjekt model files (.subjekt or JSON) to generate an Abstract Syntax Tree (AST) or a SubjektifyModel.
  • Validation: Validate the structure and semantics of Subjekt models to ensure correctness.
  • Compilation: Compile Subjekt models into executable code or other target formats.

Installation

subjektify-build is already included in the subjektify package.

Tasks

npx subjektify build

Environment Extensions

The plugin adds a model object to the Subjektify Runtime Environment.

This object contains both the AST model and the semantic model for the Subjekt files configured.

Usage

subjektify-build is configurable from the subjektify.config.(js|ts). Here’s a basic example of how to use subjektify-build to parse and build a Subjekt model:

import { SubjektifyConfig } from "subjektify";

const config: SubjektifyConfig = {
  namespace: "my.namespace",
  version: "0.1.0",
  license: "MIT",
  build: {
    sources: ["subjects"],
    output: "build",
    projections: [
      {
        abstract: false,
        transformations: [
          {
            type: "excludeByTrait",
            args: { traits: ["internal"] },
          },
        ],
      },
    ],
  },
};

export default config;

How it Works

  1. Model Parsing: The build process starts by parsing Subjekt model files from the specified sources. These files should be in .subjekt format.
  2. Validation: Once parsed, the models are validated to ensure they adhere to the expected syntax and semantics.
  3. Projections and Transformations: The build configuration allows defining projections and transformations that modify or generate different views of the model. These transformations are applied based on the specified projections.
  4. Output: Finally, the transformed models are written to the specified output directory.
0.0.40

10 months ago

0.0.41

10 months ago

0.0.42

10 months ago

0.0.43

10 months ago

0.0.44

9 months ago

0.0.38

10 months ago

0.0.39

10 months ago

0.0.37

10 months ago

0.0.36

10 months ago

0.0.35

10 months ago

0.0.34

10 months ago

0.0.33

10 months ago

0.0.32

10 months ago

0.0.31

10 months ago

0.0.30

11 months ago

0.0.29

11 months ago

0.0.28

11 months ago

0.0.27

11 months ago

0.0.26

11 months ago

0.0.25

11 months ago

0.0.24

1 year ago

0.0.23

1 year ago

0.0.22

1 year ago

0.0.21

1 year ago

0.0.20

1 year ago

0.0.19

1 year ago

0.0.18

1 year ago

0.0.17

1 year ago

0.0.16

1 year ago

0.0.15

1 year ago

0.0.14

1 year ago

0.0.13

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago