0.1.5 • Published 9 years ago
kotlinc v0.1.5
kotlinc
Kotlin JavaScript Compiler
Temporarily only supports compiling a single file, the next version increases the compile folder option.
install
npm i kotlincvar kotlinc = require('kotlinc')example
var kotlinc = require('../index')
kotlinc({
src: __dirname + '/app.kt',
output: __dirname + '/app.js',
moduleKind: 'umd',
sourceMap: true,
metaInfo: true
}, function (code, stdout, stderr) {
console.log('Exit code:', code)
console.log('Program output:', stdout)
console.log('Program stderr:', stderr)
})options
srcInput file pathoutputOutput file pathno-stdlibDon't use bundled Kotlin stdliblibrariesPaths to Kotlin libraries with .meta.js and .kjsm files, separated by system file separatorsource-mapGenerate source mapmeta-infoGenerate .meta.js and .kjsm files with metadata. Use to create a librarytarget{ v5 } Generate JS files for specific ECMA versionmodule-kind{ plain, amd, commonjs, umd } Kind of a module generated by compilermain{call,noCall} Whether a main function should be calledoutput-prefixPath to file which will be added to the beginning of output fileoutput-postfixPath to file which will be added to the end of output filelanguage-versionProvide source compatibility with specified language versionapi-versionAllow to use declarations only from the specified version of bundled librariesnowarnGenerate no warningsverboseEnable verbose logging outputversionDisplay compiler versionhelpPrint a synopsis of standard optionsXPrint a synopsis of advanced optionsPplugin:<pluginId>:<optionName>=<value>Pass an option to a plugin
compiler
license
MIT