Skip to content

Commit

Permalink
Includes source maps in dist for better debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
webketje committed Jun 11, 2023
1 parent 379fc4d commit 2555da5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
"test": "test"
},
"files": [
"lib/index.js",
"lib/index.cjs",
"lib/index.d.ts"
"lib"
],
"types": "lib/index.d.ts",
"scripts": {
Expand All @@ -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": {
Expand Down
14 changes: 5 additions & 9 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -178,9 +178,7 @@ describe('@metalsmith/metadata', function () {

m.metadata({
config: {
navitems: [
{ uri: '/products', label: 'products' }
]
navitems: [{ uri: '/products', label: 'products' }]
}
})
m.use(plugin)
Expand All @@ -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)
Expand Down

0 comments on commit 2555da5

Please sign in to comment.