Skip to content

Conversation

omniomi
Copy link
Contributor

@omniomi omniomi commented May 4, 2018

  1. Added a build script that generates the json grammar file used by VS Code. I adapted the script used by Microsoft/vscode to work with a local file but it otherwise generates the output in much the same way.

    C:\git\github\EditorSyntax\tools [tools-and-docs+0 ~1 -0 !]> npm install
    editorsyntax@1.0.0 C:\git\github\EditorSyntax\tools
    `-- fast-plist@0.1.2
    
    C:\git\github\EditorSyntax\tools [tools-and-docs1 +0 ~1 -0 !]> npm run build-grammar
    
    > editorsyntax@1.0.0 build-grammar C:\git\github\EditorSyntax\tools
    > node ./scripts/build-grammar.js ../PowerShellSyntax.tmLanguage ../syntaxes/powershell.tmLanguage.json
    
    [Starting] Converting ../PowerShellSyntax.tmLanguage to json.
    ... Reading source file.
    ... Parsing content.
    ... Building contents.
    ... Creating directory: ../syntaxes
    [Finished] File written to: ../syntaxes/powershell.tmLanguage.json
  2. Added build steps (VS Code specific for now) to the readme. These can later be moved to the Wiki or a child docs folder.

  3. Added an issue template.

There are no changes to the actual syntax definitions in this branch. These tools are designed to make it easier for others to test changes.

Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🎉 Just a small edit and I need to register the 3rd party lib - I'll take care of that tomorrow.

This should help boost contributions 😀

/*---------------------------------------------------------------------------------------------
* Licensed under the MIT License. See License.txt in the project root for license information.
*
* Modified for PowerShell\EditorSyntax from MicroSoft\vscode (update-grammar.js)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MicroSoft -> Microsoft

:)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

},
"version": "1.0.0",
"dependencies": {
"fast-plist": "0.1.2"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to register that we are using this library (internal process). I'm expecting it to be approved quickly but I wanted to let you know. It might take a day.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it helps fast-plist was written by Microsoft https://github.com/Microsoft/node-fast-plist

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well that makes things a lot easier

@TylerLeonhardt
Copy link
Member

Ok all registered :) merging this in!

@TylerLeonhardt TylerLeonhardt merged commit 197b835 into PowerShell:master May 4, 2018
@TylerLeonhardt
Copy link
Member

Honestly, I wish the script was written in PowerShell, but since vscode did it in node already, seems fine. We should open an issue to rewrite it in PowerShell (super low pri) so people don't need that Node dependency.

@omniomi
Copy link
Contributor Author

omniomi commented May 4, 2018

@tylerl0706, I was thinking the same thing and I did mock up something last night before eventually falling back to Node.js. The plist format was giving me a headache.

That said, the plan is to eventually finish what I started and bundle it as ConvertFrom-Plist. If I have time and motivation this weekend it may get done sooner than later.

@omniomi omniomi deleted the tools-and-docs branch May 4, 2018 14:30
@TylerLeonhardt
Copy link
Member

Sounds good! A ConvertFrom-Plist would be really helpful as a standalone module actually. Lots of stuff in the macOS world use plists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants