Download the PHP package netherphp/onescript without Composer

On this page you can find all versions of the php package netherphp/onescript. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package onescript

Nether OneScript

A silly Javascript "Compiler"

The only things I dislike more than Javascript are other people's Javascript frameworks and build systems. So like a complete tool I wrote my own that works in the way I typically build my scripts.

Use Case

Pretending our website project is setup like this.

And our JS Lib mylib is structured like this.

Quick Start

This library provides a vendor bin file. On Windows you will need to run it as vendor\bin\nether-onescript while upon anything else you will need to call it as php vendor/bin/nether-onescript - I will use the NotWindows notation since thats what any sane server is.

php vendor/bin/nether-onescript help

Creating a new OneScript project.

OneScript expects the project source files to be within the src directory. By default it wil use libs as the module directory looking for the js extension. So the command required for our example project above:

php vendor/bin/nether-onescript create www/share/mylib \
--files=mylib-main.js,mylib-whatever.js

This will create onescript.json (which can be changed by --filename) in www/share/jslib/ - in this JSON file you can see all the options available to change. You will notice that it will have added the main files you listed on the command line in the Files option, and automatically listed libs in the Directories option with js in the Extenions option. It also will have set the OutputFile to onescript.js as well.

Building the OneScript project via CLI.

php vendor/bin/nether-onescript build www/share/mylib/onescript.json

Assuming there are no errors like file permissions or missing files, this will compile your OneScript project down into onescript.js - your potentially final file for distribution.

The build system works like so:

Building the OneScript project via a live compiler.

Sometimes it is handy, like on your dev server, to have the projects built automaticaly every time you change them. For my example here I would probably create a new file called onescript.js.php in my JS project folder.

$project = Nether\OneScript\Project::FromFile(sprintf(
    '%s/onescript.json',
    dirname(__FILE__)
));

$project->Print = true;
$project->Build();

If you reference this onescript.js.php in your script tag it will be built every time the page is loaded and the files have changed. You won't realy want to commit this to your prodution space.


All versions of onescript with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
netherphp/object Version >=3.0.0
netherphp/console Version >=3.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package netherphp/onescript contains the following files

Loading the files please wait ....