-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 68c9e42
Showing
10 changed files
with
1,986 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
working_directory: ~/repo | ||
docker: | ||
- image: circleci/node:latest | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
name: Restore npm Package Data Cache | ||
key: dependency-cache-{{ checksum "package.json" }} | ||
- run: | ||
name: Install Node dependencies | ||
command: npm install | ||
- save_cache: | ||
name: Cache npm Package Data | ||
key: dependency-cache-{{ checksum "package.json" }} | ||
paths: | ||
- ./node_modules | ||
- run: | ||
name: Run Tests | ||
command: npm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[*] | ||
charset = utf-8 | ||
|
||
[*.{js,json,ts,yml}] | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.{js,ts}] | ||
block_comment_start = /* | ||
block_comment = * | ||
block_comment_end = */ | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.nlf] | ||
insert_final_newline = false | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"env": { | ||
"es6": true, | ||
"node": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"rules": { | ||
"indent": [ | ||
"error", | ||
4 | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# dependencies | ||
bower_components/ | ||
node_modules/ | ||
vendor/ | ||
|
||
# package manager files | ||
npm-debug.log* | ||
yarn-error.log | ||
|
||
# project specific | ||
test.js | ||
test.ts | ||
todo.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Folders | ||
.circleci/ | ||
.editorconfig | ||
src/ | ||
test/ | ||
types/ | ||
|
||
# Files | ||
.gitignore | ||
.travis.yml | ||
gulpfile.js | ||
tsconfig.json | ||
tslint.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# exec-appx | ||
|
||
[![npm](https://flat.badgen.net/npm/license/exec-appx)](https://www.npmjs.org/package/exec-appx) | ||
[![npm](https://flat.badgen.net/npm/v/exec-appx)](https://www.npmjs.org/package/exec-appx) | ||
[![CircleCI](https://flat.badgen.net/circleci/github/idleberg/node-exec-appx)](https://circleci.com/gh/idleberg/node-exec-appx) | ||
[![David](https://flat.badgen.net/david/dev/idleberg/node-exec-appx)](https://david-dm.org/idleberg/node-exec-appx?type=dev) | ||
|
||
Executes a Windows Store app (Appx) | ||
|
||
## Prerequisites | ||
|
||
This library requires PowerShell and a Windows version with support for Windows Store apps | ||
|
||
## Installation | ||
|
||
`yarn add exec-appx || npm install exec-appx` | ||
|
||
## Usage | ||
|
||
`execAppx(appID: string, args: Array, options: Object)` | ||
|
||
Example usage in script: | ||
|
||
```js | ||
const execAppx = require('exec-appx'); | ||
|
||
// Application ID | ||
const appID = 'SpotifyAB.SpotifyMusic'; | ||
|
||
(async () => { | ||
let pkg = await execAppx(appID); | ||
})(); | ||
|
||
``` | ||
|
||
### Options | ||
|
||
See [`child_process.spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) documentation for details | ||
|
||
## License | ||
|
||
This work is licensed under [The MIT License](https://opensource.org/licenses/MIT) | ||
|
||
## Donate | ||
|
||
You are welcome to support this project using [Flattr](https://flattr.com/submit/auto?user_id=idleberg&url=https://github.com/idleberg/node-exec-appx) or Bitcoin `17CXJuPsmhuTzFV2k4RKYwpEHVjskJktRd` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
'use strict'; | ||
|
||
const getAppxPath = require('get-appx-path'); | ||
const { platform } = require('os'); | ||
const { promisify } = require('util'); | ||
const { spawn } = require('child_process'); | ||
|
||
const spawnAsync = promisify(spawn); | ||
|
||
module.exports = (appID, args = [], options = {}) => { | ||
if (platform() !== 'win32') { | ||
throw 'Error: Not a Windows operating system'; | ||
} | ||
|
||
options = Object.assign({ | ||
detached: true | ||
}, options); | ||
|
||
return getAppxPath(appID).then(appx => { | ||
return spawnAsync(appx.path, args, options); | ||
}); | ||
}; |
Oops, something went wrong.