-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Conversation
31106b7
to
f315f25
Compare
res.on("end", function () { | ||
console.log("Parsing properties"); | ||
propertiesResponse = JSON.parse(propertiesResponse).query.results; | ||
Object.keys(propertiesResponse).forEach(function (propertyName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you already include lodash.unescape, why not depend on lodash itself and use it's forEach method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it doesn't give us much and I included lodash.unescape only as it's pretty lightweight (81KB vs 853KB for lodash-node).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see your point. Probably doesn't matter too much in either case (this script won't be run very often, I would assume.)
Forgot to mention: This also updates all URLs from |
Not sure if this is something to do with your script, but I found that opening Quick Docs on the CSS
and is supposed to look like this, with each item being a link.
|
:D |
77bb2d9
to
c1aa04d
Compare
Oh damn. At least, I don't need |
Found another issue with the Inline Docs for the "css\/properties\/alignment-adjust": {
"SUMMARY": "",
"INITIALVALUE": "",
"ID": "css\/properties\/alignment-adjust",
"ANIMATABLE": false,
"COMPUTEDVALUE": "",
"URL": "http:\/\/docs.webplatform.org\/wiki\/css\/properties\/alignment-adjust",
"STATUS": "",
"VALUES": [
]
} The Docs display just the title and nothing else, I would expect them to not appear at all. |
@Mark-Simulacrum Your JSON snippet is part of the old file ;) But you're right, there are such cases with the updated file as well, like for PS: Thanks for taking a look! |
Is it intentional that the (new) JSON file has a space after every |
Actually, upon further inspection, every string in the file ends with a space. Is this something in |
It's something instaview (the Wikitext parser) does. But I have to admit, I actually like it as it somehow makes Brackets way faster when viewing that file, probably due to Word Wrap being less performances heavy. |
Here is a few more bugs, will update this list as I go along to prevent posting too many comments:
|
@Mark-Simulacrum A closing |
I just removed the extra step required to convert the JSON data to a usable format. |
@@ -49,19 +49,15 @@ define(function (require, exports, module) { | |||
|
|||
/** | |||
* @param {!string} cssPropName | |||
* @param {!{SUMMARY:string, URL:string, VALUES:Array.<{TITLE:string, DESCRIPTION:string}>}} cssPropDetails | |||
* @param {!{SUMMARY:string, URL:string, VALUES:?Array.<{value:string, description:string}>}} cssPropDetails |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the JSDoc gurus: Is this (to be exact, the VALUES:?Array
) valid?
@marcelgerber Thanks for taking a look at this. Those docs are way out-of-date. It looks like At the very least, the |
Yep, the ‘update-docs.js‘ is a node script to update the css.json file using the WebPlatformDocs/MediaWiki API. |
@marcelgerber I didn't think about the Tools folder -- I was thinking about the Apify nodejs app for creating Brackets API docs which is at: https://github.com/jbalsas/apify |
89e0ebd
to
d0bb9fa
Compare
@redmunds I've completely removed the Node script and took it over to https://github.com/MarcelGerber/update-wpd-docs. |
I am seeing a WebPlatformDocs unit test fail: should process all anchor tags Error: Expected 1 to be 9.
at new jasmine.ExpectationResult (file:///C:/Users/redmunds/dev/github/brackets-shell/Release/dev/test/thirdparty/jasmine-core/jasmine.js:114:32)
at null.toBe (file:///C:/Users/redmunds/dev/github/brackets-shell/Release/dev/test/thirdparty/jasmine-core/jasmine.js:1235:29)
at null.<anonymous> (file:///C:/Users/redmunds/dev/github/brackets-shell/Release/dev/src/extensions/default/WebPlatformDocs/unittests.js:210:39)
at jasmine.Block.execute (file:///C:/Users/redmunds/dev/github/brackets-shell/Release/dev/test/thirdparty/jasmine-core/jasmine.js:1064:17)
at jasmine.Queue.next_ (file:///C:/Users/redmunds/dev/github/brackets-shell/Release/dev/test/thirdparty/jasmine-core/jasmine.js:2096:31)
at jasmine.Queue.start (file:///C:/Users/redmunds/dev/github/brackets-shell/Release/dev/test/thirdparty/jasmine-core/jasmine.js:2049:8)
at jasmine.Spec.execute (file:///C:/Users/redmunds/dev/github/brackets-shell/Release/dev/test/thirdparty/jasmine-core/jasmine.js:2376:14)
at jasmine.Queue.next_ (file:///C:/Users/redmunds/dev/github/brackets-shell/Release/dev/test/thirdparty/jasmine-core/jasmine.js:2096:31)
at jasmine.Queue.start (file:///C:/Users/redmunds/dev/github/brackets-shell/Release/dev/test/thirdparty/jasmine-core/jasmine.js:2049:8)
at jasmine.Suite.execute (file:///C:/Users/redmunds/dev/github/brackets-shell/Release/dev/test/thirdparty/jasmine-core/jasmine.js:2521:14)
at jasmine.Queue.next_ (file:///C:/Users/redmunds/dev/github/brackets-shell/Release/dev/test/thirdparty/jasmine-core/jasmine.js:2096:31) |
|
@redmunds Fixed the unit tests and removed the vendor-prefixed property. |
Thanks. Merging. |
Finally got a fix for #6027.
Updated
css.json
to include the latest data using this Node script.The only remaining issue (which has existed before): The values are not in any useful order.
Changes (properties added/removed): https://gist.github.com/MarcelGerber/bfdd47849cf58c90a5cd