Skip to content

Commit

Permalink
Merge pull request #127 from Microsoft/octref/mdn-data-2.0
Browse files Browse the repository at this point in the history
Adopt mdn-data 2.0. Fix microsoft/vscode#43098
  • Loading branch information
octref authored Oct 22, 2018
2 parents 3aa6185 + 5de24dd commit c4e5b88
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 57 deletions.
9 changes: 8 additions & 1 deletion build/mdn/mdn-data-importer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@
const { propertyDescriptions } = require('./mdn-documentation')

const mdnExcludedProperties = [
'--*' // custom properties
'--*', // custom properties
'block-overflow', // dropped in favor of `overflow-block`
// dropped in favor of `offset`
'motion',
'motion-offset',
'motion-path',
'motion-rotation'
]

function addMDNProperties(vscProperties) {
Expand Down Expand Up @@ -92,5 +98,6 @@ function abbreviateStatus(status) {
}

module.exports = {
abbreviateStatus,
addMDNProperties
}
7 changes: 5 additions & 2 deletions build/mdn/mdn-data-selector-importer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//@ts-check

const mdnData = require('mdn-data')
const { abbreviateStatus } = require('./mdn-data-importer')
const { pseudoSelectorDescriptions, pseudoElementDescriptions } = require('./mdn-documentation')

function addMDNPseudoElements(vscPseudoElements) {
Expand All @@ -23,7 +24,8 @@ function addMDNPseudoElements(vscPseudoElements) {
) {
allPseudoElements.push({
name: selectorName,
desc: pseudoElementDescriptions[selectorName] ? pseudoElementDescriptions[selectorName] : ''
desc: pseudoElementDescriptions[selectorName] ? pseudoElementDescriptions[selectorName] : '',
status: abbreviateStatus(selector.status)
})
}
}
Expand Down Expand Up @@ -55,7 +57,8 @@ function addMDNPseudoSelectors(vscPseudoClasses) {
) {
allPseudoSelectors.push({
name: selectorName,
desc: pseudoSelectorDescriptions[selectorName] ? pseudoSelectorDescriptions[selectorName] : ''
desc: pseudoSelectorDescriptions[selectorName] ? pseudoSelectorDescriptions[selectorName] : '',
status: abbreviateStatus(selector.status)
})
}
}
Expand Down
17 changes: 15 additions & 2 deletions build/mdn/mdn-documentation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c4e5b88

Please sign in to comment.