firescript
Firescript transpiler
Last updated 4 months ago by andifeind .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install firescript 
SYNC missed versions from official npm registry.

Firescript

======= Build Status

Firescript is a language which gets transpiled into Javascript. A language which uses indention for block scoping, has a clear and strict syntax, it supports dynamic typing and it's lesser code to write. The transpiled output is clean and readable Javascript.

Syntax

import Fruits from './fruits'

class Banana extends Fruits
  constructor ()
    super()

    this.name = 'Banana'
    this.color = 'yellow'

  getName ()
    return this.name

  setName (str name)
    return this.name = name

export Banana
import Banana from './banana'

const banana = new Banana()
print(banana.getName())

Requirements

Firescript requires Node.js 8 or higher.

Install

There are two options to install firescript. The most common option is to install it globaly using npm.

npm install -g firescript

We recommend to install firescript localy. This installs an executable in ./node_modules/.bin which makes Firescript accessable for NPM. Adding ../node_modules/.bin to yout $PATH in your .bashrc makes the Firescript CLI executable by the command fire from the project root.

npm install firescript

Firescript is accessable on commandline by using the fire command.

Usage

Command Line

Firescript comes with a commandline. If you've installed Firescript globally, you should have access to it by the fire command. Run fire help to get an overview of all available sub-commands or run fire help <command> to get a command's help page.

Commands

Command Description
build Transpiles all .fire files and copies assets, reads project configuration from .firerc.json
copy Copies all assets, configured in .firerc.json by copy option to dest folder
init Initialize new Firescript project at current working dir
help Print a command overview
parse Parse a .fire or .js file into an AST tree
tokenize Tokenize a .fire or a .js file
transpile Transpiles a .fire file into Javascript or a .js file into Firescript
watch Watch src dir for changes und transpiles changed .fire files

Getting started

Create a Firescript project by using the init command. Create a project folder, change into it and run fire init to initialize a Firescript project.

mkdir ~/Projects/myfsproject
cd myfsproject
fire init

You'll find a .firerc.json file within your project folder. This file contains build and feature configuration.

Firescript uses .fire as file extension. The build command transpiles all .fire files found in the source folder and writes the output to the destination folder. All other file are being ignored during the build process.

Use the Firescript Example project to play a little with it.

Code transpilation

Run fire build to build the project. The fire watch command re-transpiles files when their content changes. Both commands overwriting existing files without prompting.

Author

Andi Heinkelein andifeind@noname-media.com

License

Firescript is licensed under the MIT license.
See LICENSE.md

Current Tags

  • 0.12.1                                ...           latest (4 months ago)

50 Versions

  • 0.12.1                                ...           4 months ago
  • 0.12.0                                ...           7 months ago
  • 0.11.1                                ...           8 months ago
  • 0.11.0                                ...           9 months ago
  • 0.10.1                                ...           9 months ago
  • 0.10.0                                ...           9 months ago
  • 0.9.17                                ...           10 months ago
  • 0.9.16                                ...           a year ago
  • 0.9.15                                ...           a year ago
  • 0.9.14                                ...           a year ago
  • 0.9.13                                ...           a year ago
  • 0.9.12                                ...           a year ago
  • 0.9.11                                ...           a year ago
  • 0.9.10                                ...           a year ago
  • 0.9.9                                ...           a year ago
  • 0.9.8                                ...           a year ago
  • 0.9.7                                ...           a year ago
  • 0.9.6                                ...           a year ago
  • 0.9.5                                ...           a year ago
  • 0.9.4                                ...           a year ago
  • 0.9.3                                ...           a year ago
  • 0.9.2                                ...           a year ago
  • 0.9.1                                ...           a year ago
  • 0.9.0                                ...           a year ago
  • 0.8.5                                ...           a year ago
  • 0.8.4                                ...           a year ago
  • 0.8.3                                ...           a year ago
  • 0.8.2                                ...           a year ago
  • 0.7.1                                ...           2 years ago
  • 0.7.0                                ...           2 years ago
  • 0.6.2                                ...           2 years ago
  • 0.6.1                                ...           2 years ago
  • 0.6.0                                ...           2 years ago
  • 0.5.0                                ...           2 years ago
  • 0.4.1                                ...           2 years ago
  • 0.4.0                                ...           2 years ago
  • 0.3.5                                ...           2 years ago
  • 0.3.4                                ...           2 years ago
  • 0.3.2                                ...           2 years ago
  • 0.3.1                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.5                                ...           2 years ago
  • 0.2.4                                ...           2 years ago
  • 0.2.3                                ...           2 years ago
  • 0.2.2                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 4
Dependencies (11)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |