diff --git a/LICENSE b/LICENSE index fb85593..2fbeed4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,5 @@ +# carol-js + MIT License Copyright (c) 2023 marihachi diff --git a/docs/api.md b/doc/api.md similarity index 100% rename from docs/api.md rename to doc/api.md diff --git a/carol.d.ts b/lib/carol.d.ts similarity index 100% rename from carol.d.ts rename to lib/carol.d.ts diff --git a/carol.js b/lib/carol.js similarity index 100% rename from carol.js rename to lib/carol.js diff --git a/package-lock.json b/package-lock.json index 58db283..97f3637 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,31 +1,13 @@ { "name": "carol-js", - "version": "1.0.0", + "version": "0.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "carol-js", - "version": "1.0.0", - "license": "MIT", - "devDependencies": { - "@types/node": "^20.8.8" - } - }, - "node_modules/@types/node": { - "version": "20.9.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.2.tgz", - "integrity": "sha512-WHZXKFCEyIUJzAwh3NyyTHYSR35SevJ6mZ1nWwJafKtiQbqRTIKSRcw3Ma3acqgsent3RRDqeVwpHntMk+9irg==", - "dev": true, - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true + "version": "0.2.0", + "license": "MIT" } } } diff --git a/package.json b/package.json index 638a12c..816c7ae 100644 --- a/package.json +++ b/package.json @@ -13,13 +13,23 @@ "repository": "https://github.com/marihachi/carol-js.git", "bugs": "https://github.com/marihachi/carol-js/issues", "type": "module", - "module": "./carol.js", - "types": "./carol.d.ts", + "module": "./lib/carol.js", + "types": "./lib/carol.d.ts", + "exports": { + ".": { + "import": "./lib/carol.js", + "types": "./lib/carol.d.ts" + }, + "./*": { + "import": "./lib/*", + "types": "./lib/*" + } + }, "scripts": { - "test": "node --test ./test.js" + "test": "node --test ./test/*.js" }, "files": [ - "carol.js", - "carol.d.ts" + "./lib/carol.js", + "./lib/carol.d.ts" ] } diff --git a/test.js b/test/main.js similarity index 95% rename from test.js rename to test/main.js index 085f976..d6e73ab 100644 --- a/test.js +++ b/test/main.js @@ -1,6 +1,6 @@ -import { strict as assert } from 'node:assert'; -import test, { run } from 'node:test'; -import * as C from './carol.js'; +import assert from 'node:assert'; +import test from 'node:test'; +import * as C from 'carol-js'; test('pattern()', () => { assert.strictEqual(C.pattern(/abc/).toRegex().source, 'abc');