writescript

package module
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2015 License: MIT Imports: 6 Imported by: 0

README

writescript Build Status Coverage Status GoDoc

plugin based generator tool backpacked with data

Installation

go get github.com/writescript/writescript ...

Usage

writescript -p theplugin.js -d mydata.json

Status

The project is in alpha stage. Do not use in production!

License

This code is published under an MIT license. See LICENSE file for more information.

Documentation

Index

Constants

View Source
const (
	KEYWORD_IMPORT = "#import "
)
View Source
const Version = "0.2.2"

Version of the script engine.

Variables

This section is empty.

Functions

func CreateVMScript

func CreateVMScript(plugin, data string) string

CreateVMScript creates the javascript script core wrapper.

func PluginIsValueInList

func PluginIsValueInList(value string, list []string) bool

func PluginParseSource

func PluginParseSource(src string) ([]string, []string, []string, error)

func PluginRequest

func PluginRequest(url string) ([]byte, error)

Types

type Plugin

type Plugin struct {
	ImportURLs      []string
	ImportCodeStack []string
	Js              []string // here we store the main plugin code
}

func (*Plugin) Init

func (p *Plugin) Init(src string) (err error)

type WriteScript

type WriteScript struct {
	Content textbackend.TextContent // create output storage the plugin can write content to
}

WriteScript Core

func (*WriteScript) Process

func (w *WriteScript) Process(plugin, data string, headerOn bool) error

Process the plugin generator.

Directories

Path Synopsis
cmd
writescript command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL