static binaries of npm and node
Project description
static-npm
Downloads and runs npm, npx and node through static binary downloads.
Install
pip install static-npm
Cmds
# Get the versions of all tools
static-npm --version
static-node --version
static-npx --version
# Install live-server
static-npm install -g live-server
Api
from pathlib import Path
from static_npm.npm import Npm
from static_npm.npx import Npx
from static_npm.paths import CACHE_DIR
def _get_tool_dir(tool: str) -> Path:
return CACHE_DIR / tool
npm = Npm()
npx = Npx()
tool_dir = _get_tool_dir("live-server")
npm.run(["install", "live-server", "--prefix", str(tool_dir)])
proc = npx.run(["live-server", "--version", "--prefix", str(tool_dir)])
rtn = proc.wait()
stdout = proc.stdout
assert 0 == rtn
assert "live-server" in stdout
To develop software, run . ./activate.sh
Windows
This environment requires you to use git-bash.
Linting
Run ./lint.sh to find linting errors using pylint, flake8 and mypy.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
static_npm-1.0.6.tar.gz
(12.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file static_npm-1.0.6.tar.gz.
File metadata
- Download URL: static_npm-1.0.6.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a63fbf7026c98d18d0e70c5da76577d22e17dfa54c7db47e310d8e4b582bc2cb
|
|
| MD5 |
df73cc077ecb3bfece80c918a986845c
|
|
| BLAKE2b-256 |
1ddfd8613a8162bc591154a8df8fbfbce67ca87a4bd9234b7eb2edc2b41b32b6
|
File details
Details for the file static_npm-1.0.6-py2.py3-none-any.whl.
File metadata
- Download URL: static_npm-1.0.6-py2.py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eee9c2bc21008bc6e8e6df3558941268a658d6a232a5a50e2bf7a3d432553351
|
|
| MD5 |
7a9755542df4d8b3a4b5bb628b888f48
|
|
| BLAKE2b-256 |
4399c32bd7a98c5782b6899d2fac1fa6d59831b0159a22e0be3cd431782148f5
|