Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sewing-kit/core

Package Overview
Dependencies
Maintainers
4
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sewing-kit/core

The core data models for sewing-kit-next

  • 0.6.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
71
increased by294.44%
Maintainers
4
Weekly downloads
 
Created
Source

@sewing-kit/core

Modeling

Sewing-kit parses the shape of a codebase by modeling it into concepts it understands. At a high-level these these concepts are a Workspace and Project.

Project

A Project can be a either a Package (NPM library), WebApp (a react app) or Service (a Node.js server).

Workspace

A Workspace is a composition of Projects. It includes all the WebApp, Package, and Services for a given codebase.

Base

Workspace, WebApp, Package, and Service all extend a Base class. The Base class provides a number of useful properties for the classes extending it. These include the a root directory, the NPM dependencies used, and an fs property which should be used for all FileSystem related operations.

Core

Important classes to highlight here are TargetRuntime and TargetBuilder. In the context of sewing-kit, a target refers to the build output for a given Project.

TargetRuntime

The TargetRuntime class contains information about the runtime for a build target (eg. Does the build run in a Node.js or browser runtime?). This class provides a static utility, TargetRuntime.fromProject, to generate the TargetRuntime for a given Project.

TargetBuilder

This class is foundational to how sewing-kit generates build outputs for a given project. It's heavily used by the sewing-kit build CLI command. This class can also be used to plugin authors to generate custom build outputs (eg. multi-browser and multi-locale builds).

Installation

yarn add @sewing-kit/core --dev

FAQs

Package last updated on 07 Jul 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc