Giter Site home page Giter Site logo

necropolis's Introduction

Necropolis

Typescript ScriptUI starter template. Run as a resizable ScriptUI Panel, headless, or from Kbar.

Includes:

  • JSON
  • Footer info system
  • Simplified button stack building

Documentation

Getting started

  1. 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   
  1. Open the project in VS Code and CMD+Shift+F to replace Necropolis to your new project name. It's low-tech and simple.

Main variables

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.

Buttons

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'
        },
    ]
...

Kbar support

A template for Kbar arguments is included.

switch (button.argument.toLowerCase()) {
    case 'run':     // Kbar argument name
        mainFunc()
        break;

    default:
        buildUI()
        break;
}

Scripts

(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 the docsUrl 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/

necropolis's People

Contributors

adamplouff avatar

Stargazers

Pedro Labonia avatar Christopher Bernal avatar Steve Kirby avatar Frédéric BERRIA avatar  avatar Martin Lindberg avatar Youssef El Zein avatar chvndler avatar Tim Haywood avatar songZ avatar O/I avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.