Typescript ScriptUI starter template. Run as a resizable ScriptUI Panel, headless, or from Kbar.
Includes:
- JSON
- Footer info system
- Simplified button stack building
- Clone the repo without history
git clone --depth 1 https://github.com/adamplouff/necropolis.git newProjName
or use Degit to clone without an origin:
degit https://github.com/adamplouff/necropolis.git
- Open the project in VS Code and CMD+Shift+F to replace
Necropolis
to your new project name. It's low-tech and simple.
Update these to change the footer.
const scriptName = 'Necropolis'
const scriptVersion = '0.1.0'
const releaseYear = '2021'
const author = 'Battle Axe'
const helpURL = 'https://battleaxe.co/'
releaseYear
will create a copyright range from the first release to the current year, or a single year if the release and current years match.helpURL
becomes the link in the [ ? ] button. Remove or leave blank to remove this link.
Within the buildUI()
function, is an array of button objects. Add new buttons with a reference to the func they should call as strings.
const buildUI = () => {
const buttons = [
{
text: 'Do cool shit',
func: 'mainFunc()',
helpTip: 'This is a tooltip'
},
]
...
A template for Kbar arguments is included.
switch (button.argument.toLowerCase()) {
case 'run': // Kbar argument name
mainFunc()
break;
default:
buildUI()
break;
}
(thanks to Tom Scharstein)
- Updates semantic versioning in:
package.json
scriptVersion
variable in host.ts
(thanks to Remco Janssen)
- Converts
./dist/ProjectName.jsx
to jsxbin - Creates a
manual.url
file linking to thedocsUrl
in package.json - Zips up all the files as
ProjectName_0.1.0.zip
into./archive/
- ProjectName.jsx
- ProjectName manual.url
- All files in
./Package/