diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..609387f Binary files /dev/null and b/.DS_Store differ diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..fac40a5 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false \ No newline at end of file diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..ba077a4 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +bin diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..176a458 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..916e0b9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules +coverage/ diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..f818c06 --- /dev/null +++ b/.npmignore @@ -0,0 +1,8 @@ +.DS_Store +.*.swp +yarn.lock +coverage +.nyc_output +__tests__/ +*.test.js +*.test.jsx \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..be52e3b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,19 @@ +sudo: false +language: node_js +node_js: + - 'stable' + - '8' +cache: + yarn: true + directories: + - node_modules +notifications: + email: false +branches: + only: + - master + - /^v[0-9].*$/ + +script: + - npm run lint + - npm run semantic-release || true diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..650e072 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) sinchang (https://github.com/sinchang) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..6e58f75 --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ + +# vsce-item-property-cli + +[![NPM version](https://img.shields.io/npm/v/vsce-item-property-cli.svg?style=flat)](https://npmjs.com/package/vsce-item-property-cli) [![NPM downloads](https://img.shields.io/npm/dm/vsce-item-property-cli.svg?style=flat)](https://npmjs.com/package/vsce-item-property-cli) + +## Install + +```bash +npm i vsce-item-property-cli -g +``` + +## Usage + +```js +vsce-item-property-cli vscodevim.vim +``` + +## Contributing + +1. Fork it! +2. Create your feature branch: `git checkout -b my-new-feature` +3. Commit your changes: `git commit -am 'Add some feature'` +4. Push to the branch: `git push origin my-new-feature` +5. Submit a pull request :D + + +## Author + +**vsce-item-property-cli** © [sinchang](https://github.com/sinchang), Released under the [MIT](./LICENSE) License.
+Authored and maintained by sinchang with help from contributors ([list](https://github.com/sinchang/vsce-item-property-cli/contributors)). + +> [github.com/sinchang](https://github.com/sinchang) · GitHub [@sinchang](https://github.com/sinchang) · Twitter [@sinchangwen](https://twitter.com/sinchangwen) diff --git a/cli.js b/cli.js new file mode 100755 index 0000000..5a3d79e --- /dev/null +++ b/cli.js @@ -0,0 +1,18 @@ +#!/usr/bin/env node + +'use strict' +const cac = require('cac') +const vsceItemProperty = require('vsce-item-property') +const prettyjson = require('prettyjson') + +const cli = cac() + +cli.command('*', 'Tell me the vsce name', input => { + const itemName = input[0] + + vsceItemProperty(itemName) + .then(res => console.log(prettyjson.render(res, { noColor: true }))) + .catch(err => console.log(err)) +}) + +cli.parse() diff --git a/package.json b/package.json new file mode 100644 index 0000000..4c57fc1 --- /dev/null +++ b/package.json @@ -0,0 +1,34 @@ +{ + "name": "vsce-item-property-cli", + "version": "0.0.0", + "description": "Get vsce meta information cli tool", + "repository": { + "url": "sinchang/vsce-item-property-cli", + "type": "git" + }, + "main": "cli.js", + "bin": "cli.js", + "files": [ + "cli.js" + ], + "scripts": { + "lint": "standard", + "semantic-release": "semantic-release" + }, + "standard": { + "env": [ + "jest" + ] + }, + "author": "sinchang ", + "license": "MIT", + "dependencies": { + "cac": "^4.0.0", + "prettyjson": "^1.2.1", + "vsce-item-property": "^1.2.0" + }, + "devDependencies": { + "semantic-release": "^15.9.16", + "standard": "^10.0.0" + } +}