with Composer for PHP. It is the only package manager outside of apt-get that I like. I do not like bolting bunches of different package manager and build systems together, either, which means bower and npm are out of the question here. The problem is obviously Composer wasn’t designed to handle this, it deals with things like PHP autoloaders to keep the private package files private in the vendor directory. But, everything about Composer is good enough to handle this just fine. Lets go ahead and install the only truely managable Javascript package existing in Packagist (at the time of this writing) with Composer and deploy it with OneScript.
in the NUI toolkit as well as Nether OneScript. Lets pretend our project is /opt/website with the public root of /opt/website/www, and we want to deploy NUI into /opt/website/www/share/nui $ php vendor/bin/nether-onescript build vendor/netherjs/nui --deploy=www/share/nui Any time NUI updates you can just re-deploy it with that OneScript command. This provides the accessible /share/nui/nui.js for your frontend.
actually nothing special about this particular onescript.json, it is almost all default. { "Directories": [ "plugins“ ], "DistDir": "dist", "Extensions": [ "js“ ], "Files": [ "nui-main.js", "nui-traits.js", "nui-util.js“ ], "OutputFile": "nui.js", } It builds, then brings the dist directory of the build into the public space. The package already had the CSS and any image resources in the dist directory prior to building, so everything it needs is found in /share/nui afterwards. (With the exception of jQuery: https://t.co/LILo01MgVF)