Pak Gets Its Own Config File
We’ve made a small, but really significant change to Pak.
Pak now has its own package description file — pak.json.
Instead of using the package.json, we’re switching for pak to use its own configuration file pak.json.
Ready why …
Changing from package.json to pak.json
Why change from the universal package.json?
The package.json file is used primarily by NPM to describe installed Node packages. While the package.json format was originally proposed by CommonJS, it has been empowered largely by NPM, which now defacto controls the package.json format. As NPM developers and the NPM ecosystem have evolved, the assumption that package.json exists solely for NPM has grown. During this time, Pak’s use of package.json coexisting with NPM has been increasingly problematic. NPM and third party tools assume that Pak dependencies are NPM dependencies and this causes confusion.
To resolve this confusion, Pak is getting its own pak.json configuration file. Pak will continue to work with packages that use package.json, but it will look for a pak.json first and then fallback to using package.json if it exists. This will permit Pak to be isolated from NPM and make it easier for applications that use both.
Changes to pak.json
- Previous Pak properties in package.json were previously defined under a “pak” property. In pak.json, these properties can now be defined at the top level.
- Previously Pak used a “mode” property to select properties from a “modes” collection. These have been renamed to “profile” and “profiles” respectively. The old “mode” and “modes” are deprecated but will be parsed if “profile” and “profiles” do not exist.