Re: Bringing CommonJS and npm to GJS



FYI the whole project has been moved under a CGJS organization:
https://github.com/cgjs/cgjs

If you'd like to contribute please rise your hand and I'll add you.

So far working:
  • require, console, __filename, __dirname, and all timers in place
  • next up: process module
Each core module can be developed a part, using the old jsgtk source code to take some example makes it relatively straight forward to implement what was there already (hopefully cleaned thanks to modern JS syntax).

Modules are many but not all of them would be essential to make GJS a NodeJS developer friendly environment or to share npm modules.

Here the modules TODO list that is worth prioritizing somehow.
https://github.com/cgjs/cgjs#commonjs-modules

I still would like to hear some feedback, thank you!

On Thu, Nov 2, 2017 at 1:17 PM, Andrea Giammarchi <andrea giammarchi gmail com> wrote:
I've been thinking about for a while and finally made up my mind: JSGtk+ was solving the wrong issue and in a wrong way. The project is officially death/deprecated now, but not without an alternative ... bear with me ...

npm is the biggest Open Source repository of them all. It's not about NodeJS code, it actually has more Browser modules than Node, but it also has Espruino, Nashorn, MS ChackraCore ... you name it.

Having GJS out of npm is the number one issue I have, while having also a 100% NodeJS compatible API is less relevant.

This is why I've created an alternative to JSGtk+ called CGJS (CommonJS based GJS), which can be installed via npm install -g cgjs and can be used already to require, in a CommonJS fashio, scripts and modules from your project folder.

More details here, and I'd love your contribution / feedback.

Thank You!





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]