From cd537c404e5813d6f385ec105deb95f34d2bd264 Mon Sep 17 00:00:00 2001 From: Gerben Date: Wed, 11 Apr 2018 13:24:44 +0200 Subject: [PATCH] Publish transpiled version --- .gitignore | 1 + package.json | 8 +++++++- index.js => src/index.js | 0 index.test.js => test/index.js | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) rename index.js => src/index.js (100%) rename index.test.js => test/index.js (96%) diff --git a/.gitignore b/.gitignore index 3c3629e..0ae7e5c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +/lib diff --git a/package.json b/package.json index 30cf010..d8abdf1 100644 --- a/package.json +++ b/package.json @@ -2,14 +2,20 @@ "name": "doctype-to-string", "version": "0.1.0", "description": "Convert a DOM DocumentType into a string, e.g. \"\"", - "main": "index.js", + "main": "lib", "scripts": { + "build": "babel -d lib src", + "prepublish": "npm run build", "test": "ava" }, "author": "Gerben ", "license": "CC0-1.0", + "files": [ + "lib" + ], "devDependencies": { "ava": "^1.0.0-beta.3", + "babel-cli": "^6.26.0", "babel-preset-env": "^1.6.1", "babel-register": "^6.26.0", "window": "^4.2.5" diff --git a/index.js b/src/index.js similarity index 100% rename from index.js rename to src/index.js diff --git a/index.test.js b/test/index.js similarity index 96% rename from index.test.js rename to test/index.js index 0197d78..e60378c 100644 --- a/index.test.js +++ b/test/index.js @@ -1,7 +1,7 @@ import test from 'ava' import Window from 'window'; -import doctypeToString from '.' +import doctypeToString from '../src' function makeStubDocument(doctype) { const window = new Window()