From 3bfb41285eb1e0e2acfe2447aa3a2792ae6e5900 Mon Sep 17 00:00:00 2001 From: David Bushong Date: Fri, 18 Oct 2019 14:44:15 -0700 Subject: [PATCH] refactor: move files to std locations --- LICENSE | 2 +- README.md | 4 ++-- index.js => lib/host-pattern.js | 32 ++++++++++++++++++++++++++++++ typedefs.d.ts => lib/typedefs.d.ts | 0 package.json | 19 +++++++++--------- 5 files changed, 44 insertions(+), 13 deletions(-) rename index.js => lib/host-pattern.js (70%) rename typedefs.d.ts => lib/typedefs.d.ts (100%) diff --git a/LICENSE b/LICENSE index 4884c9c..c801284 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015, Groupon, Inc. +Copyright (c) 2019, Groupon, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.md b/README.md index 779bcd8..14227ac 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ npm install --save host-pattern ### `expand` ```js -var hostPattern = require('host-pattern'); +const hostPattern = require('host-pattern'); // Lists (comma-separated): hostPattern.expand('example.net,www.host.com'); @@ -33,7 +33,7 @@ hostPattern.expand('my-host<1,3-5>.example.com'); ### `abbreviate` ```js -var hostPattern = require('host-pattern'); +const hostPattern = require('host-pattern'); // Lists (comma-separated): hostPattern.abbreviate([ 'example.net', 'www.host.com' ]); diff --git a/index.js b/lib/host-pattern.js similarity index 70% rename from index.js rename to lib/host-pattern.js index 8cc002d..8b7bf9a 100644 --- a/index.js +++ b/lib/host-pattern.js @@ -1,3 +1,35 @@ +/* + * Copyright (c) 2019, Groupon, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * Neither the name of GROUPON nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + 'use strict'; function byNumeric(a, b) { diff --git a/typedefs.d.ts b/lib/typedefs.d.ts similarity index 100% rename from typedefs.d.ts rename to lib/typedefs.d.ts diff --git a/package.json b/package.json index 4610499..4cf4ee3 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "1.1.1", "description": "Summarize and expand host patterns", "license": "BSD-3-Clause", - "main": "index.js", + "main": "lib/host-pattern.js", "homepage": "https://github.com/groupon/host-pattern#readme", "repository": { "type": "git", @@ -32,7 +32,7 @@ ] } }, - "types": "typedefs.d.ts", + "types": "lib/typedefs.d.ts", "dependencies": {}, "devDependencies": { "assertive": "^2.0.2", @@ -53,21 +53,20 @@ "name": "Groupon", "email": "opensource@groupon.com" }, + "contributors": [ + "Jan Krems ", + "David Bushong " + ], "keywords": [ "host", "pattern", "glob" ], "files": [ - "index.js", - "typedefs.d.ts" + "*.js", + "lib" ], "publishConfig": { - "registry": "https://registry.npmjs.org", - "license": { - "exclude": [ - "." - ] - } + "registry": "https://registry.npmjs.org" } }