Skip to content

Commit

Permalink
feat: add helpful information to template files
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Van Camp committed Jul 11, 2018
1 parent 037961d commit 0d9af8f
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 1 deletion.
7 changes: 6 additions & 1 deletion generators/extension/templates/extension.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
'use strict';

module.exports = function (nodecg) {

nodecg.log.info('Hello, from your bundle\'s extension!');
nodecg.log.info('I\'m where you put all your server-side code.');
nodecg.log.info(`To edit me, open "${__filename}" in your favorite text editor or IDE.`);
nodecg.log.info('You can use any libraries, frameworks, and tools you want. There are no limits.');
nodecg.log.info('Visit https://nodecg.com for full documentation.');
nodecg.log.info('Good luck!');
};
28 changes: 28 additions & 0 deletions generators/graphic/templates/graphic.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,36 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
font-family: sans-serif;
}

.monospace {
font-family: monospace;
}
</style>
</head>
<body>
<p>
Hello, I'm one of the graphics in your bundle!
I'm where you put the graphics you want to run in your broadcast software!
</p>

<p>To edit me, open "<span id="path" class="monospace"></span>" in your favorite text editor or IDE.</p>

<p>You can use any libraries, frameworks, and tools you want. There are no limits.</p>

<p>Visit <a href="https://nodecg.com" target="_blank" rel="noopener">https://nodecg.com</a> for full documentation.</p>

<p>Have fun!</p>

<script>
document.getElementById('path').textContent = `nodecg${window.location.pathname}`;

// You can access the NodeCG api anytime from the `window.nodecg` object
// Or just `nodecg` for short. Like this!:
nodecg.log.info('Here\'s an example of using NodeCG\'s logging API!');
</script>
</body>
</html>
28 changes: 28 additions & 0 deletions generators/panel/templates/panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,36 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
.monospace {
font-family: monospace;
}
</style>
</head>
<body>
<p>
Hello, I'm one of the panels in your bundle!
I'm where you put your controls.
</p>

<p>To edit me, open "<span id="path" class="monospace"></span>" in your favorite text editor or IDE.</p>

<p>
You can use any libraries, frameworks, and tools you want.
The only limit of panels is that they cannot render outside of their
<span class="monospace">&lt;iframe&gt;</span>'s bounding box.
</p>

<p>Visit <a href="https://nodecg.com" target="_blank" rel="noopener">https://nodecg.com</a> for full documentation.</p>

<p>You've got this!</p>

<script>
document.getElementById('path').textContent = `nodecg${window.location.pathname}`;

// You can access the NodeCG api anytime from the `window.nodecg` object
// Or just `nodecg` for short. Like this!:
nodecg.log.info('Here\'s an example of using NodeCG\'s logging API!');
</script>
</body>
</html>

0 comments on commit 0d9af8f

Please sign in to comment.