Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New command: Add PowerApps Component Framework project reference to solution project #954

Closed
YannickRe opened this issue Apr 28, 2019 · 10 comments

Comments

@YannickRe
Copy link
Contributor

YannickRe commented Apr 28, 2019

Adds a reference from the project in the current directory to the project at 'path'

pa solution reference add -p|--path <path>

  • path: The path to the referenced project

Equivalent to the PowerApps CLI command.

@waldekmastykarz
Copy link
Member

Updated the description slightly. Other than that, ready to go! 👍

@YannickRe
Copy link
Contributor Author

I'll start working on this one, it's addictive 😎

@YannickRe
Copy link
Contributor Author

YannickRe commented Sep 13, 2019

I need to read in an XML file, find if a node exists and eventually maybe add a new node to the file.
Is there already functionality that does something similar or can I import an npm package to do this? I started implementing using jsdom

Any guidance you can share?

@waldekmastykarz
Copy link
Member

I don't think we have anything in that regard already. jsdom is pulling in quite a few dependencies. Isn't there a simpler package that does just XML processing without taking into account all the quirks of HTML?

@YannickRe
Copy link
Contributor Author

I have no idea, suggestions are welcome. Otherwise I’ll try and find an alternative.

@waldekmastykarz
Copy link
Member

@VelinGeorgiev, haven't you looked into it in the past?

@YannickRe
Copy link
Contributor Author

I'll try to achieve the same result using xmldom instead of jsdom, it has no dependencies. If you had good or (and more important) bad experiences with this package, please let me know :)

@waldekmastykarz
Copy link
Member

I don't. Let's give it a try 👍

@VelinGeorgiev
Copy link
Contributor

I haven't used any XML lib with JavaScript so far. I was thinking about xpath api in JavaScript if available. Looking at that article seems might be possible https://developer.mozilla.org/en-US/docs/Web/JavaScript/Introduction_to_using_XPath_in_JavaScript.

@YannickRe
Copy link
Contributor Author

The problem isn't much with traversing through the Document object, it's with getting such an object from a file/string representation. In the browser we would use new DOMParser().parseFromString(content, 'txt/xml'), the problem is that this doesn't exist in node.js. Also, all methods on Document (like getElementById, getElementByTagName, evaluate, etc) aren't implemented...

Btw, xmldom implements a subset of those elements and that allowed me to implement it. Still need to build test cases.

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

No branches or pull requests

3 participants