Skip to content

Commit

Permalink
build: add cjs distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber committed Aug 3, 2022
1 parent 155b10a commit 717522f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -7,3 +7,4 @@ node_modules
.DS_Store
package-lock.json
.bloggify/*
dist
File renamed without changes.
20 changes: 14 additions & 6 deletions package.json
Expand Up @@ -2,14 +2,21 @@
"name": "parse-url",
"version": "7.0.3",
"description": "An advanced url parser supporting git urls too.",
"main": "lib/index.js",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./index.d.ts",
"exports": {
"types": "./index.d.ts",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"directories": {
"example": "example",
"test": "test"
},
"scripts": {
"test": "node test"
"test": "node test/index.mjs",
"build": "pkgroll"
},
"repository": {
"type": "git",
Expand All @@ -29,11 +36,12 @@
},
"homepage": "https://github.com/IonicaBizau/parse-url",
"devDependencies": {
"tester": "^1.3.1"
"pkgroll": "^1.4.0",
"tester": "^1.3.1",
"normalize-url": "^7.0.3"
},
"dependencies": {
"parse-path": "^5.0.0",
"normalize-url": "^7.0.3"
"parse-path": "^5.0.0"
},
"files": [
"bin/",
Expand Down
2 changes: 0 additions & 2 deletions lib/index.js → src/index.js
@@ -1,5 +1,3 @@
"use strict"

// Dependencies
import parsePath from "parse-path";
import normalizeUrl from "normalize-url";
Expand Down
2 changes: 1 addition & 1 deletion test/index.js → test/index.mjs
@@ -1,5 +1,5 @@
// Dependencies
import parseUrl from "../lib/index.js";
import parseUrl from "../dist/index.mjs";
import tester from "tester";
import normalizeUrl from "normalize-url";

Expand Down

0 comments on commit 717522f

Please sign in to comment.