Skip to content

Create and Install Test Packages

Nik edited this page Mar 17, 2023 · 4 revisions

If you would like to test a pre-production build of Skeleton, please follow the instructions below. This will create a tarball '.tgz' file (a bundled file, like a .zip), which can then be installed locally within a test project. This allows you to bypass installing the Skeleton package from the remote NPM repository.

IMPORTANT: THIS SHOULD NOT BE USE IN A PRODUCTION ENVIRONMENT.

Create a Package:

This will create a .tgz file.

  1. First, ensure you've pulled down all changes and are running the dev branch. Do not skip this step.
  2. Run npm run package to create a local /dist directory
  3. Run npm pack to generate the .tgz file
  4. The .tgz file can be found via your file browser in the root directory

Install a Tarball Package

NOTE: make sure your .tgz file is ready, per above, and follow the standard install instructions found on the dev branch of the documentation site. This ensures everything is update and in-sync with the new package you're about to install.

When you're prompted to install the Skeleton Package (via NPM install), instead do the following:

  1. Drop the .tgz file in the root of your project.
  2. Uninstall the public Skeleton package, npm remove @skeletonlabs/skeleton
  3. In your terminal, run npm install ./{nameOfTarballPackage}.tgz --save-dev (TIP: use TAB key to autocomplete this name)
  4. You'll note your package.json will list this version of the package installed as a dependency

Uninstall Tarball Package

If you're done testing and want to switch back to the production version of the package, do the following:

  1. Run npm uninstall {tarballPackage} (TIP: use TAB key to autocomplete this name)
  2. Install the production package using npm install @skeletonlabs/skeleton