2.1.0 • Published 3 years ago

@lunatechs/lunatea-napkin v2.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

This is the prettier parser used to transform and clean the JavaScript output from LunaTea plugins. LunaTea plugins are written using the Haxe programming language, the compiled JavaScript can have minor style issues that need to be fixed with LunaTea Napkin.

What modifications does it make to the code?

  • Removes empty classes generated by Haxe or LunaTea

  • Changes bracket notation prototype access to dot notation, in both variable expressions and member expressions

  • Removes LunaTea modifications like the empty LTGlobals object access

  • Finally, it uses prettier's parser to clean the output following its opinionated code style.

Installation

npm install --save-dev @lunatechs/lunatea-napkin

How to Use

By default LunaTea Napkin will convert all .js files in the dist folder in the root of your project when you run it.

npx napkin 

Custom target directory

If you want to choose a custom directory, use the path argument

npx napkin --path=./game/js/plugins/

Disable Prettier Styling

Sometimes you may only want to perform the transformation required after compiling a plugin with LunaTea.

npx napkin --no-pretty
2.1.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.5.2

3 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.4

4 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.0

4 years ago