mirror of
https://github.com/primer/css.git
synced 2024-12-24 14:42:26 +03:00
chore: rename addPackageMeta -> addBundleMeta
This commit is contained in:
parent
e8dd915ea6
commit
e0f7dc6dac
11
lib/sync.js
11
lib/sync.js
@ -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) => {
|
||||
|
Loading…
Reference in New Issue
Block a user