bevry / cson

CoffeeScript-Object-Notation. Same as JSON but for CoffeeScript objects.
Other
1.34k stars 55 forks source link

Browserify CSON #86

Closed templarundead closed 6 years ago

templarundead commented 6 years ago

I've made browserify version of cson with simple code

"use strict"; var CSON = require('cson') var result = CSON.createCSONString({a:{b:'c'}}, {}) if ( result instanceof Error ) { console.log(result.stack) } else { console.log(result) };

But console throw: Error: Cannot find module '/..\node_modules\cson/package.json'

Any help?

balupton commented 6 years ago

The cson package will not work on the web browser as it depends on a file system, you should use cson-parser instead.

templarundead commented 6 years ago

Thank you!