Giter VIP home page Giter VIP logo

tagscript's Introduction

beta

tagscript

Easy to use Templating system. Let your user's write scripts themselves

Install

	npm i @typicalninja21/tagscript

Docs

Docs are available at here

Usage

All of these Examples are in Typescript If you want to use Javascript you will have to convert the example's to javascript

  • Base Code: This is the base code needed for below examples
import { Parser } from '@typicalninja21/tagscript'

const parser = new Parser();

// get a new Context
const ctx = parser.getNewCtx();

All in one

Below is a full complete script to showcase the features of this package, you can see below for more specific examples

// ctx is defined in above base snippet
// choose() is a default function, you will have to apply it
// process and its sub property is a default function, you will have to apply it
const script = `
{var = 'string'}
{"var is defined as $(var)"}
{func = choose('today is great'; 'today is bad')}
{"is today great? $(func)"}
{randomOfRandom = choose(func; 'idk')}
{"Random of Random is $(randomOfRandom)"}
`

// use the parse function
ctx.parse(script).then(console.log).catch(console.log)

Using from the web

We offer a web bundle that is bundled with webpack and is available at the following cdns

  • If possible download this and host on your own website (recommended)
  • If not just directly use one of the following cdns (not recommended):

jsdelivr (recommended)

statically

Live Demo / Tagscript Editor

You can find a Live Demo / Tagscript Editor here

The editor utilizes the web bundle

Extensions

Yess, this library allows you to extend it's functionality without directly interacting with the source code

here is A simple Guide on this Subject

Click for guide

Optimizing / Providing Pre gen static Data

You can click here for guide on this topic or Click here for guide

User Guide

A Complete guides for users wanting to write their own scripts can be found here

Or Click here

Support

This package was made for my own discord bot's (axix v2) custom commands / tags system

  • If you need support for this package, please join the support server

tagscript's People

Contributors

typicalninja avatar

Stargazers

 avatar

Watchers

 avatar

tagscript's Issues

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.