├── .gitattributes
├── .gitignore
├── gatsby-config.js
├── templates
└── base
│ └── example
│ ├── src
│ ├── index.css
│ ├── index.js
│ ├── ConfigView.js
│ └── SDApi.js
│ ├── public
│ ├── action
│ │ ├── images.sketch
│ │ └── images
│ │ │ ├── action.png
│ │ │ ├── action@2x.png
│ │ │ ├── actionimage.png
│ │ │ └── actionimage@2x.png
│ ├── propertyinspector
│ │ ├── css
│ │ │ ├── check.png
│ │ │ ├── rcheck.svg
│ │ │ ├── caret.svg
│ │ │ ├── check.svg
│ │ │ ├── elg_calendar_inv.svg
│ │ │ ├── elg_calendar.svg
│ │ │ ├── g_d8d8d8.svg
│ │ │ └── sdpi.css
│ │ └── index.html
│ ├── en.json
│ ├── de.json
│ ├── index.html
│ ├── code.html
│ ├── manifest.json
│ ├── externalWindow.html
│ ├── app.js
│ └── common.js
│ ├── Release
│ └── README.md
│ ├── config
│ ├── jest
│ │ ├── fileTransform.js
│ │ └── cssTransform.js
│ ├── polyfills.js
│ ├── paths.js
│ ├── env.js
│ ├── webpackDevServer.config.js
│ ├── webpack.config.dev.js
│ ├── webpack.config.export.js
│ └── webpack.config.prod.js
│ ├── scripts
│ ├── test.js
│ ├── dev.js
│ ├── export.js
│ ├── start.js
│ └── build.js
│ └── package.json
├── src
└── gatsby-theme-docz
│ └── Logo
│ ├── console-icon.png
│ ├── index.js
│ └── logo.svg
├── docs-src
├── gatsby-theme-docz
│ └── Logo
│ │ ├── console-icon.png
│ │ ├── index.js
│ │ └── logo.svg
├── development.mdx
├── features.mdx
├── home.mdx
├── deployment.mdx
└── guide.mdx
├── .editorconfig
├── cli.js
├── test.js
├── readme.md
├── doczrc.js
├── package.json
└── ui.js
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto eol=lf
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .docz
3 | docs
4 | node_modules
5 | **/node_modules
6 |
--------------------------------------------------------------------------------
/gatsby-config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: [],
3 | pathPrefix: "/create-streamdeck-plugin"
4 | };
5 |
--------------------------------------------------------------------------------
/templates/base/example/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | font-family: sans-serif;
5 | }
6 |
--------------------------------------------------------------------------------
/src/gatsby-theme-docz/Logo/console-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cmgriffing/create-streamdeck-plugin/HEAD/src/gatsby-theme-docz/Logo/console-icon.png
--------------------------------------------------------------------------------
/docs-src/gatsby-theme-docz/Logo/console-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cmgriffing/create-streamdeck-plugin/HEAD/docs-src/gatsby-theme-docz/Logo/console-icon.png
--------------------------------------------------------------------------------
/templates/base/example/public/action/images.sketch:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cmgriffing/create-streamdeck-plugin/HEAD/templates/base/example/public/action/images.sketch
--------------------------------------------------------------------------------
/templates/base/example/public/action/images/action.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cmgriffing/create-streamdeck-plugin/HEAD/templates/base/example/public/action/images/action.png
--------------------------------------------------------------------------------
/templates/base/example/public/action/images/action@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cmgriffing/create-streamdeck-plugin/HEAD/templates/base/example/public/action/images/action@2x.png
--------------------------------------------------------------------------------
/templates/base/example/public/action/images/actionimage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cmgriffing/create-streamdeck-plugin/HEAD/templates/base/example/public/action/images/actionimage.png
--------------------------------------------------------------------------------
/templates/base/example/public/propertyinspector/css/check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cmgriffing/create-streamdeck-plugin/HEAD/templates/base/example/public/propertyinspector/css/check.png
--------------------------------------------------------------------------------
/templates/base/example/public/action/images/actionimage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cmgriffing/create-streamdeck-plugin/HEAD/templates/base/example/public/action/images/actionimage@2x.png
--------------------------------------------------------------------------------
/src/gatsby-theme-docz/Logo/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import logo from "./logo.svg";
3 |
4 | export const Logo = () => (
5 |
6 | );
7 |
--------------------------------------------------------------------------------
/templates/base/example/public/propertyinspector/css/rcheck.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/docs-src/gatsby-theme-docz/Logo/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import logo from "./logo.svg";
3 |
4 | export const Logo = () => (
5 |
6 | );
7 |
--------------------------------------------------------------------------------
/templates/base/example/public/propertyinspector/css/caret.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = tab
5 | end_of_line = lf
6 | charset = utf-8
7 | trim_trailing_whitespace = true
8 | insert_final_newline = true
9 |
10 | [*.yml]
11 | indent_style = space
12 | indent_size = 2
13 |
--------------------------------------------------------------------------------
/templates/base/example/src/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import ReactDOM from "react-dom";
3 |
4 | import "./index.css";
5 | import ConfigView from "./ConfigView";
6 |
7 | ReactDOM.render(, document.getElementById("root"));
8 |
--------------------------------------------------------------------------------
/templates/base/example/public/propertyinspector/css/check.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/templates/base/example/Release/README.md:
--------------------------------------------------------------------------------
1 | # Releases
2 |
3 | By default, `yarn export` creates a `.streamDeckPlugin` file from your source. This folder is the output of that process.
4 |
5 | The plugin file is a single self contained way of delivering your plugin to consumers. All they do is download it, and then double click it to install it within the Streamdeck Plugins folder.
6 |
--------------------------------------------------------------------------------
/templates/base/example/config/jest/fileTransform.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const path = require('path');
4 |
5 | // This is a custom Jest transformer turning file imports into filenames.
6 | // http://facebook.github.io/jest/docs/en/webpack.html
7 |
8 | module.exports = {
9 | process(src, filename) {
10 | return `module.exports = ${JSON.stringify(path.basename(filename))};`;
11 | },
12 | };
13 |
--------------------------------------------------------------------------------
/templates/base/example/config/jest/cssTransform.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // This is a custom Jest transformer turning style imports into empty objects.
4 | // http://facebook.github.io/jest/docs/en/webpack.html
5 |
6 | module.exports = {
7 | process() {
8 | return 'module.exports = {};';
9 | },
10 | getCacheKey() {
11 | // The output is always the same.
12 | return 'cssTransform';
13 | },
14 | };
15 |
--------------------------------------------------------------------------------
/cli.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 | "use strict";
3 | const React = require("react");
4 | const importJsx = require("import-jsx");
5 | const { render } = require("ink");
6 | const meow = require("meow");
7 |
8 | const ui = importJsx("./ui");
9 |
10 | const cli = meow(`
11 | Usage
12 | $ create-streamdeck-plugin
13 |
14 | Examples
15 | $ create-streamdeck-plugin --name=Jane
16 | Hello, Jane
17 | `);
18 |
19 | render(React.createElement(ui, cli.flags));
20 |
--------------------------------------------------------------------------------
/docs-src/development.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | name: 🚧 Development
3 | route: /development
4 | ---
5 |
6 | # 🚧 Development
7 |
8 | Developing with CSDP is fairly simple. Simply run:
9 |
10 | ```
11 | yarn dev:watch
12 | ```
13 |
14 | This will listen for changes to the `public` and `src` folders. It then compiles the app using development settings for a faster iteration cycle. After that, it copies the results to your platform-specific Elgato StreamDeck plugins folder.
15 |
--------------------------------------------------------------------------------
/templates/base/example/public/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "Description": "Use this to create your own plugin",
3 | "Name": "Stream Deck Template",
4 | "Category": "Templates",
5 | "com.elgato.template.action": {
6 | "Name": "Action",
7 | "Tooltip": "This is the only action in this plugin"
8 | },
9 | "Localization": {
10 | "More info": "More info",
11 | "Message": "Message",
12 | "Click Me": "Click Me",
13 | "Button": "Button"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/templates/base/example/public/de.json:
--------------------------------------------------------------------------------
1 | {
2 | "Description": "Nimm diese Vorlage für dein erstes Plugin",
3 | "Name": "Stream Deck Template",
4 | "Category": "Templates",
5 | "com.elgato.template.action": {
6 | "Name": "Action",
7 | "Tooltip": "Dies ist die einzige 'Action' in diesem Template"
8 | },
9 | "Localization": {
10 | "More info": "Mehr Infos",
11 | "Message": "Nachricht",
12 | "Click Me": "Klicke mich",
13 | "Button": "Taste"
14 |
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import chalk from 'chalk';
3 | import test from 'ava';
4 | import {render} from 'ink-testing-library';
5 | import App from './ui';
6 |
7 | test('greet unknown user', t => {
8 | const {lastFrame} = render();
9 |
10 | t.is(lastFrame(), chalk`Hello, {green Stranger}`);
11 | });
12 |
13 | test('greet user with a name', t => {
14 | const {lastFrame} = render();
15 |
16 | t.is(lastFrame(), chalk`Hello, {green Jane}`);
17 | });
18 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | # create-streamdeck-plugin
2 |
3 | > This readme is automatically generated by [create-ink-app](https://github.com/vadimdemedes/create-ink-app)
4 |
5 |
6 | ## Install
7 |
8 | ```bash
9 | $ npm install --global create-streamdeck-plugin
10 | ```
11 |
12 |
13 | ## CLI
14 |
15 | ```
16 | $ create-streamdeck-plugin --help
17 |
18 | Usage
19 | $ create-streamdeck-plugin
20 |
21 | Options
22 | --name Your name
23 |
24 | Examples
25 | $ create-streamdeck-plugin --name=Jane
26 | Hello, Jane
27 | ```
28 |
--------------------------------------------------------------------------------
/templates/base/example/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
12 |
13 | react-streamdeck
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/doczrc.js:
--------------------------------------------------------------------------------
1 | export default {
2 | title: "create-streamdeck-plugin",
3 | dest: "docs",
4 | src: "./docs-src",
5 | typescript: false,
6 | themeConfig: {
7 | initialColorMode: "dark",
8 | colors: {
9 | modes: {
10 | dark: {
11 | primary: "#6678FF",
12 | header: {
13 | bg: "#070f49",
14 | text: "#FFFFFF"
15 | },
16 | sidebar: {
17 | bg: "#2a2a2a",
18 | navGroup: "#ACAEBD",
19 | navLink: "#ACAEBD",
20 | navLinkActive: "#EBECF3",
21 | tocLink: "#ACAEBD",
22 | tocLinkActive: "#EBECF3"
23 | },
24 | background: "#282828",
25 | text: "#EFF0F3",
26 | muted: "#ACAEBD",
27 | link: "#6678FF",
28 | props: {
29 | highlight: "#6678FF"
30 | }
31 | }
32 | }
33 | }
34 | }
35 | };
36 |
--------------------------------------------------------------------------------
/templates/base/example/public/propertyinspector/css/elg_calendar_inv.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/templates/base/example/public/code.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
12 |
13 | react-streamdeck
14 |
15 |
16 |
17 |
18 | <%% #extraFeatures.obs %%>
19 |
20 |
21 | <%% /extraFeatures.obs %%>
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/templates/base/example/scripts/test.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // Do this as the first thing so that any code reading it knows the right env.
4 | process.env.BABEL_ENV = 'test';
5 | process.env.NODE_ENV = 'test';
6 | process.env.PUBLIC_URL = '';
7 |
8 | // Makes the script crash on unhandled rejections instead of silently
9 | // ignoring them. In the future, promise rejections that are not handled will
10 | // terminate the Node.js process with a non-zero exit code.
11 | process.on('unhandledRejection', err => {
12 | throw err;
13 | });
14 |
15 | // Ensure environment variables are read.
16 | require('../config/env');
17 |
18 | const jest = require('jest');
19 | let argv = process.argv.slice(2);
20 |
21 | // Watch unless on CI or in coverage mode
22 | if (!process.env.CI && argv.indexOf('--coverage') < 0) {
23 | argv.push('--watch');
24 | }
25 |
26 |
27 | jest.run(argv);
28 |
--------------------------------------------------------------------------------
/docs-src/features.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | name: 🚏 Features
3 | route: /features
4 | ---
5 |
6 | # 🚏 Features
7 |
8 | CSDP has several feature options available when scaffolding out your plugin.
9 |
10 | These cover any necessary additional build commands and boilerplate.
11 |
12 | ## OBS
13 |
14 | By selecting this feature, CSDP will scaffold out some some of the events and code for connecting to obs-websocket.
15 |
16 | You must have obs-websocket installed as a plugin into OBS. You can find the relevant Releases here on Github:
17 |
18 | [https://github.com/Palakis/obs-websocket/releases](https://github.com/Palakis/obs-websocket/releases)
19 |
20 | ## Spotify (in progress)
21 |
22 | There is currently a feature option for Spotify being worked on. It is not ready for release yet, but some of its references may be found in the cli tool and code (during the alpha testing of this CSDP).
23 |
--------------------------------------------------------------------------------
/templates/base/example/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Actions": [
3 | {
4 | "Icon": "action/images/actionimage",
5 | "Name": "<%% camelizedProjectName %%>",
6 | "States": [
7 | {
8 | "Image": "action/images/action"
9 | }
10 | ],
11 | "Tooltip": "This is an example tooltip",
12 | "UUID": "com.<%% projectNamespace %%>.<%% camelizedProjectName %%>.action"
13 | }
14 | ],
15 | "SDKVersion": 2,
16 | "Author": "Elgato Systems",
17 | "CodePath": "code.html",
18 | "PropertyInspectorPath": "propertyinspector/index.html",
19 | "Description": "Example description",
20 | "Name": "<%% camelizedProjectName %%>",
21 | "Icon": "action/images/action",
22 | "URL": "",
23 | "Version": "1.0.0",
24 | "OS": [
25 | {
26 | "Platform": "mac",
27 | "MinimumVersion": "10.11"
28 | },
29 | {
30 | "Platform": "windows",
31 | "MinimumVersion": "10"
32 | }
33 | ],
34 | "Software": {
35 | "MinimumVersion": "4.1"
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/templates/base/example/config/polyfills.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | if (typeof Promise === 'undefined') {
4 | // Rejection tracking prevents a common issue where React gets into an
5 | // inconsistent state due to an error, but it gets swallowed by a Promise,
6 | // and the user has no idea what causes React's erratic future behavior.
7 | require('promise/lib/rejection-tracking').enable();
8 | window.Promise = require('promise/lib/es6-extensions.js');
9 | }
10 |
11 | // fetch() polyfill for making API calls.
12 | require('whatwg-fetch');
13 |
14 | // Object.assign() is commonly used with React.
15 | // It will use the native implementation if it's present and isn't buggy.
16 | Object.assign = require('object-assign');
17 |
18 | // In tests, polyfill requestAnimationFrame since jsdom doesn't provide it yet.
19 | // We don't polyfill it in the browser--this is user's responsibility.
20 | if (process.env.NODE_ENV === 'test') {
21 | require('raf').polyfill(global);
22 | }
23 |
--------------------------------------------------------------------------------
/docs-src/home.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | name: 🏠 About
3 | route: /
4 | ---
5 |
6 |
16 |
17 | #  create-streamdeck-plugin
18 |
19 | This CLI tool scaffolds out a starter plugin for the Elgato StreamDeck. Throughout these docs you will find it referenced as CSDP (C ~~reate-~~ S ~~tream~~ D ~~eck-~~ P ~~lugin~~).
20 |
21 | ## Why?
22 |
23 | Copying and pasting or cloning the plugin example from Github does not give you the full process needed to build, test, and deploy a custom plugin.
24 |
25 | ## There Be ~~Dragons~~ React
26 |
27 | This tool scaffold the plugin using a React based set of components and build processes. Those components can be found in this repo:
28 |
29 | [https://cmgriffing.github.io/react-streamdeck](https://cmgriffing.github.io/react-streamdeck)
30 |
--------------------------------------------------------------------------------
/src/gatsby-theme-docz/Logo/logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
14 |
--------------------------------------------------------------------------------
/docs-src/gatsby-theme-docz/Logo/logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
14 |
--------------------------------------------------------------------------------
/templates/base/example/public/propertyinspector/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 | com.<%% projectNamespace %%>.<%% projectName %%> Property Inspector
12 |
13 |
14 |
15 |
16 |
17 | <%% #extraFeatures.obs %%>
18 |
19 | <%% #shouldShowVerboseExampleComments %%>
20 |
21 | <%% /shouldShowVerboseExampleComments %%>
22 |
23 | <%% /extraFeatures.obs %%>
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/templates/base/example/scripts/dev.js:
--------------------------------------------------------------------------------
1 | const os = require("os");
2 | const child_process = require("child_process");
3 | const fs = require("fs-extra");
4 |
5 | const platforms = {
6 | win32: {
7 | pluginsFolderPath: `${os.homedir()}\\AppData\\Roaming\\Elgato\\StreamDeck\\Plugins\\`,
8 | },
9 | darwin: {
10 | pluginsFolderPath: `${os.homedir()}/Library/Application\\ Support/com.elgato.StreamDeck/Plugins/`,
11 | },
12 | };
13 |
14 | const currentPlatform = platforms[os.platform()];
15 |
16 | if (!currentPlatform) {
17 | console.error(
18 | "Current Platform not supported. Supported platforms are: 'win32', 'darwin'"
19 | );
20 | process.exit(-1);
21 | }
22 | switch (os.platform()) {
23 | case "darwin":
24 | child_process.execSync(
25 | `cp -R build/com.<%%projectNamespace%%>.<%%camelizedProjectName%%>.sdPlugin ${currentPlatform.pluginsFolderPath}/`
26 | );
27 | break;
28 | case "win32":
29 | fs.copySync(
30 | "build/com.<%%projectNamespace%%>.<%%camelizedProjectName%%>.sdPlugin",
31 | `${currentPlatform.pluginsFolderPath}\\com.<%%projectNamespace%%>.<%%camelizedProjectName%%>.sdPlugin`
32 | );
33 | break;
34 |
35 | default:
36 | console.error(
37 | "Current Platform not supported. Supported platforms are: 'win32', 'darwin'"
38 | );
39 | process.exit(-1);
40 | }
41 |
--------------------------------------------------------------------------------
/templates/base/example/public/propertyinspector/css/elg_calendar.svg:
--------------------------------------------------------------------------------
1 |
25 |
--------------------------------------------------------------------------------
/docs-src/deployment.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | name: 🛥️ Distribution
3 | route: /deployment
4 | ---
5 |
6 | # 🛥️ Distribution
7 |
8 | To distribute the aplpication, you can run:
9 |
10 | ```
11 | yarn export
12 | ```
13 |
14 | This runs a production build and uses the official Streamdeck `DistributionTool` for your platform.
15 |
16 | You can find these tools here as well if you would like to use them manually:
17 |
18 | [https://developer.elgato.com/documentation/stream-deck/sdk/exporting-your-plugin/](https://developer.elgato.com/documentation/stream-deck/sdk/exporting-your-plugin/)
19 |
20 | ## Distribution On the Store
21 |
22 | Elgato has an internal "store" within the StreamDeck software.
23 |
24 | There is currently no Developer Portal for submitting to the store in an automated way. See here to stay up to date with Elgato's changes on this front:
25 |
26 | [https://developer.elgato.com/documentation/stream-deck/sdk/distribution-on-the-store/](https://developer.elgato.com/documentation/stream-deck/sdk/distribution-on-the-store/)
27 |
28 | ## Distribution On Your Website
29 |
30 | You are welcome to distribute the `.streamDeckPlugin` file on your own site.
31 |
32 | [https://developer.elgato.com/documentation/stream-deck/sdk/distribution-on-your-website/](https://developer.elgato.com/documentation/stream-deck/sdk/distribution-on-your-website/)
33 |
34 | ## Unofficial Index
35 |
36 | There is an unofficial collection of streamdeck plugins available here:
37 |
38 | [https://streamdeck-plugins.com/](https://streamdeck-plugins.com/)
39 |
40 | Instructions for adding your plugin to the unofficial list can be found here:
41 |
42 | [https://streamdeck-plugins.com/developers](https://streamdeck-plugins.com/developers)
43 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "create-streamdeck-plugin",
3 | "version": "0.0.18",
4 | "license": "MIT",
5 | "bin": "cli.js",
6 | "repository": "cmgriffing/create-streamdeck-plugin",
7 | "engines": {
8 | "node": ">=8"
9 | },
10 | "scripts": {
11 | "test": "xo && ava",
12 | "docz:dev": "docz dev",
13 | "docz:build": "docz build",
14 | "docz:serve": "docz build && docz serve",
15 | "docz:deploy": "yarn docz:build && gh-pages -d docs"
16 | },
17 | "files": [
18 | "cli.js",
19 | "ui.js",
20 | "templates",
21 | "utils"
22 | ],
23 | "dependencies": {
24 | "camelize": "^1.0.0",
25 | "cli-spinners": "^2.2.0",
26 | "fs-extra": "^8.1.0",
27 | "glob": "^7.1.6",
28 | "import-jsx": "^3.1.0",
29 | "ink": "2.6.0",
30 | "ink-big-text": "^1.0.1",
31 | "ink-box": "^1.0.0",
32 | "ink-gradient": "^1.0.0",
33 | "ink-multi-select": "^1.1.2",
34 | "ink-select-input": "^3.1.2",
35 | "ink-spinner": "^3.0.1",
36 | "ink-text-input": "^3.2.2",
37 | "meow": "^6.0.1",
38 | "mustache": "^4.0.0",
39 | "prop-types": "^15.7.2",
40 | "react": "^16.13.1"
41 | },
42 | "devDependencies": {
43 | "@babel/preset-react": "^7.8.3",
44 | "@babel/register": "^7.8.6",
45 | "ava": "^3.5.0",
46 | "chalk": "^3.0.0",
47 | "docz": "^2.3.1",
48 | "eslint-config-xo-react": "^0.23.0",
49 | "eslint-plugin-react": "^7.19.0",
50 | "eslint-plugin-react-hooks": "^2.5.0",
51 | "gh-pages": "^1.2.0",
52 | "ink-testing-library": "^1.0.3",
53 | "react-dom": "^16.13.1",
54 | "xo": "^0.28.0"
55 | },
56 | "ava": {
57 | "require": [
58 | "@babel/register"
59 | ]
60 | },
61 | "babel": {
62 | "presets": [
63 | "@babel/preset-react"
64 | ]
65 | },
66 | "xo": {
67 | "extends": "xo-react"
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/docs-src/guide.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | name: 🗺️ Getting Started
3 | route: /getting-started
4 | ---
5 |
6 | # 🗺️ Getting Started
7 |
8 | Here we will help guide you through the usage of the CLI tool.
9 |
10 | ## Running the command
11 |
12 | To run the command we recommend using `npx`:
13 |
14 | ```
15 | npx create-streamdeck-plugin
16 | ```
17 |
18 | This will ensure that you are always running the latest version.
19 |
20 | ### Or Global
21 |
22 | You can also install it globally, if you insist:
23 |
24 | ```
25 | yarn global create-streamdeck-plugin
26 | ```
27 |
28 | or
29 |
30 | ```
31 | npm install -g create-streamdeck-plugin
32 | ```
33 |
34 | Then just run it:
35 |
36 | ```
37 | create-streamdeck-plugin
38 | ```
39 |
40 | ## The Interactive Steps
41 |
42 | When running the command this tool currently only supports a guided creation process. In the future, it will allow an automated workflow via cli arguments.
43 |
44 | ### Step 1: Project Name
45 |
46 | This value is used in various places. We handle various cases as needed for injecting the name within the app. eg: dasherized, camelCased, and PascalCased.
47 |
48 | ### Step 2: Project Path
49 |
50 | The default value is dasherized form your project name as a subfolder of your current path. You can modify this value as you see fit. eg: Pointing at the current directory would be `./`
51 |
52 | ### Step 3: Project Features
53 |
54 | At this step you can select some of the boilerplate that can be autofilled for you. OBS, Spotify, and more on the way.
55 |
56 | ### Step 4: Scaffolding Finished
57 |
58 | Hooray! You are done. Navigate to the path you installed into in [Step 2](#step-2-project-path) and open your favorite editor.
59 |
60 | See [Development](./development) for the next steps.
61 |
--------------------------------------------------------------------------------
/templates/base/example/config/paths.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | const path = require("path");
4 | const fs = require("fs");
5 | const url = require("url");
6 |
7 | // Make sure any symlinks in the project folder are resolved:
8 | // https://github.com/facebookincubator/create-react-app/issues/637
9 | const appDirectory = fs.realpathSync(process.cwd());
10 | const resolveApp = (relativePath) => path.resolve(appDirectory, relativePath);
11 |
12 | const envPublicUrl = process.env.PUBLIC_URL;
13 |
14 | function ensureSlash(path, needsSlash) {
15 | const hasSlash = path.endsWith("/");
16 | if (hasSlash && !needsSlash) {
17 | return path.substr(path, path.length - 1);
18 | } else if (!hasSlash && needsSlash) {
19 | return `${path}/`;
20 | } else {
21 | return path;
22 | }
23 | }
24 |
25 | const getPublicUrl = (appPackageJson) =>
26 | envPublicUrl || require(appPackageJson).homepage;
27 |
28 | // We use `PUBLIC_URL` environment variable or "homepage" field to infer
29 | // "public path" at which the app is served.
30 | // Webpack needs to know it to put the right
161 |
162 |