codegs-core
v0.0.2
Published
Code.gs core modules package.
Readme
Codegs-core
Core modules for Code.gs includes both Code-core modules and Node.js core modules.
v0.0.2
- add README.md
Usage
install into your project.
$ npm install codegs-coreImport
globalmodule in your main file.if (typeof global === 'undefined') { require('global'); }- I'll add sample project later.
Execute Code.gs command with option pointing to this package.
$ code <MAINFILE> -c node_modules/codegs-core/code/gas -n node_modueles/codegs-core/node/v0.10.26 [...]-coption specify where Code-core modules exists in.-noption specify where Node-core modules exists in.
Contents
Code-core modules
folder: codegs-core/code/gas
Only one package gas exists currently.
That includes modules: global, process, buffer, fs.
How it works
You should import global module at top of your main file.
'global' module set up
globalvariable in global scope.import
processmodule.processset up not full compatible with Node.js. and set Logger.log asstdout.If not exists, import
consolenode-core module.consolesetup console object using process.stdout(Logger.log).import
bufferinto global scope. It's just dummy forutil.js.
Now you can use other code-core modules or node-core modules(depending on those modules).
Node.js core modules
folder: codegs-core/node/v0.10.26
Four basic modules assert, util, console, path are there.
After import global code-core module, Those are available to use.
Those are imported from original Node.js project. see README.md in that folder.
