milkee-plugin-prettier 0.0.4 → 0.0.6
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/dist/bin.js +15 -7
- package/package.json +2 -1
package/dist/bin.js
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// Generated by CoffeeScript 2.7.0
|
|
3
3
|
//!/usr/bin/env node
|
|
4
|
-
var
|
|
4
|
+
var formatCoffeeFiles, main;
|
|
5
5
|
|
|
6
6
|
({formatCoffeeFiles} = require('./main'));
|
|
7
7
|
|
|
8
|
-
//
|
|
9
|
-
|
|
8
|
+
// Main function
|
|
9
|
+
main = async function() {
|
|
10
|
+
var args, targetDir;
|
|
11
|
+
// Parse CLI arguments
|
|
12
|
+
args = process.argv.slice(2);
|
|
13
|
+
targetDir = args[0] || process.cwd();
|
|
14
|
+
// Run the formatter
|
|
15
|
+
return (await formatCoffeeFiles(targetDir));
|
|
16
|
+
};
|
|
10
17
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
18
|
+
// Execute
|
|
19
|
+
main().catch(function(error) {
|
|
20
|
+
console.error(error);
|
|
21
|
+
return process.exit(1);
|
|
22
|
+
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "milkee-plugin-prettier",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "A Milkee plugin for working with Prettier for CoffeeScript without version conflicts.",
|
|
5
|
+
"type": "commonjs",
|
|
5
6
|
"main": "dist/main.js",
|
|
6
7
|
"bin": {
|
|
7
8
|
"milkee-plugin-prettier": "dist/bin.js",
|