dilithium
Dart project generator
Last updated 6 years ago by darkoverlordofdata .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install dilithium 
SYNC missed versions from official npm registry.

==< 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

Current Tags

  • 0.2.3                                ...           latest (6 years ago)

25 Versions

  • 0.2.3                                ...           6 years ago
  • 0.2.1                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.17                                ...           6 years ago
  • 0.1.16                                ...           6 years ago
  • 0.1.15                                ...           6 years ago
  • 0.1.14                                ...           6 years ago
  • 0.1.13                                ...           6 years ago
  • 0.1.12                                ...           6 years ago
  • 0.1.11                                ...           6 years ago
  • 0.1.10                                ...           6 years ago
  • 0.1.9                                ...           6 years ago
  • 0.1.8                                ...           6 years ago
  • 0.1.7                                ...           6 years ago
  • 0.1.4                                ...           6 years ago
  • 0.1.3                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
  • 0.0.8                                ...           6 years ago
  • 0.0.7                                ...           6 years ago
  • 0.0.6                                ...           6 years ago
  • 0.0.5                                ...           6 years ago
  • 0.0.4                                ...           6 years ago
  • 0.0.3                                ...           6 years ago
  • 0.0.2                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (2)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |