@markw65/prettier-plugin-monkeyc 1.0.7 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -42,8 +42,8 @@ npm install --global @markw65/prettier-plugin-monkeyc
42
42
 
43
43
  Install the Prettier extension from https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode.
44
44
 
45
- - if you installed the plugin globally, you need to enable `prettier.resolveGlobalModules` in your settings.
46
- - if you installed locally, [the documentation](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) says it should just work, but I've found you need to tell the extension how to find the local copy of prettier. Put `"prettier.prettierPath": "./node_modules/prettier"` in your `.vscode/settings.json`.
45
+ - if you installed the plugin globally, you need to enable `prettier.resolveGlobalModules` in your settings.
46
+ - if you installed locally, [the documentation](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) says it should just work, but I've found you need to tell the extension how to find the local copy of prettier. Put `"prettier.prettierPath": "./node_modules/prettier"` in your `.vscode/settings.json`.
47
47
 
48
48
  Once configured as above, VSCode's `Format Document` command (`Option-Shift-F`) will reformat your .mc files for you.
49
49
 
@@ -94,7 +94,31 @@ to parse monkeyc. This grammar was originally copied from the Peggy sample javas
94
94
 
95
95
  The plugin is organized as follows:
96
96
 
97
- - `prettier-plugin-monkeyc.js` This file exports the objects required of a Prettier plugin.
98
- - `peg/monkeyc.peggy` The Peggy grammar for monkey-c.
99
- - `src/printer.js` Printers take an AST and produce a Doc (the intermediate
100
- format that Prettier uses). The current implementation is a thin wrapper around Prettier's default, estree printer. It handles just the nodes that it needs to, and delegates to "javascript-like" behavior for everything else.
97
+ - `prettier-plugin-monkeyc.js` This file exports the objects required of a Prettier plugin.
98
+ - `peg/monkeyc.peggy` The Peggy grammar for monkey-c.
99
+ - `src/printer.js` Printers take an AST and produce a Doc (the intermediate
100
+ format that Prettier uses). The current implementation is a thin wrapper around Prettier's default, estree printer. It handles just the nodes that it needs to, and delegates to "javascript-like" behavior for everything else.
101
+
102
+ ## Release Notes
103
+
104
+ #### 1.0.0
105
+
106
+ - Initial release
107
+
108
+ #### 1.0.1 - 1.0.7
109
+
110
+ - Minor tweaks for better consistency with Prettier for javascript
111
+
112
+ #### 1.0.8
113
+
114
+ - Fix some issues with the standard prettier options. Eg setting options.semi=false would have produced illegal MonkeyC, as would setting options.trailingComma=all
115
+ - Add a monkeyc-json parser, which just takes the AST (in JSON format) as input. This will allow us to build tools that use the plugin to parse MonkeyC, then change the AST in some way, and then print out the result.
116
+
117
+ #### 1.0.9
118
+
119
+ - Don't bundle prettier/standalone.js in the build, since we depend on prettier anyway. This halves the size of the bundle.
120
+ - Improve the monkeyc-json parser to allow passing the original source, followed by the json-ast, so that prettier can still inspect the original source when printing (it does this for comments, and for deciding when to leave blank lines between certain constructs).
121
+
122
+ #### 1.0.10
123
+
124
+ - Fixed the parser to allow import/using inside modules.