From 2555da5216862346b6fbe11bf707a2a12c8c6614 Mon Sep 17 00:00:00 2001 From: Kevin Van Lierde Date: Mon, 12 Jun 2023 00:47:48 +0200 Subject: [PATCH] Includes source maps in dist for better debugging --- package.json | 6 ++---- test/index.js | 14 +++++--------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 8730f8b..9b7493d 100644 --- a/package.json +++ b/package.json @@ -30,9 +30,7 @@ "test": "test" }, "files": [ - "lib/index.js", - "lib/index.cjs", - "lib/index.d.ts" + "lib" ], "types": "lib/index.d.ts", "scripts": { @@ -43,7 +41,7 @@ "lint": "eslint --cache --fix \"{src,test}/**/*.js\"", "lint:check": "eslint --cache --fix-dry-run \"{src,test}/**/*.js\"", "release": "release-it .", - "build": "microbundle --target node --no-sourcemap -f cjs,esm --strict --generateTypes=false", + "build": "microbundle --target node -f cjs,esm --strict --generateTypes=false", "test": "c8 mocha -t 5000" }, "dependencies": { diff --git a/test/index.js b/test/index.js index ae78af8..e4a0bf6 100644 --- a/test/index.js +++ b/test/index.js @@ -96,8 +96,8 @@ describe('@metalsmith/metadata', function () { m.build(function (err) { if (err) return done(err) try { - assert.deepStrictEqual(m.metadata().file, { string: 'string' }) - done() + assert.deepStrictEqual(m.metadata().file, { string: 'string' }) + done() } catch (err) { done(err) } @@ -178,9 +178,7 @@ describe('@metalsmith/metadata', function () { m.metadata({ config: { - navitems: [ - { uri: '/products', label: 'products' } - ] + navitems: [{ uri: '/products', label: 'products' }] } }) m.use(plugin) @@ -201,16 +199,14 @@ describe('@metalsmith/metadata', function () { .catch(done) }) - it('should handle single runs on different Metalsmith instances\' metadata', function (done) { + it("should handle single runs on different Metalsmith instances' metadata", function (done) { const plugin = metadata({ config: 'src/metadata' }) function singleRun() { const m = Metalsmith('test/fixtures/object-merge') m.metadata({ config: { - navitems: [ - { uri: '/products', label: 'products' } - ] + navitems: [{ uri: '/products', label: 'products' }] } }) m.use(plugin)