New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@teambit/envs

Package Overview
Dependencies
Maintainers
18
Versions
1546
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teambit/envs

# Creating a new Environment Before starting, it might be easier to re-use an existing environment, see the "Composing an Environment" section below.

  • 0.0.105
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.7K
increased by90.24%
Maintainers
18
Weekly downloads
 
Created
Source

This is a WIP, Please improve.

Creating a new Environment

Before starting, it might be easier to re-use an existing environment, see the "Composing an Environment" section below.

To create a new environment, create a new extension, add "teambit.envs/envs" as a dependency and register to its slot: envs.registerEnv(yourNewEnv);. See the provider of react.extension.ts for a detailed example.

The class of the environment extension needs to implement the Environment interface. For now, due to types/circular constrains, it doesn't require to implement anything. However, to get a working env, you must implement the following:

getBuildPipe(): BuildTask[];

There are the tasks that will be running on "bit tag"/"bit build". If you have a compiler setup, it should include this.compiler.task. Also, it is recommended to add the dry-run task of the publisher: this.pkg.dryRunTask. See the react.env.ts for a detailed example.

Also, it is recommended to implement the following:

getCompiler(): Compiler; // if you need compiler
getTester(): Tester; // if you need tester
getDependencies(); // if you need to change/add/remove package dependencies

Configure workspace to use the env

add this to your workspace.jsonc file.

"teambit.envs/envs": {
  "env": "your-new-env",
  "config": {}
}

Composing an Environment

TBD

FAQs

Package last updated on 02 Nov 2020

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