Aurelia CLI and braintree-web - braintree

I am trying to use https://www.npmjs.com/package/braintree-web with Aurelia (using the aurelia-cli and RequireJS). I am stuck trying to get all the many dependencies to resolve.
To use 3rd party library in Aurelia the library must be defined in the aurelia.json file.
If I add "braintree-web" in that file then aurelia complains that "braintree-web" it requires the modules "american-express", "apple-pay" etc etc.
If I manually create the "american-express", "apple-pay" dependencies then each one also refers to "braintree-web/lib", and a bunch of other sub-directory dependencies.
In short I can't get the "braintree-web" module to load because I have to manually build all sub-dependencies and its too complex to get working.
As I state above, I am using requireJS, should these dependencies all resolve correctly?
Any ideas as to how I can get this working?
Thanks

If all dependencies is what you need, then with requirejs + aurelia-cli you'll have to declare all dependencies. There is an experimental version of the cli being developed which you can find here, where you won't have to declare any dependencies in aurelia.json anymore.
With webpack you also don't need to declare any dependencies by the way.
Do you really need everything though? The docs mention for example you could import just the client. Still looks like a whole heap of dependencies, but at least a lot less than importing the main index.js.
You could also just include their pre-bundled client which I believe is https://js.braintreegateway.com/web/3.32.1/js/client.min.js
On a side note, the person developing aforementioned experimental CLI is actually looking for people to test it with non-trivial apps. Me and several others have tried it with great results, so I can recommend you try it. If you could report back in the PR that would be really awesome.

Related

Are Go modules really usable today given third party "incompatible" modules?

I am new to Go and trying to create my first program. Following the various getting started & tutorials I create a new module, which for my purpose needs to have a dependency on this module:
github.com/timescale/promscale#0.6.2
My problem is that the module has dependencies that have not "properly adopted" the semantic versioning approach.
go list -e -m all
...
k8s.io/client-go v12.0.0+incompatible
...
reports 37 such modules... so contacting the module author to have them adopt SIV, as I have seen suggested, will not be an option.
Am I missing something, or should I simply completely give up on using modules for this new project?
Are Go modules really usable today given third party "incompatible" modules?
Yes.
Am I missing something
Maybe: This "+incompabtible" is not a sign of failure.
or should I simply completely give up on using modules for this new project?
No, of course not.
Thanks for the answers and comments, it seems that:
New project should use modules, +incompatible dependencies will come up but that is fine
This FAQ entry has it right, just read the first 2 lines and keep "Additional Details" for a rainy day
go list -m all won't behave as described in all the tutorials if +incompatible dependencies exist, it will choke on the first incompatible module instead.
go list -m -e all seems to work as expected.
If you are using Goland, using GOFLAGS=-e seems to make dependency resolution work despite +incompatible modules. This may well have side effects that I am not aware of.

How to create distribution of Python GTK3 app?

I made an application using GTK3 on Windows (Mingw_x64 installation of GTK) and I cannot really figure out how to make a distribution out of this. According to official documentation of PyGObject, it is possible in some way.
I already tried to make a package using setuptools, but PyGObject documentation is not saying much about this process and I was not able to configure setup correctly to make it work. PyGObject has a lot of dependecies and weird imports, that I do not know how to include.
I also tried Pyinstaller, which claims it has GTK support, and it really can pack it into executable, however it is not working. I tried these two options:
make only one file (.exe), but in this situations, it throws an error, that some file is not found (libpixbufloader-ani.dll)
create a directory with all needed files (libpixbufloader-ani.dll and other libs are included this time), but when running exe, another exeption occurs, this time Struct and 2 other libraries are missing (strangely, there is a folder that contains Struct)
Becouse of the missing files, I tried adding as many paths containing needed libraries as possible to Pyinstaller, but without success.
Does anyone have any experience with packaging GTK appliciations in Python? There is definitely a way to do this, but I am not very experienced with packaging. If needed, I can provide more information.
This is an issue that has been brought up on PyInstaller's GitHub page, as others (including myself) have experienced the same issue that you've mentioned.
The last time I tried the dev version of PyInstaller, the issue still wasn't fixed, but I managed to get a working executable by using PyInstaller to find the dependencies that my Python3/GTK3 app needed, and then I used cx_Freeze to generate the final executable.

Ember-Validations: Installation

I have an Ember-CLI application that is very form heavy.
I started using Ember Forms to help with layout and templating, which is nice and seems to be working fine.
Apparently for validation, it requires Dockyard's Ember-Validation as well... This particular dependency seems to be installed differently and I am lost as how to do this.
I am used to using something simple like bower install ... and then just adding the dependency in brocfile, but in this case, Dockyard provides a huge list of builds to choose from and I have no idea which one to use?
Does anyone have experience installing ember-validation in an ember-cli project and getting to play nicely with ember-forms? Or perhaps it is actually more simple than I think, and I am just getting thrown off by all the builds to choose from?
To install it you can add manually the url to the build in bower.json
"ember-validations": "http://builds.dockyard.com.s3.amazonaws.com/ember-validations/ember-validations-latest.js",
And after that run bower install it should work fine.
Hope it helps.

Joomla one install file that installs component, modules and plugins

I'm looking for a way to setup the XML install file for my component and for it to also install the plugins and modules that go along with it all in a single installation. Has anyone done this before, how can this be achieved?
Many thanks
Try checking out http://www.joomlacontenteditor.net/ the basic editor installs the component and the affiliated plugin. Simply, it used the xml put the files in the correct places and uses an install.php script to finish. It does a lot of detailed things in some of the steps that you can ignore like all the component plugins etc.

Any existing pure PHP "make" tools?

Let me elaborate on the question...
I have a custom CMS (built on codeigniter FTW) that includes many different types of modules.
Every time we have a new project come through the door, it is a variation and amalgamation of a few of the existing modules.
Sometimes a project comes through with requirements that are not satisfied by the existing modules, in that case I will write a new module...
All the modules are separated out in folders and the code is VC-ed using GIT. Every module has it's own Model, View, Controller, SQL and Javascript files. All the dependencies are also separated and folder-ed nicely...
The next step for me is to create some sort of installer script that will take me through the "scaffolding" process step by step, allowing me to choose from the existing modules. A glorified "makefile" if you may...
Rather than rolling my own, does anyone know of any such thing out in the wild.
I know of Apache ANT (java), what I need is something in pure PHP with very low or no dependencies...
I would like something as simple as running a git pull and then php make.php
Thanks.
The "Ant-like" alternative I am aware of in PHP land is phing it is written in PHP and it will allow you to perform several tasks for packaging, deploying and testing your web applications. The documentation is a great starting point if you want to hit the ground running.
It is can also be extended to define new tasks if needed (examples and explanations are provided in the documentation)
Reading through the doco it appears to be possible to install Phing without PEAR as documented here you would have to correctly setup the environment on each machine you wish to use Phing on. I can not confirm this method though as I use PEAR for all my installs.

Resources