{"id":23921473,"url":"https://github.com/a-la/alamode","last_synced_at":"2025-04-11T22:40:23.599Z","repository":{"id":57155732,"uuid":"142330628","full_name":"a-la/alamode","owner":"a-la","description":"A Node.JS RegExp-based transpiler of source code.","archived":false,"fork":false,"pushed_at":"2020-03-14T23:16:59.000Z","size":1566,"stargazers_count":10,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T18:40:59.909Z","etag":null,"topics":["babel","ecmascript","export","import","modules","node","nodejs","transpiler"],"latest_commit_sha":null,"homepage":"https://alamode.cc","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a-la.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-25T17:10:44.000Z","updated_at":"2023-10-05T23:23:38.000Z","dependencies_parsed_at":"2022-08-26T09:50:18.349Z","dependency_job_id":null,"html_url":"https://github.com/a-la/alamode","commit_stats":null,"previous_names":[],"tags_count":56,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-la%2Falamode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-la%2Falamode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-la%2Falamode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-la%2Falamode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a-la","download_url":"https://codeload.github.com/a-la/alamode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248493007,"owners_count":21113159,"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":["babel","ecmascript","export","import","modules","node","nodejs","transpiler"],"created_at":"2025-01-05T16:16:05.360Z","updated_at":"2025-04-11T22:40:23.567Z","avatar_url":"https://github.com/a-la.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ÀLaMode\n\n[![npm version](https://badge.fury.io/js/alamode.svg)](https://www.npmjs.com/package/alamode)\n[![Build status](https://ci.appveyor.com/api/projects/status/owaagwyeh6b8pwc5?svg=true)](https://ci.appveyor.com/project/4r7d3c0/alamode)\n![Node.js CI](https://github.com/a-la/alamode/workflows/Node.js%20CI/badge.svg)\n\n_ÀLaMode_ is a RegExp-based transpiler of source code in _Node.JS_ that supports transpilation of `import` and `export` statements including source map for debugging, while keeping the original code pretty much the same (no _interop_ require). It also can transpile JSX (without source maps ATM and some minor limitations).\n\nThe package can be used via the [CLI](#CLI) to build packages, or via the [require hook](#require-hook) to transform modules on-the-fly.\n\n\u003e If you've tried it and are having trouble seeing `unknown keyword export`, check if your issue falls under the category described in the [troubleshooting](#troubleshooting). That's the single problem that we've seen after a year of using this software.\n\n```\nyarn add -D alamode\nnpm i --save-dev alamode\n```\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/0.svg?sanitize=true\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n## Why ÀLaMode\n\nÀLaMode is a neat, fast, low-weight alternative to AST-based transpilers. If you only want `import` and `export` statements, don't disrespect yourself by continuing to use _Babel_, and make a switch to **ÀLaMode** today. What am I talking about? Read next.\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/1.svg?sanitize=true\" width=\"25\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n### It's Neat\n\nThe source code is left pretty much intact, with line numbers preserved, and exports just being renamed to `module.export` while making sure to export the default module first if it is present. There is no need to come up with super-fancy solutions and try to build a rocket when all you need is a remote control. That means, don't worry about EcmaScript modules standard, it's significance is blown out of proportions by the \"community\" who has nothing better to do. Just rename \u003ckbd\u003eexports\u003c/kbd\u003e to \u003ckbd\u003emodule.exports\u003c/kbd\u003e and \u003ckbd\u003eimports\u003c/kbd\u003e to \u003ckbd\u003erequire\u003c/kbd\u003e \u0026mdash; that's the philosophy behind _ÀLaMode_.\n\n\u003ctable\u003e\n\u003ctr\u003e\u003cth\u003eSource Code\u003c/th\u003e\u003cth\u003eTranspiled Code\u003c/th\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\n\n```js\nimport Stream, {\n  Transform,\n} from 'stream'\nimport { join } from 'path'\n\nexport default class S extends Transform {\n  /**\n   * Creates a new instance.\n   * @param {string} path\n   * @param {Stream} [parent]\n   */\n  constructor(path, parent) {\n    super()\n    this.source = join('example', path)\n    if (parent instanceof Stream)\n      this.pipe(parent)\n  }\n}\n\n/**\n * A function that returns `c`.\n * @param {string} input\n */\nexport const c = (input = '') =\u003e {\n  return 'c' + input ? `-${input}` : ''\n}\n\n/**\n * A function that returns `b`.\n * @param {number} times\n */\nexport const b = (times = 0) =\u003e {\n  return 'b' + times ? `-${times}` : ''\n}\n```\n```\n\n\n```\n\u003c/td\u003e\n\u003ctd\u003e\n\n```js\nconst Stream = require('stream'); const {\n  Transform,\n} = Stream;\nconst { join } = require('path');\n\nclass S extends Transform {\n  /**\n   * Creates a new instance.\n   * @param {string} path\n   * @param {Stream} [parent]\n   */\n  constructor(path, parent) {\n    super()\n    this.source = join('example', path)\n    if (parent instanceof Stream)\n      this.pipe(parent)\n  }\n}\n\n/**\n * A function that returns `c`.\n * @param {string} input\n */\nconst c = (input = '') =\u003e {\n  return 'c' + input ? `-${input}` : ''\n}\n\n/**\n * A function that returns `b`.\n * @param {number} times\n */\nconst b = (times = 0) =\u003e {\n  return 'b' + times ? `-${times}` : ''\n}\n\nmodule.exports = S\nmodule.exports.c = c\nmodule.exports.b = b\n```\n\u003c/td\u003e\u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eShow Babel Output\u003c/summary\u003e\n\n```js\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.b = exports.c = exports.default = void 0;\n\nvar _stream = _interopRequireWildcard(require(\"stream\"));\n\nvar _path = require(\"path\");\n\nfunction _interopRequireWildcard(obj) { if (obj \u0026\u0026 obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty \u0026\u0026 Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }\n\nclass S extends _stream.Transform {\n  /**\n   * Creates a new instance.\n   * @param {string} path\n   * @param {Stream} [parent]\n   */\n  constructor(path, parent) {\n    super();\n    this.source = (0, _path.join)('example', path);\n    if (parent instanceof _stream.default) this.pipe(parent);\n  }\n\n}\n/**\n * A function that returns `c`.\n * @param {string} input\n */\n\n\nexports.default = S;\n\nconst c = (input = '') =\u003e {\n  return 'c' + input ? `-${input}` : '';\n};\n/**\n * A function that returns `b`.\n * @param {number} times\n */\n\n\nexports.c = c;\n\nconst b = (times = 0) =\u003e {\n  return 'b' + times ? `-${times}` : '';\n};\n\nexports.b = b;\n```\n\u003c/details\u003e\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/2.svg?sanitize=true\" width=\"25\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n### It Has 0 Dependencies\n\nÀLaMode does not install any additional dependencies, and it has been optimised with _Google Closure Compiler_. That means you don't have to wait ages for each new real dependency in your project to link with Babel's bloatware you don't care about. Just focus on the work and enjoy the single new directory in your `node_modules`.\n\n\u003ctable\u003e\n\u003ctr\u003e\u003cth\u003eÀLaMode: 8 yarn.lock lines\u003c/th\u003e\u003cth\u003eBabel: 1650 yarn.lock Lines\u003c/th\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a-la/alamode/HEAD/doc/yarn-add-alamode.gif\" alt=\"Installing ÀLaMode in 1 sec\"\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a-la/alamode/HEAD/doc/yarn-add-babel2.gif\" alt=\"Linking Babel's Dependencies in 20 sec\"\u003e\n\u003c/td\u003e\u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/3.svg?sanitize=true\" width=\"25\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n### It Respects JSDoc\n\nLet's face it, _Babel_ is software for masses that has capitalized on people's vulnerability in wanting to use `import` and `export` statements which is one of the best features on the language. You say let them be, I say look what they are doing to your documented code without caring a single bit:\n\n\u003ctable\u003e\n\u003ctr\u003e\u003cth\u003eÀLaMode: Gold Standard\u003c/th\u003e\u003cth\u003eBabel: JSDoc Enemy\u003c/th\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a-la/alamode/HEAD/doc/alamode.gif\" alt=\"Correct JSDoc With ÀLaMode\"\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a-la/alamode/HEAD/doc/babel.gif\" alt=\"Broken JSDoc With Babel\"\u003e\n\u003c/td\u003e\u003c/tr\u003e\n\u003c/table\u003e\n\nOriginal Source:\n\n```js\n/**\n * A function that returns `b`.\n * @param {number} times\n */\nexport const b = (times) =\u003e {\n  return 'b' + (times ? `-${times}` : '')\n}\n```\n\nSee if you can figure out [why this happens](https://github.com/a-la/fixture-babel/blob/master/build/index.js#L31). Unlike _Babel_, our [Node.JS Development Company](https://artd.eco) cares about quality and developer experience, so we're offering ÀLaMode as a simple and lightweight solution to transpile packages.\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/4.svg?sanitize=true\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n## Table Of Contents\n\n- [Why ÀLaMode](#why-àlamode)\n  * [It's Neat](#its-neat)\n  * [It Has 0 Dependencies](#it-has-0-dependencies)\n  * [It Respects JSDoc](#it-respects-jsdoc)\n- [Table Of Contents](#table-of-contents)\n- [Installation](#installation)\n  * [Global](#global)\n  * [Project](#project)\n- [CLI](#cli)\n  * [`NODE_DEBUG`](#node_debug)\n  * [`--help`](#--help)\n- [Compiling JSX: `--jsx, --preact`](#compiling-jsx---jsx---preact)\n  * [CSS Injector](#css-injector)\n- [ÀLaNode](#àlanode)\n- [.alamoderc.json](#alamodercjson)\n- [Transforms](#transforms)\n- [Require Hook](#require-hook)\n  * [`_alamode.HookConfig`](#type-_alamodehookconfig)\n  * [Multiple Calls To Alamode()](#multiple-calls-to-alamode)\n- [Source Maps](#source-maps)\n  * [\u003ccode\u003edebug session\u003c/code\u003e](#debug-session)\n- [Troubleshooting](#troubleshooting)\n- [Copyright \u0026 License](#copyright--license)\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/5.svg?sanitize=true\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n## Installation\n\nThe software can be installed either as a global dependency, or as a project dependency.\n\n### Global\n\nWhen installed globally, it will be used directly via a binary, such as `alamode src -o build`.\n\n|                                      Package Manager                                      |       Installation        |\n| ----------------------------------------------------------------------------------------- | ------------------------- |\n| \u003cimg src='https://cdn.rawgit.com/a-la/alamode/HEAD/doc/Npm-logo.svg' height='16'\u003e npm     | `npm i -g alamode` |\n| \u003cimg src='https://cdn.rawgit.com/a-la/alamode/HEAD/doc/yarn-kitten.svg' height='16'\u003e yarn | `yarn add global alamode` |\n\n### Project\n\nWhen installed in a project, it will be used via the `package.json` script, e.g., `yarn build` or `npm run build`.\n\n```json5\n{\n  \"name\": \"project\",\n  \"version\": \"1.0.0\",\n  \"description\": \"An example project\",\n  \"main\": \"build\",\n  \"scripts\": {\n    \"build\": \"alamode src -o build\"\n  },\n  \"files\": [\"build\"],\n  \"license\": \"MIT\"\n}\n```\n\n|                                      Package Manager                                      |        Installation        |\n| ----------------------------------------------------------------------------------------- | -------------------------- |\n| \u003cimg src='https://cdn.rawgit.com/a-la/alamode/HEAD/doc/Npm-logo.svg' height='16'\u003e npm     | `npm i --save-dev alamode` |\n| \u003cimg src='https://cdn.rawgit.com/a-la/alamode/HEAD/doc/yarn-kitten.svg' height='16'\u003e yarn | `yarn add -DE alamode` |\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/6.svg?sanitize=true\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n## CLI\n\nThe binary accepts a path to a single file, or a directory with the source code as the first argument, and a path to the build folder via `-o` argument.\n\n```sh\nalamode src -o build\n```\n\nThere are other arguments which can be passed.\n\n\u003ctable\u003e\n \u003cthead\u003e\n  \u003ctr\u003e\n   \u003cth\u003eArgument\u003c/th\u003e \n   \u003cth\u003eShort\u003c/th\u003e\n   \u003cth\u003eDescription\u003c/th\u003e\n  \u003c/tr\u003e\n \u003c/thead\u003e\n  \u003ctr\u003e\n   \u003ctd\u003esource\u003c/td\u003e\n   \u003ctd\u003e\u003c/td\u003e\n   \u003ctd\u003eThe location of the input file or directory to transpile.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n   \u003ctd\u003e--output\u003c/td\u003e\n   \u003ctd\u003e-o\u003c/td\u003e\n   \u003ctd\u003eThe location of where to save the transpiled output.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n   \u003ctd\u003e--ignore\u003c/td\u003e\n   \u003ctd\u003e-i\u003c/td\u003e\n   \u003ctd\u003eComma-separated list of files inside of \u003ccode\u003esource\u003c/code\u003e dir to\n    ignore, for example, \u003ccode\u003ebin,.eslintrc\u003c/code\u003e.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n   \u003ctd\u003e--noSourceMaps\u003c/td\u003e\n   \u003ctd\u003e-s\u003c/td\u003e\n   \u003ctd\u003eDisable source maps.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n   \u003ctd\u003e--extensions\u003c/td\u003e\n   \u003ctd\u003e-e\u003c/td\u003e\n   \u003ctd\u003eFiles of what extensions to transpile. Default \u003ccode\u003ejs,jsx\u003c/code\u003e.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n   \u003ctd\u003e--debug\u003c/td\u003e\n   \u003ctd\u003e-d\u003c/td\u003e\n   \u003ctd\u003eWill make ÀLaMode stop after replacing markers.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n   \u003ctd\u003e--require\u003c/td\u003e\n   \u003ctd\u003e-r\u003c/td\u003e\n   \u003ctd\u003eRenames \u003ccode\u003erequire\u003c/code\u003e calls into imports, and \u003ccode\u003emodule.exports\u003c/code\u003e\n    assignments to exports.\n    Great for refactoring older code.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n   \u003ctd\u003e--env\u003c/td\u003e\n   \u003ctd\u003e\u003c/td\u003e\n   \u003ctd\u003eThe environment. Analogue to setting \u003ccode\u003eALAMODE_ENV\u003c/code\u003e\n    env variable.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n   \u003ctd\u003e--version\u003c/td\u003e\n   \u003ctd\u003e-v\u003c/td\u003e\n   \u003ctd\u003eShow the version number.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n   \u003ctd\u003e--help\u003c/td\u003e\n   \u003ctd\u003e-h\u003c/td\u003e\n   \u003ctd\u003eDisplay the usage information.\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\nAdditional JSX options are also available:\n\n\u003ctable\u003e\n \u003cthead\u003e\n  \u003ctr\u003e\n   \u003cth\u003eArgument\u003c/th\u003e \n   \u003cth\u003eShort\u003c/th\u003e\n   \u003cth\u003eDescription\u003c/th\u003e\n  \u003c/tr\u003e\n \u003c/thead\u003e\n  \u003ctr\u003e\n   \u003ctd\u003e--jsx\u003c/td\u003e\n   \u003ctd\u003e-j\u003c/td\u003e\n   \u003ctd\u003eEnable JSX mode: only update JSX syntax to use hyperscript.\n    Does not transpile \u003ccode\u003eimport/export\u003c/code\u003e statements.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n   \u003ctd\u003e--module\u003c/td\u003e\n   \u003ctd\u003e-m\u003c/td\u003e\n   \u003ctd\u003eWorks together with \u003ccode\u003ejsx\u003c/code\u003e to also transpile modules while\n    transpiling JSX.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n   \u003ctd\u003e--preact\u003c/td\u003e\n   \u003ctd\u003e-p\u003c/td\u003e\n   \u003ctd\u003eWhen transpiling JSX, automatically insert at the top\n    \u003ccode\u003eimport { h } from \"preact\"\u003c/code\u003e.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n   \u003ctd\u003e--preact-externs\u003c/td\u003e\n   \u003ctd\u003e-E\u003c/td\u003e\n   \u003ctd\u003eSame as \u003ccode\u003epreact\u003c/code\u003e, but imports from \u003ccode\u003e＠externs/preact\u003c/code\u003e\n    \u003ccode\u003eimport { h } from \"＠externs/preact\"\u003c/code\u003e.\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\nSetting the \u003ca name=\"node_debug\"\u003e`NODE_DEBUG`\u003c/a\u003e environmental variable to `alamode` will print the list of processed files to the `stderr`.\n\n```sh\n$ NODE_DEBUG=alamode alamode src -o build -i bin/alamode.js\n```\n\n```fs\nALAMODE 97955: index.js\nALAMODE 97955: bin/catcher.js\nALAMODE 97955: bin/index.js\nALAMODE 97955: lib/index.js\n```\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/7.svg?sanitize=true\" width=\"25\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n### `--help`\n\nShows all available commands.\n\n```\nÀLaMode\nA tool to transpile JavaScript packages using regular expressions.\nSupports import/export and JSX transpilation.\nhttps://artdecocode.com/alamode/\n\n  alamode source [-o destination] [-i dir,file] [--env env] [-s]\n\n\tsource            \tThe location of the input file or directory to transpile.\n\t--output, -o      \tThe location of where to save the transpiled output.\n\t--ignore, -i      \tComma-separated list of files inside of `source` dir to\n\t                  \tignore, for example, `bin,.eslintrc`.\n\t--noSourceMaps, -s\tDisable source maps.\n\t--extensions, -e  \tFiles of what extensions to transpile.\n\t                  \tDefault: js,jsx.\n\t--debug, -d       \tWill make ÀLaMode stop after replacing markers.\n\t--require, -r     \tRenames `require` calls into imports, and `module.exports`\n\t                  \tassignments to exports.\n\t                  \tGreat for refactoring older code.\n\t--env             \tThe environment. Analogue to setting `ALAMODE_ENV`\n\t                  \tenv variable.\n\t--version, -v     \tShow the version number.\n\t--help, -h        \tDisplay the usage information.\n\n  Example:\n\n    alamode src -o build -s\n\nJSX transpilation\nAllows to transpile JSX using RegExes.\n\n  alamode source [-o destination] -j [-mpE]\n\n\t--jsx, -j           \tEnable JSX mode: only update JSX syntax to use hyperscript.\n\t                    \tDoes not transpile `import/export` statements.\n\t--module, -m        \tWorks together with `jsx` to also transpile modules while\n\t                    \ttranspiling JSX.\n\t--preact, -p        \tWhen transpiling JSX, automatically insert at the top\n\t                    \t`import { h } from \"preact\"`.\n\t--preact-externs, -E\tSame as `preact`, but imports from `＠externs/preact`\n\t                    \t`import { h } from \"＠externs/preact\"`.\n\n  Example:\n\n    alamode src -o build -j -m\n```\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/8.svg?sanitize=true\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n## Compiling JSX: `--jsx, --preact`\n\nÀLaMode can transpile JSX syntax. In the `jsx` mode, the `import/export` statements will be left intact, but the source code will be transformed to add pragma invocations, such as `h(Component, { props }, children)`. The default pragma is `h` for Preact, and to avoid writing `import { h } from 'preact'` in each file, the `-p` option can be passed for ÀLaMode to add it automatically.\n\n_For example, the following file can be compiled:_\n\n```jsx\nimport { render } from 'preact'\n\nconst Component = ({ test, ...props }) =\u003e (\n  \u003cdiv id=\"example\" {...props}\u003e\n    {test}\n  \u003c/div\u003e\n)\nrender(\u003cComponent cool\u003eExample\u003c/Component\u003e, document.body)\n```\n\n_Using the `alamode example/index.jsx -j -p` command:_\n\n```js\nimport { h } from 'preact'\nimport { render } from 'preact'\n\nconst Component = ({ test, ...props }) =\u003e (\n   h('div',{...props,'id':\"example\"},\n    test,\n  )\n)\nrender( h(Component,{cool:true},`Example`), document.body)\n```\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/9.svg?sanitize=true\" width=\"25\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n### CSS Injector\n\n_ÀLaMode_ can transpile the `import './style.css'` directives into `import './style.css.js'`, where `style.css.js` becomes a module with a css-injector script that will add your CSS to the `head` element.\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/10.svg?sanitize=true\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n## ÀLaNode\n\nTo be able to spawn modules without having to create a proxy file as below:\n\n```js\nrequire('alamode')()\nrequire('./package')\n```\n\nÀLaMode bundles a binary called `alanode`. It will do the same thing as above, so that running modules with `import` and `export` statements becomes really easy.\n\n```sh\n$ alanode source\n```\n\nIt changes `import` and `export` statements into `require` calls and `module.export` expressions. It also normalises `process.argv` to hide its presence, so that programs can safely keep using the _argv_ array without unexpected results.\n\n_With the following file that uses an import_:\n\n```js\nimport { constants } from 'os'\nimport { basename } from 'path'\n\nconsole.log(basename(process.argv[1]))\nconsole.log(constants.signals.SIGINT)\n```\n\n_`$ alanode t` will generate the result successfully:_\n\n```\nt\n2\n```\n\n\u003cblockquote\u003e\n\nÀLaNode is also available as a standalone package `alanode`.\u003cbr\u003e\n[![npm version](https://badge.fury.io/js/alanode.svg)](https://www.npmjs.com/package/alanode)\n\u003c/blockquote\u003e\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/11.svg?sanitize=true\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n## .alamoderc.json\n\nA transform can support options which are set in the `.alamoderc.json` configuration file. The configuration file is read from the same directory where the program is executed (cwd). Options inside of the `env` directive will be active only when the `ALAMODE_ENV` environmental variable is set to the `env` key.\n\n```json\n{\n  \"env\": {\n    \"test-build\": {\n      \"import\": {\n        \"replacement\": {\n          \"from\": \"^((../)+)src\",\n          \"to\": \"$1build\"\n        }\n      }\n    }\n  },\n  \"import\": {\n    \"alamodeModules\": [\"alamode\", \"example\"],\n    \"stdlib\": {\n      \"path\": \"stdlib.js\",\n      \"packages\": [\"example\"]\n    }\n  }\n}\n```\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/12.svg?sanitize=true\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n## Transforms\n\nThe main import and export transforms are included as part of _ÀLaMode_.\n\n- \u003ckbd\u003e📥[`@a-la/import`](../../wiki/Import)\u003c/kbd\u003e Changes imports to requires. Read _Wiki_ for additional options and guidance on how to test builds and build source code to use the standard library compiled out of all dependencies using [_Depack_](https://github.com/dpck/depack#standard-library).\n- \u003ckbd\u003e📤[`@a-la/export`](../../wiki/Export)\u003c/kbd\u003e Updates `export` to `module.exports` while preserving whitespace for human-readable output.\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/13.svg?sanitize=true\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n## Require Hook\n\nThe purpose of the require hook is to be able to transpile files automatically when they are imported.\n\nTo use this feature, `alamode` needs to be `required` in a separate file, after which the `import` and `export` statements will become available.\n\nFor example, take the following directory structure, with a main and library files:\n\n```m\nexample/require\n├── debug.js\n├── index.js\n├── lib.js\n├── multiple.js\n└── require.js\n```\n\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003e\u003ccode\u003eindex.js\u003c/code\u003e\u003c/th\u003e\n\u003cth\u003e\u003ccode\u003elib.js\u003c/code\u003e\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr/\u003e\u003ctr\u003e\n\u003ctd\u003e\n\n```js\nimport getInfo from './lib'\n\nconsole.log(getInfo())\n```\n\u003c/td\u003e\n\u003ctd\u003e\n\n```js\nimport { platform, arch } from 'os'\n\nexport default () =\u003e {\n  return `${platform()}:${arch()}`\n}\n```\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n\nThe require hook would work in the following way:\n\n```js\nrequire('alamode')()\nrequire('.')\n```\n\nBy executing the `node require.js` command, `alamode` will be installed and it will do its job dynamically for every `.js` file that is required, enabling to use `import` and `export` statements.\n\n```\ndarwin:x64\n```\n\n\u003cstrong\u003e\u003ca name=\"type-_alamodehookconfig\"\u003e`_alamode.HookConfig`\u003c/a\u003e\u003c/strong\u003e: The options for ÀLaMode Hook.\n\n|       Name        |                Type                |                                           Description                                            | Default |\n| ----------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------ | ------- |\n| pragma            | \u003cem\u003estring\u003c/em\u003e                    | What pragma to add on top of JSX programs. Default `const { h } = require('preact');`.           | -       |\n| noWarning         | \u003cem\u003eboolean\u003c/em\u003e                   | Disable warnings when resetting existing hooks.                                                  | `false` |\n| ignoreNodeModules | \u003cem\u003eboolean\u003c/em\u003e                   | Auto-ignore node_modules. Independent of any matcher.                                            | `true`  |\n| matcher           | \u003cem\u003e(path: string) =\u003e boolean\u003c/em\u003e | The function that will be called with the path and return whether the file should be transpiled. | -       |\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/14.svg?sanitize=true\" width=\"15\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n### Multiple Calls To Alamode()\n\nWhen the call is made multiple times in the program, the latter calls will revert the previous hooks and install new ones. The warning will be shown unless the `noWarning` option is set to true.\n\n```js\nconst alamode = require('alamode')\nalamode()\n\n// in other file\nconst path = require('path')\nconst preact = path.relative('', path\n  .dirname(require.resolve('preact/package.json')))\nalamode({\n  pragma: `const { h } = require(\"./${preact}\");`,\n  // noWarning: true, // to disable output\n})\n```\n\n```\nReverting JS hook to add new one.\nReverting JSX hook to add new one, pragma:\nconst { h } = require(\"./node_modules/preact\");\n```\n\nThis can happen when the tests are set up to run with _Zoroaster_ with the `-a` flag for alamode, and the source code also tries to install the require hook.\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/15.svg?sanitize=true\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n## Source Maps\n\nThe source maps are supported by this package, but implemented in a hack-ish way. The transforms will aim to preserve line and column numbers, so that no additional remapping is required. However this is not enough to generate a source map good enough for a debugger -- it needs to know about mappings of positions between segments which can be operators, function calls, _etc_. `alamode` simply breaks the source code into distinct chunks such as white-spaces, identifiers and comments, and down into individual symbols. Using this method, the size of a source map is larger, but it still works. In further versions, this will be improved to allow to extract real segments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0IGNvbnN0IHRyYW5zcGlsZSA9IGFzeW5jICh7CiAgaW5wdXQsCiAgb3V0cHV0ID0gJy0nLAogIGlnbm9yZSA9IFtdLAogIG5vU291cmNlTWFwcywKfSkgPT4gewogIGlmICghaW5wdXQpIHRocm93IG5ldyBFcnJvcignUGxlYXNlIHNwZWNpZnkgdGhlIHNvdXJjZSBmaWxlIG9yIGRpcmVjdG9yeS4nKQoKICBjb25zdCBscyA9IGxzdGF0U3luYyhpbnB1dCkKICBpZiAobHMuaXNEaXJlY3RvcnkoKSkgewogICAgaWYgKCFvdXRwdXQpIHRocm93IG5ldyBFcnJvcignUGxlYXNlIHNwZWNpZnkgdGhlIG91dHB1dCBkaXJlY3RvcnkuJykKICAgIGF3YWl0IHByb2Nlc3NEaXIoewogICAgICBpbnB1dCwKICAgICAgb3V0cHV0LAogICAgICBpZ25vcmUsCiAgICAgIG5vU291cmNlTWFwcywKICAgIH0pCiAgfSBlbHNlIGlmIChscy5pc0ZpbGUoKSkgewogICAgYXdhaXQgcHJvY2Vzc0ZpbGUoewogICAgICBpbnB1dDogZGlybmFtZShpbnB1dCksCiAgICAgIHJlbFBhdGg6ICcuJywKICAgICAgbmFtZTogYmFzZW5hbWUoaW5wdXQpLAogICAgICBvdXRwdXQsCiAgICAgIGlnbm9yZSwKICAgICAgbm9Tb3VyY2VNYXBzLAogICAgfSkKICB9CiAgaWYgKG91dHB1dCAhPSAnLScpIHByb2Nlc3Muc3Rkb3V0LndyaXRlKGBUcmFuc3BpbGVkIGNvZGUgc2F2ZWQgdG8gJHtvdXRwdXR9XG5gKQp9Cg==)\n\n\u003cdetails\u003e\n  \u003csummary\u003eClick to View: \u003ca name=\"debug-session\"\u003e\u003ccode\u003edebug session\u003c/code\u003e\u003c/a\u003e\u003c/summary\u003e\n  \u003ctable\u003e\n  \u003ctr\u003e\u003ctd\u003e\n    \u003cimg alt=\"Alt: Debugging a source code with source maps.\" src=\"doc/debugger1.gif\" /\u003e\n  \u003c/td\u003e\u003c/tr\u003e\n  \u003c/table\u003e\n\u003c/details\u003e\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/16.svg?sanitize=true\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n## Troubleshooting\n\nBecause there can be many intricacies when transpiling with regular expressions, problems might arise from time to time. If using the `require` hook, the best solution is to build the source code using `alamode` binary, and see where the error occurs. Then it must be analysed why it happens, for example:\n\n- The `import` or `export` transform does not match the case.\n- A portion of source code is cut out before the transform with [`markers`](https://github.com/a-la/markers/blob/master/src/index.js#L46) so that the line does not participate in a transform.\n\nSo the single most common problem that we've experienced, is using the `//` and `/*` inside string literals (\u003ccode\u003e`\u003c/code\u003e), e.g.,\n\n```js\nconst host = 'localhost'\nconst port = 9999\nconst url = `https://${host}:${port}`\n\nexport const test = 'hello world'\n\nconst otherUrl = `https://${host}:${port}`\n```\n```\nexample/trouble.js:5\nexport const test = 'hello world'\n^^^^^^\n\nSyntaxError: Unexpected token export\n    at createScript (vm.js:80:10)\n    at Object.runInThisContext (vm.js:139:10)\n    at Module._compile (module.js:617:28)\n    at Module.p._compile (node_modules/alamode/compile/depack.js:49:18)\n    at Module._extensions..js (module.js:664:10)\n    at Object.k.(anonymous function).y._extensions.(anonymous function) [as .js] (node_modules/alamode/compile/depack.js:51:7)\n    at Module.load (module.js:566:32)\n    at tryModuleLoad (module.js:506:12)\n    at Function.Module._load (module.js:498:3)\n    at Module.require (module.js:597:17)\n```\n\nThis is because \u003ccode\u003e//${host}:${port}`\u003c/code\u003e will be cut until the end of the line as a comment prior to the template, and the template will match until the next opening backtick rather than the correct one, taking out the \u003ccode\u003eexport\u003c/code\u003e from the transformation. To validate that, we can run the \u003ccode\u003ealamode src -d\u003c/code\u003e command:\n\n```\nconst host = %%_RESTREAM_STRINGS_REPLACEMENT_0_%%\nconst port = 9999\nconst url = %%_RESTREAM_LITERALS_REPLACEMENT_0_%%https:%%_RESTREAM_INLINECOMMENTS_REPLACEMENT_1_%%\n```\n\nNow to fix this issue, either use `'` to concatenate strings that have `/*` and `//`, or use `import { format } from 'url'` to dynamically create addresses.\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/17.svg?sanitize=true\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n## Copyright \u0026 License\n\nGNU Affero General Public License v3.0\n\nYou CAN use the require hook for your own code without publishing the source code. For example, you CAN run a web-server where your source code is transpiled on-the-fly. On the other hand, you're not allowed to build other software packages that link to _ÀLaMode_ to enable transpilation feature for your users without adhering to **Affero**.\n\nAffero is better for Open Source anyway, why don't you consider it instead of MIT.\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\n      \u003ca href=\"https://www.artd.eco\"\u003e\n        \u003cimg width=\"100\" src=\"https://raw.githubusercontent.com/wrote/wrote/master/images/artdeco.png\"\n          alt=\"Art Deco\"\u003e\n      \u003c/a\u003e\n    \u003c/th\u003e\n    \u003cth\u003e© \u003ca href=\"https://www.artd.eco\"\u003eArt Deco™\u003c/a\u003e for \u003ca href=\"https://alamode.cc\"\u003eÀ La Mode\u003c/a\u003e 2020\u003c/th\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#table-of-contents\"\u003e\n  \u003cimg src=\"/.documentary/section-breaks/-1.svg?sanitize=true\"\u003e\n\u003c/a\u003e\u003c/p\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-la%2Falamode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa-la%2Falamode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-la%2Falamode/lists"}