From b721a218eb201959a48c8885a08947322bb758f2 Mon Sep 17 00:00:00 2001 From: Harminder virk Date: Tue, 24 Mar 2020 13:08:42 +0530 Subject: [PATCH] chore: setup adonisjs instructions and publish files --- package.json | 38 +++++++++++++++++++++++++++++++------- tsconfig.json | 3 ++- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index d4f0ef9..e30786f 100644 --- a/package.json +++ b/package.json @@ -2,14 +2,23 @@ "name": "@adonisjs/auth", "version": "3.1.0", "description": "Offical authentication provider for Adonis framework", + "main": "build/providers/AuthProvider.js", + "files": [ + "build/adonis-typings", + "build/providers", + "build/src", + "build/templates" + ], + "types": "build/adonis-typings/index.d.ts", "scripts": { "mrm": "mrm --preset=@adonisjs/mrm-preset", "pretest": "npm run lint", "test": "node japaFile.js", "lint": "tslint --project tsconfig.json", "clean": "del build", + "copyfiles": "copyfiles \"templates/**/*.txt\" build", "compile": "npm run lint && npm run clean && tsc", - "build": "npm run compile", + "build": "npm run compile && npm run copyfiles", "commit": "git-cz", "release": "np", "version": "npm run build" @@ -43,6 +52,7 @@ "@poppinss/dev-utils": "^1.0.4", "@types/node": "^13.9.2", "commitizen": "^4.0.3", + "copyfiles": "^2.2.0", "cz-conventional-changelog": "^3.1.0", "del-cli": "^3.0.0", "doctoc": "^1.4.0", @@ -68,12 +78,6 @@ ".ts" ] }, - "main": "build/index.js", - "files": [ - "build/src", - "build/index.d.ts", - "build/index.js" - ], "husky": { "hooks": { "pre-commit": "doctoc README.md --title='## Table of contents' && git add README.md", @@ -94,5 +98,25 @@ "@poppinss/utils": "^2.1.2", "array-to-sentence": "^2.0.0", "jose": "^1.25.0" + }, + "adonisjs": { + "templates": { + "config": [ + { + "src": "config.txt", + "dest": "auth" + } + ], + "contracts": [ + { + "src": "contract.txt", + "dest": "auth" + } + ] + }, + "types": "@adonisjs/auth", + "providers": [ + "@adonisjs/auth" + ] } } diff --git a/tsconfig.json b/tsconfig.json index dd29dfe..0023340 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,6 +7,7 @@ ], "compilerOptions": { "experimentalDecorators": true, - "emitDecoratorMetadata": true + "emitDecoratorMetadata": true, + "skipLibCheck": true } }