Skip to content

Commit

Permalink
Release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
melbarch committed Dec 15, 2019
1 parent ba0909a commit 9d486ca
Show file tree
Hide file tree
Showing 9 changed files with 1,009 additions and 22 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
end_of_line = crlf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
32 changes: 32 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"env": {
"node": true
},
"extends": [
"eslint:recommended"
],
"rules": {
"indent": [
"error",
2,
{
"SwitchCase": 1,
"ignoredNodes": [
"MemberExpression"
]
}
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
]
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
45 changes: 33 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,36 @@
# power-my-vscode
install some of my personal preferred extensions and my prefered theme
<div align="center">
<h1>Power-My-VScode 🚀</h1>
<p>
<b>Make VS Code great again! </b>
</p>
<br>
</div>
<img src="https://img.shields.io/npm/v/power-my-vscode.svg"/>


My personal list :
I made this package to synchronize my VS Code setup across my computers (home's laptop, at work, fresh installations, ...).
It powers VS Code with my preferred extensions and preferred theme.

import cost
debugger-for-chrome
eslint
tslint
CodeMetrics
Bracket Pair Colorizer 2
mikestead.dotenv
Live server
Prefered Theme : nightowl
## Usage :
⚡ Zero config! one simple command line to upgrade VS Code : ⚡
```
npx power-my-vscode
```



List of extensions :

- **[Import cost](https://marketplace.visualstudio.com/items?itemName=wix.vscode-import-cost)**
- **[Debugger for chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome)**
- **[Eslint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)**
- **[TSLint](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin)**
- **[CodeMetrics](https://marketplace.visualstudio.com/items?itemName=kisstkondoros.vscode-codemetrics)**
- **[Bracket Pair Colorizer 2](https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer-2)**
- **[DotENV syntax highlighting](https://marketplace.visualstudio.com/items?itemName=mikestead.dotenv)**
- **[Live server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer)**
- My prefered theme : **[Nightowl](https://marketplace.visualstudio.com/items?itemName=sdras.night-owl)**

## License

MIT © [Mohamed EL BARCHANY](https://melbarch.com)
58 changes: 58 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/usr/bin/env node
'use strict';

const exec = require('child_process').exec;
const promisify = require('util').promisify;
const asyncExec = promisify(exec);

const chalk = require('chalk');
const log = console.log;

// TODO : move this into another file :
const vsMarketPlaceItems = [
// Linters :
'dbaeumer.vscode-eslint',
'ms-vscode.vscode-typescript-tslint-plugin',

// utilities :
'wix.vscode-import-cost',
'msjsdiag.debugger-for-chrome',
'kisstkondoros.vscode-codemetrics',
'CoenraadS.bracket-pair-colorizer-2',
'mikestead.dotenv',
'ritwickdey.LiveServer',

// theme :
'sdras.night-owl'
];

let failures = 0;

const installExtension = async extentionId => {
const command = `code --install-extension ${extentionId}`;
const { stdout, stderr } = await asyncExec(command);
log(chalk.blue('Begin installing ') + chalk.green(extentionId));
if (stdout) {
log(stdout);
}
if (stderr) {
log(chalk.bold.red('Error : ') + stderr);
failures++;
}
};

(async () => {
log(chalk.bold.green('Let\'s make your VS Code great again!'));
const elementsCount = vsMarketPlaceItems.length;
// TODO : we can try to install only uninstalled extensions as code cli provide list of already installed extensions
for (let index = 0; index < elementsCount; index++) {
await installExtension(vsMarketPlaceItems[index]);
}
if (failures === 0) {
log(chalk.bold.green('Your VSCode have been given super powers successfully!'));
} else {
log(chalk.yellowBright(
`Only ${elementsCount - failures} out of ${elementsCount} have been installed successfully!`
));
}
})();
5 changes: 0 additions & 5 deletions package-lock.json

This file was deleted.

19 changes: 14 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "power-my-vscode",
"version": "0.0.1",
"description": "Give my VScode some power!",
"version": "1.0.0",
"description": "Give my VS Code super powers!",
"bin": "index.js",
"scripts": {
"postinstall": "code --install-extension msjsdiag.debugger-for-chrome",
"test": "echo \"Error: no test specified\" && exit 1"
"lint": "eslint index.js"
},
"repository": {
"type": "git",
Expand All @@ -15,5 +15,14 @@
"bugs": {
"url": "https://github.com/melbarch/power-my-vscode/issues"
},
"homepage": "https://github.com/melbarch/power-my-vscode#readme"
"homepage": "https://github.com/melbarch/power-my-vscode#readme",
"devDependencies": {
"eslint": "^6.7.2"
},
"engines": {
"node": ">=10"
},
"dependencies": {
"chalk": "^3.0.0"
}
}
Loading

0 comments on commit 9d486ca

Please sign in to comment.