0.2.3 • Published 9 years ago

dilithium v0.2.3

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

==< dilithium: li2 >==

dilithium

Dart Library - use yaml to configure play_phaser assets.

Dart Framework Classes

  • Dilithium - Game application class
  • Li2Assets - * load assets listed in config.yaml
  • Li2Boot - * set device params, load splash screen
  • Li2Button - Button+Text component
  • Li2Config - ** Wraps the config.yaml
  • Li2State - Add dilithium methods to the State class
  • Li2Template - Wraps the embedded Liquid Template engine

    • = Auto invoked by dilithium ** = Populated by dilithium

li2

A project template generator using Liquid templates. Li2 was created to generate dilithium projects but could be used for many other programming languages.

Think jekyll, but for code.

Currently, there are 5 templates:

  • default - a port of phaser_tutorial_02 to dart
  • dartemis - a port of phaser_tutorial_02 using dartemis
  • dilithium - an empty scaffold using dilithium
  • match3 - demo game using dilithium
  • coffee/pirate - demo in coffee-script

Quickstart

Install

$ sudo npm install dilithium -g

Create a new Dart project

$ li2 create game -t default
$ cd game
$ pub get
$ pub serve

Inject yaml config into application:

void main() {

  Dilithium
  .using("packages/appname/res")
  .then((config) => new App(config));

}

class App extends Dilithium {

  App(config) : super(config);

}

Usage

Usage:
  li2 create PATH [project -t name | <path>]
  li2 set --option "value"
  li2 set --source +.java --source -.dart

  set values are saved in ~/.dilithium.json

Options:
  -h  [--help]        # display this message
  -t  [--template]    # new project template, defaults to 'default'
  -v  [--version]     # display version
  -a  [--author]      # set author
  -c  [--copyright]   # set copyright
  -d  [--description] # set description
  -l  [--license]     # set license text
  -s  [--source]      # set filetype to be source template
  -w  [--webpage]     # set home page

What Next?

Copy /usr/lib/node_modules/dilithium/templates/default somewhere, and make your own template. Use flag --template path/to/template to specify your custom template.

Templates use Liquid syntax. The following variables are available:

  • project.name
  • project.libname
  • project.author
  • project.copyright
  • project.description
  • project.homepage
  • project.license
  • project.source

Templates can be used in path names. For example, in a project named 'Demo', a template file named {{project.name}}.dart is transformed into Demo.dart

0.2.3

9 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.17

10 years ago

0.1.16

10 years ago

0.1.15

10 years ago

0.1.14

10 years ago

0.1.13

10 years ago

0.1.12

10 years ago

0.1.11

10 years ago

0.1.10

10 years ago

0.1.9

10 years ago

0.1.8

10 years ago

0.1.7

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.0

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago