1.0.20 • Published 5 months ago

@realkoder/antik-moderne-shared-types v1.0.20

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

Configuring the NPM project

1. First we configrued the project

mkdir shared-types
cd shared-types
npm init --scope=@your-org -y

2. Log in to npm

  1. Open your terminal and run the following command, replacing YOUR_GITHUB_USERNAME with your actual GitHub username:
    npm login

Step 3: Configure Your package.json

Ensure your package.json is set up correctly for GitHub Packages:

{
  "name": "@your_github_username/your-package-name",
  "version": "1.0.0",
  "description": "Your package description",
  "main": "index.js",
  "publishConfig": {
    "registry": "https://registry.npmjs.org/",
    "access": "public"
  },
  "scripts": {
    "build": "tsc",
    "prepublish": "npm run build"
  },
  "description": "",
  "files": ["dist"],
  "dependencies": {
    // your dependencies
  },
  "devDependencies": {
    // your dev dependencies
  }
}

Step 4. Setup TypeScript

npx tsc --init

Update the ts.config

{
  "compilerOptions": {
    "target": "ES2020",
    "module": "CommonJS",
    "declaration": true,
    "outDir": "./dist",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true
  },
  "include": ["src/**/*"],
  "exclude": ["node_modules"]
}

Step 5: Build and publish

Run the following command to publish your package:

npm install

# Make sure to delete the ./dist folder before building
npm run build

# patching the version
npm version patch

# For GitHub Packages:
npm publish

Step 6: Check for Errors

If you encounter any errors, check the logs for more details. You can find the logs in the path mentioned in the error message, such as:

To further update package and build

# Check for Existing Versions
npm view @realkoder/antik-moderne-shared-types versions --registry=https://npm.pkg.github.com

# use npm version command to increment version automatically
npm version patch

To install the npm package

npm install @realkoder/antik-moderne-shared-types@latest

successfully installed the npm-package successfully installed the npm package

1.0.20

5 months ago

1.0.19

5 months ago

1.0.18

5 months ago

1.0.17

5 months ago

1.0.16

5 months ago

1.0.15

5 months ago

1.0.14

5 months ago

1.0.13

5 months ago

1.0.12

5 months ago

1.0.11

5 months ago

1.0.10

5 months ago

1.0.9

5 months ago

1.0.8

5 months ago

1.0.7

5 months ago

1.0.6

5 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago