aegean
Include the content of imports statements down to the importing file.
Before:
; const result = ; // 3
After:
{ let result = 0; return result;} const result = ; // 3
Summary
Installation
With npm:
npm install --save-dev aegean
With yarn:
yarn add --dev aegean
Usage
- Example 1: simple usage
- Example 2: importing file with nested imports
- Example 3: importing a node module
Example 1: simple usage
main.js
; const result = ; console; // 3
example-1.js
const aegan = ;const fs = ; const result = ; fs;
inlined-main.js
{ let result = 0; return result;} const result = ; console; // 3
Example 2: importing file with nested imports
is_string.js
{ return mixed !== null && mixed !== undefined && mixedconstructor === String;}
echo.js
; { if === false throw "echo expects parameter 1 to be a string"; console;}
main.js
; ;
example-2.js
const fs = ;const aegean = ; const result = ; fs;
inlined-main.js
{ return mixed !== null && mixed !== undefined && mixedconstructor === String;} { if === false throw "echo expects parameter 1 to be a string"; console;} ;
Example 3: importing a node module
main.js
;
example-3.js
const aegean = ;const fs = ; const bootstrap4 = ; fs;
inlined.js
/*! * Bootstrap v4.2.1 (https://getbootstrap.com/) * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ { typeof exports === 'object' && typeof module !== 'undefined' ? : ...
Supported imports methods
;;;;
Contributing
- Install dependencies
npm install
or
yarn install
- Light on dev (transpiling typescript to javascript)
npm run dev
or
yarn dev
- Add your feature on
/src/main.ts
- Append your tests on
/test/aegean.js
- Run tests
npm run test
or
yarn test