1.1.4 • Published 7 months ago

react-counter-joeban0608 v1.1.4

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

npm-module-react-counter

test npm react component

  1. initial package.json

    npm init -y
  2. 安裝 react 套件

    yarn add -D react react-dom typescript @types/react
  3. .gitignore

    node_modules.idea;
    dist;
    yarn - error.log;
  4. tsconfig.json

    {
      "include": ["src"],
      "exclude": ["dist", "node_modules"],
      "compilerOptions": {
        "module": "esnext",
        "lib": ["dom", "esnext"],
        "importHelpers": true,
        "declaration": true,
        "sourceMap": true,
        "rootDir": "./src",
        "outDir": "dist",
        "strict": true,
        "noImplicitReturns": true,
        "noFallthroughCasesInSwitch": true,
        "noUnusedLocals": true,
        "noUnusedParameters": true,
        "moduleResolution": "node",
        "jsx": "react",
        "esModuleInterop": true,
        "skipLibCheck": true,
        "forceConsistentCasingInFileNames": true
      }
    }
  5. package.json

{
  "name": "react-counter-joeban0608",
  "version": "1.0.0",
  "description": "test npm react component",
  "main": "dist/index.js",
  "files": [
    "dist"
  ],
  "exports": {
    ".": {
      "types": "./dist/index.d.ts",
      "default": "./dist/index.js"
    }
  },
  "scripts": {
    "clean": "rimraf dist",
    "prebuild": "npm run clean",
    "build": "tsc",
    "preVersion": "npm run build",
    "publish": "npm publish"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/joeban0608/npm-module-react-counter.git"
  },
  "keywords": [
    "react",
    "typescript"
  ],
  "author": "joeban0608",
  "license": "ISC",
  "devDependencies": {
    "@types/react": "^18.2.28",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "typescript": "^5.2.2"
  },
  "dependencies": {
    "rimraf": "^5.0.5",
    "sass": "^1.69.3"
  }
}
  1. publish

    npm run preVersion
    npm run publish
1.1.4

7 months ago

1.1.3

7 months ago

1.1.2

7 months ago

1.1.1

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago