A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/unc0/gorillaify below:

unc0/gorillaify: browserify v2 plugin for gorillascript

browserify v2 plugin for gorillascript

mix and match .gsgorillascript and .js files in the same project

This is a mod from coffeeify

given some files written in a mix of js and gorilla:

foo.gs

console.log require './bar.js'

bar.js:

module.exports = require('./baz.gs')(5)

baz.gs:

module.exports := #(n)-> n * 111

install gorillaify into your app:

$ npm install gorillaify --save-dev

when you compile your app, just pass -t gorillaify to browserify:

$ browserify -t gorillaify foo.gs > bundle.js
$ node bundle.js
555

you can omit the .gs extension from your requires if you add the extension to browserify's module extensions:

module.exports = require('./baz')(5)
$ browserify -t gorillaify --extension=".gs" foo.gs > bundle.js
$ node bundle.js
555

if you are ready to bundle codes for production:

$ browserify -t gorillaify/no-debug foo.gs > bundle.js

this will disable generating source map, and using gorillascript's bare mode.

With npm do:

MIT


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4