1
1
mirror of https://github.com/primer/css.git synced 2024-12-24 06:32:00 +03:00

chore: rename addPackageMeta -> addBundleMeta

This commit is contained in:
Shawn Allen 2019-02-12 11:22:01 -08:00
parent e8dd915ea6
commit e0f7dc6dac
2 changed files with 3 additions and 8 deletions

View File

@ -4,7 +4,7 @@ const frontmatter = require('metalsmith-matters')
const watch = require('metalsmith-watch')
const {repository} = require('../package.json')
const addPackageMeta = require('./add-package-meta')
const addBundleMeta = require('./add-bundle-meta')
const addSource = require('./add-source')
const filterBy = require('./filter-by')
const parseDocComments = require('./parse-doc-comments')
@ -45,13 +45,8 @@ module.exports = function sync(options = {}) {
log
})
)
// copy a subset of fields from the nearest package.json
.use(
addPackageMeta({
fields: ['name', 'description', 'version'],
namespace: ns
})
)
// add the "bundle" metadata so that we can redirect to those pages
.use(addBundleMeta({namespace: ns}))
// rename files with their "path" frontmatter key
.use(rename(file => (file[ns] ? `${file[ns].path}.md` : true)), {log})
.use((_files, metal, done) => {