Skip to content

Commit

Permalink
package.json: Add package.json
Browse files Browse the repository at this point in the history
* Include package-lock.json
* Installs rollup & graceful-fs as dev-dependencies which will be used
  to wrap JSONCrush in module formats; cjs, esm & umd.
* Defines preinstall script to install dev-dependencies & build modules in dist folder
  * See npm/npm#10366 (comment)
  * rollup & graceful-fs are only used for build and not required by
    JSONCrush; therefore they are dev-dependencies
* Defines paths to 3 module variants: main, browser & module for cjs, esm and umd modules
* Defines path to typescript types definition
  • Loading branch information
darcyparker committed Jan 8, 2021
1 parent c62785e commit 4490b40
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
30 changes: 30 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "JSONCrush",
"version": "1.0.1",
"description": "Compress JSON in URL friendly strings",
"main": "dist/JSONCrush.cjs.js",
"module": "dist/JSONCrush.esm.js",
"browser": "dist/JSONCrush.umd.js",
"types": "JSONCrush.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "rollup -c",
"preinstall": "npm install --ignore-scripts && npm run build"
},
"engines": {
"node": ">=10.0.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/KilledByAPixel/JSONCrush.git"
},
"keywords": [
"JSON",
"URL",
"URI",
"compression"
],
"author": "KilledByAPixel",
"license": "MIT",
"bugs": {
"url": "https://github.com/KilledByAPixel/JSONCrush/issues"
},
"homepage": "https://github.com/KilledByAPixel/JSONCrush",
"devDependencies": {
"graceful-fs": "^4.2.4",
"rollup": "^2.36.1"
},
"dependencies": {}
}

0 comments on commit 4490b40

Please # to comment.