Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the new generated package.json looks strange #97

Closed
aladdin-add opened this issue Nov 23, 2021 · 1 comment
Closed

the new generated package.json looks strange #97

aladdin-add opened this issue Nov 23, 2021 · 1 comment
Assignees

Comments

@aladdin-add
Copy link

Current Behavior

{
  "version": "0.1.0",
  "license": "MIT",
  "main": "dist/index.js",
  "typings": "dist/index.d.ts",
  "files": [
    "dist",
    "src"
  ],
  "engines": {
    "node": ">=10"
  },
  "scripts": {
    "start": "dts watch",
    "build": "dts build",
    "test": "dts test",
    "lint": "dts lint",
    "prepare": "dts build",
    "size": "size-limit",
    "analyze": "size-limit --why"
  },
  "peerDependencies": {},
  "husky": {
    "hooks": {
      "pre-commit": "dts lint"
    }
  },
  "prettier": {
    "printWidth": 80,
    "semi": true,
    "singleQuote": true,
    "trailingComma": "es5"
  },
  "jest": {
    "testEnvironment": "node"
  },
  "name": "mylib",
  "author": "weiran",
  "module": "dist/mylib.esm.js",
  "size-limit": [
    {
      "path": "dist/mylib.cjs.production.min.js",
      "limit": "10 KB"
    },
    {
      "path": "dist/mylib.esm.js",
      "limit": "10 KB"
    }
  ],
  "devDependencies": {
    "@size-limit/preset-small-lib": "^7.0.3",
    "@tsconfig/recommended": "^1.0.1",
    "dts-cli": "^0.19.6",
    "husky": "^7.0.4",
    "size-limit": "^7.0.3",
    "tslib": "^2.3.1",
    "typescript": "^4.5.2"
  }
}

Expected behavior

a well-sorted package.json, using something like sort-package-json

Suggested solution(s)

Additional context

Your environment


@aladdin-add aladdin-add self-assigned this Nov 23, 2021
@aladdin-add
Copy link
Author

after the change:

{
  "name": "t",
  "version": "0.1.0",
  "license": "MIT",
  "author": "weiran",
  "main": "dist/index.js",
  "module": "dist/t.esm.js",
  "typings": "dist/index.d.ts",
  "files": [
    "dist",
    "src"
  ],
  "scripts": {
    "analyze": "size-limit --why",
    "build": "dts build",
    "lint": "dts lint",
    "prepare": "dts build",
    "size": "size-limit",
    "start": "dts watch",
    "test": "dts test"
  },
  "husky": {
    "hooks": {
      "pre-commit": "dts lint"
    }
  },
  "prettier": {
    "printWidth": 80,
    "semi": true,
    "singleQuote": true,
    "trailingComma": "es5"
  },
  "jest": {
    "testEnvironment": "node"
  },
  "devDependencies": {
    "@size-limit/preset-small-lib": "^7.0.3",
    "@tsconfig/recommended": "^1.0.1",
    "dts-cli": "^0.19.6",
    "husky": "^7.0.4",
    "size-limit": "^7.0.3",
    "tslib": "^2.3.1",
    "typescript": "^4.5.2"
  },
  "peerDependencies": {},
  "engines": {
    "node": ">=12"
  },
  "size-limit": [
    {
      "path": "dist/t.cjs.production.min.js",
      "limit": "10 KB"
    },
    {
      "path": "dist/t.esm.js",
      "limit": "10 KB"
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant