Skip to content

Commit

Permalink
feat: publish Typescript types
Browse files Browse the repository at this point in the history
  • Loading branch information
jGleitz committed Jul 9, 2020
1 parent f17dadf commit 35ba58b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
17 changes: 11 additions & 6 deletions package.json
Expand Up @@ -18,10 +18,12 @@
"files": [
"README.md",
"LICENSE",
"CHANGELOG.md",
"build/index.js",
"CHANGELOG.md"
"build/index.d.ts"
],
"main": "build/index.js",
"types": "build/index.d.ts",
"engines": {
"node": ">=6.0.0"
},
Expand All @@ -30,11 +32,14 @@
"url": "https://github.com/jGleitz/markdown-it-prism.git"
},
"scripts": {
"build": "babel *.js -d build",
"lint": "eslint *.js",
"prepare": "npm run build",
"unittest": "mocha test/test.ts",
"test": "npm run lint && npm run unittest"
"build:transpile": "babel ./src --out-dir build --extensions '.ts'",
"build:types": "tsc --project src",
"lint": "npm-run-all lint:*",
"lint:types": "tsc",
"lint:style": "eslint .",
"prepack": "npm-run-all build:*",
"unittest": "jest",
"test": "npm-run-all lint:* unittest"
},
"dependencies": {
"prismjs": "1.20.0"
Expand Down
9 changes: 9 additions & 0 deletions src/tsconfig.json
@@ -0,0 +1,9 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"declaration": true,
"declarationDir": "../build",
"noEmit": false,
"emitDeclarationOnly": true
}
}

0 comments on commit 35ba58b

Please sign in to comment.