{"id":21916371,"url":"https://github.com/dsheiko/cjsc","last_synced_at":"2025-10-29T21:14:12.609Z","repository":{"id":13362581,"uuid":"16050159","full_name":"dsheiko/cjsc","owner":"dsheiko","description":"⛔️ [DEPRECATED] faster and leaner CommonJS module transpiler","archived":false,"fork":false,"pushed_at":"2021-05-07T10:09:10.000Z","size":854,"stargazers_count":29,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-10T11:22:26.524Z","etag":null,"topics":["browserify","commonjs-modules","depricated","javascript","obsolete","transpiler"],"latest_commit_sha":null,"homepage":"http://dsheiko.github.io/cjsc/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dsheiko.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-19T17:06:39.000Z","updated_at":"2024-06-01T05:51:29.000Z","dependencies_parsed_at":"2022-09-02T13:00:53.477Z","dependency_job_id":null,"html_url":"https://github.com/dsheiko/cjsc","commit_stats":null,"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsheiko%2Fcjsc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsheiko%2Fcjsc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsheiko%2Fcjsc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsheiko%2Fcjsc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsheiko","download_url":"https://codeload.github.com/dsheiko/cjsc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249553489,"owners_count":21290239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browserify","commonjs-modules","depricated","javascript","obsolete","transpiler"],"created_at":"2024-11-28T19:17:41.820Z","updated_at":"2025-10-29T21:14:12.519Z","avatar_url":"https://github.com/dsheiko.png","language":"JavaScript","readme":"CommonJS Compiler\n==============\n\n[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)\n\n\u003e WARNING - THIS PROJECT IS NO LONGER MAINTAINED!!!\n\n[![NPM](https://nodei.co/npm/cjsc.png)](https://nodei.co/npm/cjsc/)\n\n[![Build Status](https://travis-ci.org/dsheiko/cjsc.png)](https://travis-ci.org/dsheiko/cjsc)\n[![Join the chat at https://gitter.im/dsheiko/cjsc](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dsheiko/cjsc?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n`cjsc` is a JavaScript transpiler that makes your CommonJS modules suitable for in-browser use.\nWhile every AMD-module results in a separate HTTP request and therefore [badly affects page\nresponse time](https://developer.yahoo.com/performance/rules.html),\n`cjsc`, instead, combines all the acting modules in a single file (optionally compressed).\n\nComparing to the alternatives [Browserify](http://browserify.org/) and [Webpack](https://github.com/webpack/webpack),\n`cjsc` is much lighter and easier to configure. It's not a multipurpose tool. While\nBrowserify attempts to bring node.js to the browser and Webpack to bundle as many formats as possible, `cjsc` is\nfully designated for a single task - to make CommonJS modules available in-browser. And it does the task pretty well.\n\n\n## Features\n\n* Does not bring into your production code any additional library\n* Works fine with UMD modules (including jQuery, Backbone, Underscore and others)\n* Allows exporting globals of 3rd party libraries without intervention in their code\n* Supports source maps http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/\n* Supports JavaScript templates ( Mustache, Handlebars, Underscore and others )\n* Produces a string out of (multiline) non-JS external text file\n* Provides transformation plugin API\n* Supports [Browserify transformers](https://www.npmjs.com/browse/keyword/browserify-plugin)\n* Supports [Babel.js](https://babeljs.io/) transformation\n\n\n![How cjsc works](https://github.com/dsheiko/cjsc/raw/master/doc/cjsc-process.jpg)\n\n# Contents\n* [How to install](#a-install)\n* [Getting Started](#a-work)\n* [How to use in the command line](#a-use)\n* [File modules](#a-file-modules)\n* [Caching](#a-caching)\n* [Setting up Grunt task](#a-grunt)\n* [How to configure dependency](#a-config)\n* [How to make module of a globally exposed variable](#a-config-a)\n* [How to make modules of jQuery and its plugins](#a-config-b)\n* [How to make modules of 3rd party libraries](#a-vendors)\n* [How to use Mustache templates](#a-mustache)\n* [How to use Handlebars templates](#a-handlebars)\n* [How to load the compiled files asynchronously](#a-async)\n* [Bonus tricks](#a-bonus)\n* [API](#a-api)\n* [Plugin example](#a-pluginexample)\n* [How to compile ES6/2015 into ES5](#a-es6)\n\n\n\n## \u003ca name=\"a-install\"\u003e\u003c/a\u003eHow to install\n\n### Install nodejs/npm\n`cjsc` utilizes nodejs and its package manager (NPM). If don't have these tools yet installed, you can find details on\nhttps://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager\n\n### Install `cjsc`\n\nLocally:\n```bash\nnpm i cjsc --save-dev\n```\n\nor globally:\n```bash\nsudo npm i cjsc -g\n```\nNote: in this case npm creates a symlink `/usr/bin/cjsc`\n\n## \u003ca name=\"a-work\"\u003e\u003c/a\u003eGetting Started\n\nLet's define a few CommonJS modules (http://wiki.commonjs.org/wiki/Modules/1.1.1):\n\n`./main.js`\n```javascript\nconsole.log( \"main.js running...\" );\nconsole.log( \"Imported name in main.js is `%s`\", require( \"./lib/dep1\" ).name );\nconsole.log( \"Getting imported object from the cache:\" );\nconsole.log( \" imported name in main.js is still `%s`\", require( \"./lib/dep1\" ).name );\n```\n\n`./lib/dep1.js`\n```javascript\nconsole.log( \"dep1.js running...\" );\nconsole.log( \" it has __diname = `%s`\", __dirname );\nconsole.log( \" it has __filename = `%s`\", __filename );\nconsole.log( \"Imported name in dep1.js is `%s`\", require( \"./dep2\" ).name );\nexports.name = \"dep1\";\n```\n\n`./lib/dep2.js`\n```javascript\nconsole.log( \"dep2.js running...\" );\nmodule.exports.name = \"dep2\";\n```\n\nNow we can compile the modules:\n```bash\ncjsc main.js -o script.js\n```\n\nAs we execute script.js we get the following output:\n```\nmain.js running...\ndep1.js running...\n it has __diname = `.../demo/lib`\n it has __filename = `.../demo/lib/dep1.js`\ndep2.js running...\nImported name in dep1.js is `dep2`\nImported name in main.js is `dep1`\nGetting imported object from the cache:\n imported name in main.js is still `dep1`\n```\n\n\n\n\n\n\n\n## \u003ca name=\"a-use\"\u003e\u003c/a\u003eUsing CommonJS Compiler in the command line\n\n```\n Usage: cjsc \u003csrc-path\u003e \u003cdest-path\u003e\n\n    \u003csrc-path\u003e - source filename (e.g. main.js)\n\n    --output, -o\n        destination filename for compiled code\n        example: \u003cdest-path\u003e, -o=\u003cdest-path\u003e\n\n    --minify, -M\n        minify the output file\n\n    --config, -C\n        specify a configuration JSON file\n        example: --config=\u003cfile\u003e\n\n    --transform, -t\n        use a transform module on top-level files.\n        example: --transform=[MODULE --opt]\n\n    --plugin, -p\n        register MODULE as a plugin\n        example: --plugin=MODULE\n\n    --source-map\n        specify an output file where to generate source map. Use \"*\" automatic naming\n        example: --source-map=\u003cfile/pattern\u003e\n\n    --source-map-url\n        the path to the source map to be added in.\n        example: --source-map-url=\u003curl\u003e\n\n    --source-map-root\n        the path to the original source to be included in the source map.\n        example: --source-map-root=\u003cpath\u003e\n\n    --banner\n        preserve copyright comments in the output.\n\n    --debug\n        debug mode.\n\n    --help, -h\n        displays this help screen\n\n\nPassing arguments to transforms:\n\n  For -t you may use subarg syntax to pass options to the\n  transforms or plugin function as the second parameter. For example:\n\n    -t [ foo --x 3 --beep '{ a: 1 }' ]\n\n  will call the `foo` transform for each applicable file by calling:\n\n    foo( file, { x: 3, beep: '{ a: 1 }' } )\n```\n\nCompile `main-module.js` into `build.js`:\n```bash\n./cjsc main-module.js -o build.js\n```\nor\n```bash\nnode cjsc.js main-module.js -o build.js\n```\n\nCompile `main-module.js` into `build.js` and generate source map\n```bash\n./cjsc main-module.js -o build.js  --source-map=build/build.js.map --source-map-url=http://localhost/\n```\nor the following options for automatic naming\n```bash\n./cjsc main-module.js -o build.js  --source-map=*.map\n```\nor this way to explicitly specify the path to sources relative to the source map\n```bash\n./cjsc main-module.js -o build.js  --source-map=build/*.map --source-map-root=../src\n```\n\nWhereas:\n* `--source-map` is a source map file path relative to the project directory (the directory where cjsc is running)\n* `--source-map-url` by default is \".\" and means the same path as source map file\n* `--source-map-root` is sources path relative to the source map file. For instance: sources are in `\u003cproject\u003e/src`, build is in `\u003cproject\u003e/build`. So specify `--source-map-root=../src` to let the browser know that it must look for mapped source file in `../src/**/file.js` relative to the source map path.\n\nNow breakpoints and console messages mapped to the original sources\n![Source mapping example](https://raw.github.com//dsheiko/cjsc/master/demo/img/console-ex.jpg \"Source mapping example\")\n\n\nCompile `main-module.js` into `build.js` and minify `build.js`\n```bash\n./cjsc main-module.js -o build.js -M\n```\n\nWith a banner\n```bash\n./cjsc main-module.js -o build.js -M --banner=\"/*! pkg v.0.0.1 */\"\n```\n\n\n\n## \u003ca name=\"a-file-modules\"\u003e\u003c/a\u003eFile Modules\n\n\n## The `module` object\nEvery module has exposed `module` variable that references to an object representing the module.\nLike in [NodeJS](http://nodejs.org/api/modules.html) the object has following structure:\n\n* module.id {string} - The identifier for the module.\n* module.filename {string} - The fully resolved filename to the module.\n* module.loaded {boolean} - Whether or not the module is done loading.\n* module.parent {Object} - The module that required this one.\n* module.children {Object[]} - The module objects required by this one\n\n## \u003ca name=\"a-caching\"\u003e\u003c/a\u003eCaching\n\nCaching goes the same as in nodejs. Modules are cached after the first time they are loaded.\nSo every call to `require('foo')` returns exactly the same object, if it refers to the same file.\n\nMultiple calls to `require('foo')` don't execute the module code multiple times.\n\n\n## \u003ca name=\"a-grunt\"\u003e\u003c/a\u003eSetting up [Grunt](http://gruntjs.com/) task\n\n*Gruntfile.js*\n```javascript\ngrunt.loadNpmTasks('grunt-cjsc');\ngrunt.initConfig({\n     cjsc: {\n      development: {\n\t\t\t\toptions: {\n\t\t\t\t\tminify: true\n\t\t\t\t},\n        files: {\n          \"\u003cpath\u003e/compiled.js\" : \"\u003cpath\u003e/source.js\"\n        }\n      }\n    }\n  });\n```\n*package.json*\n```javascript\n\"devDependencies\": {\n    //..\n    \"grunt-cjsc\": \"\u003e=1.0.0\"\n  }\n```\n\nPlease find details at https://github.com/dsheiko/grunt-cjsc\n\n\n\n## \u003ca name=\"a-config\"\u003e\u003c/a\u003eHow to configure dependency\n\nYou can configure your dependencies in a JSON file. E.g. `config.json`:\n```javascript\n{\n\t\"\u003cdependency-name\u003e\": {\n\t\t\"path\": \"\u003cdependency-path\u003e\",\n\t\t\"globalProperty\": \"\u003cglobal-property\u003e\",\n\t\texports: [ \"\u003cvariable\u003e\", \"\u003cvariable\u003e\" ],\n\t\trequire: [ \"\u003cdependency-name\u003e\", \"\u003cdependency-name\u003e\" ]\n\t}\n}\n```\nor\n```javascript\n{\n\t\"\u003cdependency-name\u003e\": {\n\t\t\"path\": \"\u003cdependency-path\u003e\",\n\t\t\"globalProperty\": \"\u003cglobal-property\u003e\",\n\t\texports: \"\u003cvariable\u003e\",\n\t\trequire: \"\u003cdependency-name\u003e\"\n\t}\n}\n```\nTo enable the configuration use `--config` option:\n```\nnode cjsc main.js build.js --config=config.json\n```\n\n Passing plugin configurations:\n\n```javascript\n{\n  \"ver\": 1,\n  \"modules\": {\n    \"\u003cdependency-name\u003e\": {},\n    \"\u003cdependency-name\u003e\": {}\n  },\n  \"plugins\": [\n    {\n      \"plugin\": \"\u003cpkg-name\u003e\",\n      \"targets\":  {\n        \"\u003ctarget\u003e\": [{\n          /* options object */\n        }]\n      }\n    }\n  ]\n}\n```\n\n## \u003ca name=\"a-config-a\"\u003e\u003c/a\u003eHow to make module of a globally exposed variable\n`config.json`:\n```javascript\n{\n\t\"jQuery\": {\n\t\t\"globalProperty\": \"jQuery\"\n\t}\n}\n```\n`main.json`:\n```javascript\nvar $ = require( \"jQuery\" );\n// $ - is a reference to globally exposed jQuery instance (assuming window.jQuery si defined outside this module)\nconsole.log( $( window ) );\n```\nCompilation:\n```\nnode cjsc main.js build.js --config=config.json\n```\n\n\n\n## \u003ca name=\"a-config-b\"\u003e\u003c/a\u003eHow to make modules of jQuery and its plugins\n`config.json`:\n```javascript\n{\n\t\"jQuery\": {\n\t\t\"path\": \"./vendors/jquery-2.1.0.min.js\"\n\t},\n\t\"placeholder\": {\n\t\t\"path\": \"./vendors/jquery.placeholder.js\",\n\t\t\"require\": \"jQuery\",\n\t\t\"exports\": \"jQuery\"\n\t}\n}\n```\n`main.json`:\n```javascript\n// Obtain jQuery as UMD-module\nvar $ = require( \"jQuery\" );\n// Attach plugin to jQuery\nrequire( \"placeholder\" );\nconsole.log( $.fn.placeholder );\n```\nCompilation:\n```\nnode cjsc main.js build.js --config=config.json\n```\n\n\n## \u003ca name=\"a-vendors\"\u003e\u003c/a\u003eHow to make modules of 3rd party libraries\n\nOptions #1:\n```javascript\n// Load 3rd-party library and export the globals it exposes (\"exp1\" and \"exp2\")\nvar exp1 = require( \"./vendors/lib.js\", \"exp1\", \"exp2\" ).exp1,\n// Take the second exported object from the module cache\n\t\texp2 = require( \"./vendors/lib.js\" ).exp2;\n\nconsole.log( \"exp1\", exp1 );\nconsole.log( \"exp2\", exp2 );\n```\n\nOptions #2:\n\n`config.json`:\n```javascript\n{\n\t\"lib\": {\n\t\t\"path\": \"./vendors/lib.js\",\n\t\t\"exports\": [ \"exp1\", \"exp2\" ]\n\t}\n}\n```\n`main.json`:\n```javascript\nvar lib = require( \"lib\" );\nconsole.log( lib.exp1, lib.exp2 );\n```\nCompilation:\n```\nnode cjsc main.js -o build.js --config=config.json\n```\n\nIf 3rd party code exposes the only object, it can be done like that:\n\n`config.json`:\n```javascript\n{\n\t\"lib\": {\n\t\t\"path\": \"./vendors/lib.js\",\n\t\t\"exports\": \"exp1\"\n\t}\n}\n```\nNote: The `\"path\"` must be relative to the project directory (where the compiler is running from)\n\n`main.json`:\n```javascript\nvar lib = require( \"lib\" );\n// Exp1\nconsole.log( lib );\n```\n\n\n\n\n## \u003ca name=\"a-mustache\"\u003e\u003c/a\u003eHow to use Mustache templates\nTemplate file: ./mustache/example.tpl\n```\n{{title}} spends {{calc}}\n```\nModule that uses the template\n```javascript\nvar mustache = require( \"./mustache/mustache\" ),\n\t\ttpl = require( \"./mustache/example.tpl\" ),\n\t\tview = {\n\t\t\ttitle: \"Joe\",\n\t\t\tcalc: function () {\n\t\t\t\treturn 2 + 4;\n\t\t\t}\n\t\t};\n\nconsole.log( mustache.render( tpl, view ) );\n```\n\n\n## \u003ca name=\"a-handlebars\"\u003e\u003c/a\u003eHow to use Handlebars templates\nTemplate file: ./handlebarsjs/example.hbs\n```\n\u003cdiv class=\"entry\"\u003e\n  \u003ch1\u003e{{title}}\u003c/h1\u003e\n  \u003cdiv class=\"body\"\u003e\n    {{body}}\n  \u003c/div\u003e\n\u003c/div\u003e\n```\nModule that uses the template\n```javascript\nvar handlebars = require( \"./handlebarsjs/handlebars\", \"Handlebars\" ).Handlebars,\n\t\ttpl = require( \"./handlebarsjs/example.hbs\" ),\n\t\tview = {\n\t\t\ttitle: \"My New Post\",\n\t\t\tbody: \"This is my first post!\"\n\t\t};\n\nconsole.log( handlebars.compile( tpl )( view ) );\n```\n\n## Supplied demos\n\n```\n# Generic flow\nnode cjsc.js -o /tmp/build.js demo/use-main-flow.js\nnode /tmp/build.js\n\n# Access 3rd-party non-module in a module\nnode cjsc.js -o /tmp/build.js demo/use-3rd-party.js\nnode /tmp/build.js\n\n# Non-module to compiled CommonJS\nnode cjsc.js -o /tmp/build.js demo/use-nonmodule.js\nnode /tmp/build.js\n\n# UMD to compiled CommonJS\nnode cjsc.js -o /tmp/build.js demo/use-umd.js\nnode /tmp/build.js\n\n# Backbone as a module\nnode cjsc.js -o /tmp/build.js demo/use-backbone.js\nnode /tmp/build.js\n\n# Templating with Mustache\nnode cjsc.js -o /tmp/build.js demo/use-mustache.js\nnode /tmp/build.js\n\n# Templating with Handlebars.js\nnode cjsc.js -o /tmp/build.js  demo/use-handlebars.js\nnode /tmp/build.js\n\n# Source map usage demo\nnode cjsc.js -o demo/source-map/build.js demo/source-map/src/use-main-flow.js --source-map=demo/source-map/*.map --source-map-root=./src\n\n# Config usage demo\nnode cjsc.js -o /tmp/build.js demo/use-config.js --config=./demo/config/config.json\n\n# Browserify-plugin usage demo\nnpm install -g browserify-replace\nnode cjsc.js -o /tmp/build.js demo/use-browserify-replace.js -t [ browserify-replace \\\n                  --replace '{ \"from\": \"\\\\$foo\", \"to\": 42 }' \\\n                  --replace '{ \"from\": \"\\\\$bar\", \"to\": \"quux\" }' ]\n\n# ES6 via Babel.js usage demo\nnode cjsc.js -o /tmp/build.js  demo/use-es6.es6 -t [ babelify --presets [ es2015 --sourceMapRelative ] ]\nnode /tmp/build.js\n```\n\n## \u003ca name=\"a-async\"\u003e\u003c/a\u003eHow to load the compiled files asynchronously\nLoading dozens of atomic modules asynchronously usually slower then loading one compiled file. This is an advantage of Common JS compiler\n over AMD. However if you go with a huge compiled file, it would be efficient to split it into a few parts for async loading.\nIt is a matter of balance: too many HTTP requires is bad for performance as well as too few. Here how I deal with it.\n\nI inline into the page body tiny async loader [Micro RequireJS](https://github.com/dsheiko/micro-requirejs) (1.5K)\nand use it to load external libraries and compiled assets asynchronously:\n\n```php\n\u003cscript type=\"text/javascript\"\u003e\n\u003c?php include PATH_ROOT . \"node_modules/micro-requirejs/rjs.min.js\"; ?\u003e\n\nrjs.define( \"/vendors/jquery/jquery-1.10.2.min.js\", \"jquery\" );\nrjs.define( \"/vendors/picturefill/picturefill.min.js\", \"picturefill\" );\nrjs.define( \"/build/js/app.js\", \"app\" );\nrjs.define( \"/build/js/sub-app.js\", \"subapp\" );\n// Backbone requires jQuery during initialization\nrjs.require([ \"jquery\" ], function(){\n  rjs.define( \"/vendors/exoskeleton/exoskeleton.min.js\", \"backbone\" );\n});\n\n\u003c/script\u003e\n```\n\nThen I specify in the source module what dependencies must be resolved before running the code depended on them:\n```javascript\nglobal.rjs.require([ \"jquery\", \"backbone\" ], function(){\n  var $ = require( \"jquery\" ),\n      Backbone = require( \"backbone\" );\n\n  //...\n});\n```\n\n## \u003ca name=\"a-bonus\"\u003e\u003c/a\u003eBonus tricks\nWhile debugging you can refer to the module name as `__modulename`:\n\n```javascript\nconsole.log( __modulename + \": remote call [status=%s]\", status );\n// \u003e\u003e Lib/Api/Provider: remote call [status=ok]\n```\n\n\n## \u003ca name=\"a-api\"\u003e\u003c/a\u003eAPI\n```\nvar cjsc = require( \".././cjsc-module\" ),\n    args = {\n      targets: [ \"./demo/use-main-flow.js\", \"/tmp/build.js\" ],\n      options: {\n        debug: true,\n        transform: [{\n          target: pkgName,\n          options: {\n            foo: true\n          }\n        }]\n      }\n    },\n    config = {\n      \"foo\": {\n         \"globalProperty\": \"foo\"\n       }\n    };\n\ncjsc( args, config, function( code ){\n  console.log( \"All done. Generated code:\", code );\n});\n```\n## \u003ca name=\"a-pluginexample\"\u003e\u003c/a\u003ePlugin example\n\nPlugin example\n```\nvar through = require( \"through2\" );\n\n/*  export a Browserify plugin  */\nmodule.exports = function ( file, opts ) {\n    /*  provide stream  */\n    var code = \"\";\n    return through.obj(function (buf, enc, next) {\n        //  accumulate the code\n        code += buf.toString(\"utf8\");\n        next();\n    }, function ( next ) {\n        // Get parameters for `replace` target\n        // if command line has multiple `replace` targets, opts.replace is an array\n        var params = global.JSON.parse( opts.replace );\n        //  transform the code\n        code = code.replace( cfg.from, cfg.to );\n        this.push( new Buffer( code ) );\n        next();\n    });\n};\n```\n\nUsage:\n```\nnode cjsc.js -o /tmp/build.js app.js -t [ plugin \\\n                  --replace '{ \"from\": \"\\\\$foo\", \"to\": 42 }' ]\n```\n\n## \u003ca name=\"a-es6\"\u003e\u003c/a\u003eCompiling to ES6(2015)\n\n```\ncjsc.js src/Js/app.js -t [ babelify --presets [ es2015 ] --sourceMapRelative ] -o ./build/app.js\n```\n\n## Alternatives\n* Browserify - http://browserify.org/\n* SystemJS - https://github.com/systemjs/systemjs\n* Webpack - https://github.com/webpack/webpack\n* Modules-webmake - https://github.com/medikoo/modules-webmake\n* Frictionless browser package management - http://jspm.io/ (bundles ES6/AMD/CommonJs modules into a single file for production)\n\n[![Analytics](https://ga-beacon.appspot.com/UA-1150677-13/dsheiko/cjsc)](http://githalytics.com/dsheiko/cjsc)\n\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/dsheiko/cjsc/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsheiko%2Fcjsc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsheiko%2Fcjsc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsheiko%2Fcjsc/lists"}