Convert a DOM DocumentType into a string, e.g. "<!DOCTYPE html>"
Browse Source

Add typescript declaration, also publish as module, tweak package.json

master
Gerben 4 years ago
parent
commit
d0a9a14759
2 changed files with 13 additions and 3 deletions
  1. +10
    -3
      package.json
  2. +3
    -0
      src/index.d.ts

+ 10
- 3
package.json View File

@@ -2,21 +2,28 @@
"name": "doctype-to-string",
"version": "0.1.3",
"description": "Convert a DOM DocumentType into a string, e.g. \"<!DOCTYPE html>\"",
"keywords": [
"dom"
],
"homepage": "https://code.treora.com/gerben/doctype-to-string",
"repository": {
"type": "git",
"url": "https://code.treora.com/gerben/doctype-to-string"
},
"main": "lib",
"main": "lib/index.js",
"module": "src/index.js",
"types": "src/index.d.ts",
"scripts": {
"build": "babel -d lib src",
"postpublish": "publish-to-git --force && publish-to-git --force --tag latest",
"postpublish": "publish-to-git --force",
"prepublish": "npm run build",
"test": "ava"
},
"author": "Gerben <gerben@treora.com>",
"license": "CC0-1.0",
"files": [
"lib"
"lib",
"src"
],
"devDependencies": {
"ava": "^1.4.1",


+ 3
- 0
src/index.d.ts View File

@@ -0,0 +1,3 @@
declare module 'doctype-to-string' {
export default function(doctype: DocumentType | null): string
}

Loading…
Cancel
Save