Skip to content

Latest commit

 

History

History
118 lines (90 loc) · 1.95 KB

Installation-Guide.md

File metadata and controls

118 lines (90 loc) · 1.95 KB

Installation Guide

This is a module for Node.js available through the npm registry.

Step 1: Install Node.js 0.10 or higher is required.

Step 2: Create a new directory for your project. (For new projects)

Step 3: Create the package.json file. (For new projects)

npm init

Step 4: Installing the Vkrun Framework

NPM
npm install vkrun
YARN
yarn add vkrun

Your package.json should look like:

{
  "name": "project-name",
  "main": "index.js",
  "type": "module",
  "scripts": {
    "dev": "node index.js"
  },
  "dependencies": {
    "vkrun": "^0.26.0"
  }
}

Step 5: Installing the Vkrun Framework

If you're working on a TypeScript project, you also need to install TypeScript:
NPM
npm install typescript @types/node ts-node --save-dev
YARN
yarn add typescript @types/node ts-node -D

Your package.json should look like:

{
  "name": "project-name",
  "main": "index.ts",
  "scripts": {
    "dev": "ts-node index.ts"
  },
  "dependencies": {
    "vkrun": "^0.26.0"
  },
  "devDependencies": {
    "typescript": "*",
    "ts-node": "^10.9.2",
    "@types/node": "^20.10.4"
  }
}

Your tsconfig.json should look like:

{
  "exclude": ["./dist"],
  "compilerOptions": {
    "target": "ES2021",
    "module": "commonjs",
    "allowJs": true,
    "outDir": "./dist",
    "rootDir": "./src",
    "removeComments": true,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "sourceMap": true,
    "skipLibCheck": true,
    "declaration": true
  },
  "include": [ "src" ]
}

If this is your first time using Vkrun, you can choose a template from index.ts, example projects.

Step 6: Running the project

NPM
npm run dev
YARN
yarn dev