1.1.0 • Published 6 years ago
alanode v1.1.0
alanode
alanode is The Binary To Run Node.JS Files With Import And Export Statements.
yarn add -DE alanode # project-based
yarn global add alanode # user-basedTable Of Contents
CLI
The package can be run from the CLI:
$ alanode sourceIt uses ÀLaMode regex-based transpiler to change import and export statements into require calls and module.export expressions (no Babel). It also normalises process.argv to hide its presence, so that programs can safely keep using the argv array without unexpected results.
With the following file that uses an import:
import { constants } from 'os'
console.log(process.argv)
console.log(constants.signals.SIGINT)$ alanode t will generate the result successfully:
[
'/Users/anton/.nvm/versions/node/v12.14.1/bin/node',
'/Users/anton/a-la/alanode/test/fixture/t'
]
2Copyright
(c) À La Mode 2019