Skip to content

Commit 6fa1293

Browse files
committed
v1.0.7
1 parent 9c33830 commit 6fa1293

9 files changed

Lines changed: 3559 additions & 2565 deletions

File tree

.vscode/settings.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,12 @@
44
"cert": "D:/Github/deadlyjack/acode-plugin-prettier/.vscode/server.crt",
55
"key": "D:/Github/deadlyjack/acode-plugin-prettier/.vscode/server.key",
66
"passphrase": "1234"
7-
}
7+
},
8+
"cSpell.words": [
9+
"acode",
10+
"Aspree",
11+
"deadlyjack",
12+
"espree",
13+
"Meriyah"
14+
]
815
}

dist/744.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/main.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src_worker_js.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
3+
* This devtool is neither made for production nor for readable output files.
4+
* It uses "eval()" calls to create a separate source file in the browser devtools.
5+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
6+
* or disable the default devtool with "devtool: false".
7+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
8+
*/
9+
/******/ (function() { // webpackBootstrap
10+
/******/ var __webpack_modules__ = ({
11+
12+
/***/ "./src/worker.js":
13+
/*!***********************!*\
14+
!*** ./src/worker.js ***!
15+
\***********************/
16+
/***/ (function() {
17+
18+
eval("self.onmessage = e => {\n const {\n id,\n code,\n cursorOptions,\n action,\n scriptUrl\n } = e.data;\n if (action === \"load script\") {\n importScripts(scriptUrl);\n self.postMessage({\n action: \"script loaded\"\n });\n return;\n }\n const {\n prettier,\n plugins\n } = self.acodePluginPrettier;\n cursorOptions.plugins = plugins;\n const res = prettier.formatWithCursor(code, cursorOptions);\n self.postMessage({\n id,\n action: \"code format\",\n res\n });\n};\n\n//# sourceURL=webpack://acode-plugin-prettier/./src/worker.js?");
19+
20+
/***/ })
21+
22+
/******/ });
23+
/************************************************************************/
24+
/******/
25+
/******/ // startup
26+
/******/ // Load entry module and return exports
27+
/******/ // This entry module can't be inlined because the eval devtool is used.
28+
/******/ var __webpack_exports__ = {};
29+
/******/ __webpack_modules__["./src/worker.js"]();
30+
/******/
31+
/******/ })()
32+
;

package.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
11
{
22
"name": "acode-plugin-prettier",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"description": "Acode plugin to format code",
55
"main": "dist/main.js",
66
"repository": "https://github.com/deadlyjack/acode-plugin-prettier.git",
77
"author": "Ajit <me@ajitkumar.dev>",
88
"license": "MIT",
99
"dependencies": {
10-
"prettier": "^2.8.4"
10+
"live-server": "^1.2.2",
11+
"prettier": "^3.0.2"
1112
},
1213
"devDependencies": {
13-
"@babel/cli": "^7.20.7",
14-
"@babel/core": "^7.20.12",
15-
"@babel/preset-env": "^7.20.2",
16-
"babel-loader": "^9.1.2",
14+
"@babel/cli": "^7.22.10",
15+
"@babel/core": "^7.22.11",
16+
"@babel/preset-env": "^7.22.10",
17+
"babel-loader": "^9.1.3",
1718
"jszip": "^3.10.1",
1819
"webpack": "^5.76.0",
1920
"webpack-cli": "^5.0.1"
2021
},
2122
"scripts": {
2223
"build": "node ./scripts/build.js",
23-
"build-release": "yarn build --mode production"
24-
},
25-
"resolutions": {
26-
"terser": ">=5.15.1"
24+
"build-release": "webpack --mode production",
25+
"start-dev": "node .vscode/start-dev"
2726
},
2827
"browserslist": [
2928
"> 0.25%, not dead"
3029
]
31-
}
30+
}

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "acode.plugin.prettier",
33
"name": "Prettier",
44
"main": "dist/main.js",
5-
"version": "1.0.6",
5+
"version": "1.0.7",
66
"readme": "readme.md",
77
"icon": "icon.png",
88
"type": "free",

readme.md

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,27 @@ Prettier is an opinionated code formatter. It enforces a consistent style by par
44

55
This plugin can format code written in [Acode](https://acode.foxdebug.com) editor for Android.
66

7-
## Supported Extenstions
8-
- html
9-
- htm
10-
- css
11-
- scss
12-
- less
13-
- js
14-
- cjs
15-
- es
16-
- mjs
17-
- jsx
18-
- ts
19-
- tsx
20-
- vue
21-
- json
22-
- hbs
23-
- handlebars
24-
- md
25-
- yaml
26-
- yml
7+
## Supported Extensions
8+
9+
- html
10+
- htm
11+
- css
12+
- scss
13+
- less
14+
- js
15+
- cjs
16+
- es
17+
- mjs
18+
- jsx
19+
- ts
20+
- tsx
21+
- vue
22+
- json
23+
- hbs
24+
- handlebars
25+
- md
26+
- yaml
27+
- yml
2728

2829
## Under Development
2930

src/vendor.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import prettier from "prettier/standalone";
2-
import pretterParserHTML from "prettier/parser-html/";
2+
import prettierParserHTML from "prettier/parser-html/";
33
import prettierParserBabel from "prettier/parser-babel";
44
import prettierParserGraphql from "prettier/parser-graphql";
55
import prettierParserAngular from "prettier/parser-angular";
6-
import prettierParserAspree from "prettier/parser-espree";
6+
import prettierParserEspree from "prettier/parser-espree";
77
import prettierParserFlow from "prettier/parser-flow";
88
import prettierParserGlimmer from "prettier/parser-glimmer";
99
import prettierParserMd from "prettier/parser-markdown";
@@ -18,10 +18,10 @@ self.acodePluginPrettier = {
1818
prettierParserBabel,
1919
prettierParserGraphql,
2020
prettierParserAngular,
21-
prettierParserAspree,
21+
prettierParserEspree,
2222
prettierParserFlow,
2323
prettierParserGlimmer,
24-
pretterParserHTML,
24+
prettierParserHTML,
2525
prettierParserMd,
2626
prettierParserMeriyah,
2727
prettierParserPostcss,

0 commit comments

Comments
 (0)