A lightning-fast frontend build tool designed to leverage JavaScript's native ESM system for unbundled development with instant browser updates.
82
A utility that inspects Snowpack projects to provide information about file URL mappings and installed dependencies.
Resolve local file paths to their corresponding web URLs based on Snowpack configuration.
/src/components/Button.tsx and a Snowpack config with mount { "src": "/dist" }, returns URL /dist/components/Button.tsx @test/public/logo.png and a Snowpack config with mount { "public": "/" }, returns URL /logo.png @testRead the Snowpack lockfile to retrieve installed package information.
snowpack.deps.json exists in the current directory, returns the parsed lockfile data @test@generates
/**
* Resolves a file path to its URL based on Snowpack mount configuration.
*
* @param {string} filePath - Absolute file path to resolve
* @param {object} snowpackConfig - Snowpack configuration object
* @returns {string} The resolved URL
*/
function getFileUrl(filePath, snowpackConfig) {
// Implementation here
}
/**
* Reads the Snowpack lockfile from a directory.
*
* @param {string} directory - Directory path to search for lockfile
* @returns {object|null} Lockfile contents or null if not found
*/
function getDependencies(directory) {
// Implementation here
}
module.exports = {
getFileUrl,
getDependencies
};Provides utility functions for file URL resolution and lockfile management.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-snowpackevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10