kotlinc
v0.1.5
Published
Kotlin JavaScript Compiler
Downloads
3
Readme
kotlinc
Kotlin JavaScript Compiler
Temporarily only supports compiling a single file, the next version increases the compile folder option.
install
npm i kotlinc
var 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
src
Input file pathoutput
Output file pathno-stdlib
Don't use bundled Kotlin stdliblibraries
Paths to Kotlin libraries with .meta.js and .kjsm files, separated by system file separatorsource-map
Generate source mapmeta-info
Generate .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-prefix
Path to file which will be added to the beginning of output fileoutput-postfix
Path to file which will be added to the end of output filelanguage-version
Provide source compatibility with specified language versionapi-version
Allow to use declarations only from the specified version of bundled librariesnowarn
Generate no warningsverbose
Enable verbose logging outputversion
Display compiler versionhelp
Print a synopsis of standard optionsX
Print a synopsis of advanced optionsP
plugin:<pluginId>:<optionName>=<value>
Pass an option to a plugin
compiler
license
MIT