Node.js virtual environment builder for creating isolated Node.js environments
80
A Python-based tool that automates the creation of Node.js virtual environments for multiple project configurations.
Creates isolated Node.js environments with specified configurations.
Validates that created environments have the correct structure and contain expected executables.
@generates
def create_node_env(target_dir, node_version='latest', with_npm=True):
"""
Create a Node.js virtual environment.
Parameters:
target_dir (str): Path where the environment should be created
node_version (str): Node.js version to install (default: 'latest')
with_npm (bool): Whether to install npm (default: True)
Returns:
str: Absolute path to the created environment directory
Raises:
Exception: If environment creation fails
"""
pass
def verify_environment(env_dir):
"""
Verify that a Node.js environment was created successfully.
Parameters:
env_dir (str): Path to the environment directory
Returns:
dict: Dictionary containing 'exists' (bool), 'has_bin_dir' (bool),
and 'has_node' (bool) to indicate validation results
"""
passProvides Node.js virtual environment creation capabilities.
Install with Tessl CLI
npx tessl i tessl/pypi-nodeenvdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10