pridepack

CLI for building TypeScript packages

MIT License

Downloads
1.2K
Stars
25
Committers
3

Bot releases are visible (Hide)

pridepack - Latest Release

Published by lxsmnsyc over 2 years ago

  • Add entrypoints to Pridepack config. entrypoints would allow packages to build with multiple entrypoints and ship with subpackages. Upon building, exports and typesVersions is automatically applied based on the given entrypoints configuration. This change also drops the dependency of pridepack to generate bundles based on exports field.
  • Add outputDir to Pridepack config. Defaults to dist.
  • Add startEntrypoint to Pridepack config. With the introduction of entrypoints, you can now provide which entrypoint to start with when running pridepack start and pridepack dev.
  • Add support for import.meta.env for env variables
  • Deprecate the use of main, module and types.
  • Fix license step during package initialization to ask whether author wants a license.
  • Fix env generation to merge .env with either .env.production and .env.development
pridepack - v1.0.0

Published by lxsmnsyc about 3 years ago

  • Drop react and ink for CLI. Now uses prompts and ora.
  • Template generation is no longer bundled into the package. The templates are now downloaded remotely from this repository.
  • ESM bundles, like CJS, now have prod and dev builds. This drops the need for process.env.NODE_ENV for the builds, allowing the use of ESM bundle in CDNs.
  • CJS bundle no longer has a common entrypoint. Loading CJS modules now relies on export conditions.
  • ts-jest is no longer a peer dependency (due to conflict reasons). It is still the default transformer, but users need to install ts-jest separately (if not installed previously).
  • Adds start and dev commands for templates like fastify.
  • plugins option can now be a function (through pridepack.config.js). When using a function, it can accept an object with the properties isDev, isCJS and isESM.
  • create and init commands now prompts users for package information. This also generates LICENSE file.
  • watch now uses incremental mode ESBuild
  • PNPM is now supported.
  • Users can now choose whichever package manager they are using to initialize the package. Previously, this aggressively uses the installed package manager's availability.

Migrating to 1.0.0

package.json

The following entrypoints must now be provided. ./esm and ./cjs entrypoints are optional.

{
  "types": "dist/types/index.d.ts",
  "main": "dist/cjs/production/index.js",
  "module": "dist/esm/production/index.js",
  "exports": {
    ".": {
      "development": {
        "require": "./dist/cjs/development/index.js",
        "import": "./dist/esm/development/index.js"
      },
      "require": "./dist/cjs/production/index.js",
      "import": "./dist/esm/production/index.js",
      "types": "./dist/types/index.d.ts"
    },
    "./dev": {
      "production": {
        "require": "./dist/cjs/production/index.js",
        "import": "./dist/esm/production/index.js"
      },
      "require": "./dist/cjs/development/index.js",
      "import": "./dist/esm/development/index.js",
      "types": "./dist/types/index.d.ts"
    },
    "./esm": {
      "development": "./dist/esm/development/index.js",
      "production": "./dist/esm/production/index.js",
      "default": "./dist/esm/production/index.js",
      "types": "./dist/types/index.d.ts"
    },
    "./cjs": {
      "development": "./dist/cjs/development/index.js",
      "production": "./dist/cjs/production/index.js",
      "default": "./dist/cjs/production/index.js",
      "types": "./dist/types/index.d.ts"
    }
  }
}

For scripts, if you are using a start command for running the index file (e.g. fastify-based templates), you may add the following to the scripts field:

{
  "start": "pridepack start",
  "dev": "pridepack dev",
}

ts-jest

ts-jest is still the default preset for pridepack test, however, it is no longer a peer dependency. In this case, users needs to install ts-jest as devDependency. Templates have also been re-adjusted.

pridepack - 0.11.0

Published by lxsmnsyc about 3 years ago

This minor release adds the bot-discord template contributed by @TheoryOfNekomata

pridepack -

Published by lxsmnsyc over 3 years ago

  • Adds support for JS config files.
  • Adds support for ESBuild plugins in config.
  • Adds vue template. SFC is currently not yet supported, however, can be activated through the new plugins support.
  • Simplified some processes and UI.
pridepack - Initial release

Published by lxsmnsyc about 4 years ago

  • Rewrote the entire CLI. Listr is deprecated in favor of Pridepack's own interface implementation. This way, logs are displayed in a personalized way.
  • Added watch mode. The implementation is currently premature, but improvements will be added in further development.
  • Fix ESBuild issue where the tsconfig is parsed in the wrong way.
  • Build pipeline is now run concurrently instead of sequentially, although the speed is negligible since ESBuild is very fast.
Package Rankings
Top 5.61% on Npmjs.org
Related Projects