@jsenv/core
v40.6.0
Published
Tool to develop, test and build js projects
Downloads
6,906
Readme
@jsenv/core
Overview
Jsenv is a suite of tools for JavaScript projects that prioritizes standards and simplicity, making it ideal for both beginners and those who need straightforward tools.
Installation
npm install --save-dev @jsenv/core
Compatibility: Tested on Mac, Windows, and Linux with Node.js 20. Other environments are not officially tested.
Documentation
For comprehensive documentation, see the full user documentation.
Basic Usage
Start a development server:
import { startDevServer } from "@jsenv/core";
await startDevServer({
sourceDirectoryUrl: import.meta.resolve("./"),
});
Core Features
@jsenv/core
provides four main tools:
- Dev Server: Serves source files with live reloading to facilitate development
- Build: Optimizes source files into a specified directory for production
- Build Server: Serves the built files, allowing for testing and verifying the production build
- Test Runner: Runs test files concurrently to ensure code reliability
Key Advantages
- Standards-first approach: Built on web standards rather than custom abstractions
- Robust versioning: Avoids cascading hash changes during builds
- Broad browser compatibility: Works with modern and older browsers
- Isolated testing: Prevents cross-test contamination
- Simple API: Designed for clarity and ease of use
Quick Start
The easiest way to try jsenv is with the CLI:
npx @jsenv/cli
The CLI provides templates for web applications, React projects, and Node.js packages to get you started quickly.
Read more in @jsenv/cli.