Advertisement
joebodo

sys.apis.minify.README.md

Sep 6th, 2016
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.74 KB | None | 0 0
  1. See: https://github.com/stravant/LuaMinify
  2.  
  3. Lua Parsing and Refactorization tools
  4. =========
  5.  
  6. A collection of tools for working with Lua source code. Primarily a Lua source code minifier, but also includes some static analysis tools and a general Lua lexer and parser.
  7.  
  8. Currently the minifier performs:
  9.  
  10. - Stripping of all comments and whitespace
  11. - True semantic renaming of all local variables to a reduced form
  12. - Reduces the source to the minimal spacing, spaces are only inserted where actually needed.
  13.  
  14.  
  15. LuaMinify Command Line Utility Usage
  16. ------------------------------------
  17.  
  18. The `LuaMinify` shell and batch files are given as shortcuts to running a command line instance of the minifier with the following usage:
  19.  
  20.     LuaMinify sourcefile [destfile]
  21.  
  22. Which will minify to a given destination file, or to a copy of the source file with _min appended to the filename if no output file is given.
  23.  
  24.  
  25. LuaMinify Roblox Plugin Usage
  26. -----------------------------
  27.  
  28. First, download the source code, which you can do by hitting this button:
  29.  
  30. ![Click That](http://github.com/stravant/LuaMinify/raw/master/RobloxPluginInstructions.png)
  31.  
  32. Then copy the `RobloxPlugin` folder from the source into your Roblox Plugins directory, which can be found by hitting `Tools->Open Plugins Folder` in Roblox Studio.
  33.  
  34. Features/Todo
  35. -------------
  36. Features:
  37.  
  38.     - Lua scanner/parser, which generates a full AST
  39.     - Lua reconstructor
  40.         - minimal
  41.         - full reconstruction (TODO: options, comments)
  42.         - TODO: exact reconstructor
  43.     - support for embedded long strings/comments e.g. [[abc [[ def ]] ghi]]
  44.  
  45. Todo:
  46.     - use table.concat instead of appends in the reconstructors
  47.  
  48. The MIT License (MIT)
  49.  
  50. Copyright (c) 2012-2013
  51.  
  52. Permission is hereby granted, free of charge, to any person obtaining a copy of
  53. this software and associated documentation files (the "Software"), to deal in
  54. the Software without restriction, including without limitation the rights to
  55. use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  56. the Software, and to permit persons to whom the Software is furnished to do so,
  57. subject to the following conditions:
  58.  
  59. The above copyright notice and this permission notice shall be included in all
  60. copies or substantial portions of the Software.
  61.  
  62. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  63. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  64. FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  65. COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  66. IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  67. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement