EARLY STALLED EXPLORATION
NOTE: This projects initially targets a UNIX toolchain. Windows support is planned.
- GPSEE - General Purpose Spidermonkey Embedding Ecosystem
- Modern Browser
Platform install instructions:
- See individual platform projects
npm install -g pinf-loader-js cd ~/ wget -O pinf-loader-js.tar.gz https://github.com/pinf/loader-js/tarball/master tar -zxf pinf-loader-js.tar.gz mv pinf-loader-js-* pinf-loader-js alias commonjs='~/pinf-loader-js/pinf-loader.sh' cd ~/ git clone git://github.com/pinf/loader-js.git pinf-loader-js alias commonjs='~/pinf-loader-js/pinf-loader.sh'
Make sure it works:
NOTE: When running the programs below a
.pinf_packages folder is created in your current
working directory which holds the downloaded dependencies. To keep dependencies centrally
create a folder at
CONTRIBUTE: If any of the programs below do not work on the indicated platforms on your system please let us know! You can also help complete the API adapters to bring full support to all platforms (where possible).
Programs that run on all platforms (command-line and in-browser):
HelloWorld- A bare-bones Hello World with a dependency. See ./HelloWorld
AdditionalLoad- Additional code loading with a dependency. See ./AdditionalLoad
JSLintBenchmark- JSLint Benchmark. See ./JSLintBenchmark
ModuleSourceFormats- Module Source Formats. See ./ModuleSourceFormats
CommonJSAPI- CommonJS API for packages. See ./CommonJSAPI
Run the programs via the Demo Program Runner included in this project (currently requires
API adapters are complete):
commonjs -v --platform node https://github.com/pinf/test-programs-js/zipball/master --port 8081 HelloWorld
This will run the program once on the command line, export it for static serving and start a development server that will dynamically load the program into a browser with every refresh.
To run the programs (in command-line mode) on various platforms (without the browser stuff) use:
commonjs -v --platform <PlatformAlias> https://github.com/pinf/test-programs-js/zipball/master HelloWorld
<PlatformAlias> is any of
-v to omit the loader progress output.
NOTE: Currently requires running with
--platform node (default) ONCE first to download dependencies due to incomplete
API adapters for the other platforms.
Programs leveraging the
commonjs --platform node https://github.com/pinf/test-programs-js/zipball/master URLFetcher
commonjs --platform node --script serve https://github.com/pinf/test-programs-js/zipball/master --reloading --port 8081 CanvasGraphics
# All tests commonjs --platform node --script test https://github.com/pinf/test-programs-js/zipball/master # Specific test commonjs --platform node --script test https://github.com/pinf/test-programs-js/zipball/master portable-HelloWorld.js
To make changes to a dependency and use your local copy when running the program, place the dependency's
/pinf/workspaces/<UID>. For example:
cd /pinf/workspaces/github.com/pinf/ git clone git://github.com/pinf/test-packages-js.git test-packages-js
The loader will automatically detect the package via its UID and use the local source.
If you have cloned this
test-programs-js project and want to run it from source:
cd /pinf/workspaces/github.com/pinf/ git clone git://github.com/pinf/test-programs-js.git test-programs-js
in the commands above.
- Mailing list: http://groups.google.com/group/pinf-dev/
- Twitter: http://twitter.com/pinf
- Blog: http://christophdorn.com/Blog/
- Canvas Graphics demo does not work when downloaded the first time. It works on the second invocation.
gpseesegfaults at times (this is being actively worked on)
nodes event loop seems to hang script termination for ~5 to 10 seconds at times.
- Get portable programs working on all platforms without downloading dependencies with
- Resolve platform level bugs.
- Complete adapters: https://github.com/pinf/loader-js/tree/master/lib/pinf-loader-js/adapter
- Remove NPM dependency from CanvasGraphics example so we can make it portable.
- Run exported programs on BravoJS or RequireJS.
nodespecific demos (with and without leveraging NPM)
- JSGI demos
- CommonJS API demos
- Get exported HelloWorld program working on all platforms.
- Example program leveraging SASS.
Collaboration Platform: https://github.com/pinf/test-programs-js/
- Discuss your change on the mailing list
- Write a patch on your own
- Send pull request on github & ping mailing list
- Discuss pull request on github to refine
You must explicitly license your patch by adding the following to the top of any file you modify in order for your patch to be accepted:
// - <GithubUsername>, First Last <Email>, Copyright YYYY, MIT License
Copyright (c) 2011+ Christoph Dorn
Copyright (c) 2011+ Christoph Dorn
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.