pheasant 0.1.0-grade copy "pheasant: ^0.1.0-grade" to clipboard
pheasant: ^0.1.0-grade copied to clipboard

The Pheasant Framework is a progressive, fast-reload, modern frontend web framework that allows you to make powerful web applications in Dart.

Pheasant #

Pub Version Pub Publisher

Pheasant is a modern-day, progressive, fast-reload, powerful frontend web framework written, and operated with in the Dart Language, with support for JavaScript. It grants all the features of modern web development (Web Components, HTML Rendering and more) with the dynamic power of Dart.

<script>
int myNum = 9;

void addNum() {
    myNum++;
}
</script>

<template>
<div id="output">
    <p>Hello World, Welcome to Pheasant</p>
    <p>{{myNum}}</p>
</div>
</template>

<style syntax="scss">
$primary-color: red;

#output {
    font-family: verdana;
    color: blue;
    background-color: powderblue;
}

p {
    color: $primary-color;
}
</style>

New to Pheasant? #

Get started quickly and take the next step to making your greatest apps with this guide.

How Does It Work? #

Pheasant works by rendering components in .phs files. These files consist of three parts:

  1. The template which contains html-like syntax, backed in with special pheasant components to help easily and dynamically render code in your web app
<template>
<div id="output">
    <p>Hello World, Welcome to Pheasant</p>
    <p>{{myNum}}</p>
</div>
</template>
  1. The script which contains Dart data located inside it, which can be used in the template part for rendering
<script>
int myNum = 9;

void addNum() {
    myNum++;
}
</script>
  1. The style which contains either global or local styling for the template components
<style syntax="scss">
$primary-color: red;

#output {
    font-family: verdana;
    color: blue;
    background-color: powderblue;
}

p {
    color: $primary-color;
}
</style>

Using this Package #

This package is very minimal, and depends on the functionality of it's children packages - pheasant_temp; the templating engine, pheasant_assets; the styles and assets engine, pheasant_build; the build system, and pheasant_meta; the metadata package. This package itself only provides an api to work with the functionality used and exposed by these packages.

The main library found and used in every main entry page is the pheasant library, which acts as an api library to expose the createApp function, a function used to create and render the Pheasant Application.

import 'package:pheasant/pheasant.dart';

import 'package:<your-lib>/main.phs.dart';

void main() {
    createApp(App);
}

The second library used in the project is the build library, which is not mainly used by the end user, but is imported and used in all compiled/generated files rendered by the framework (used in the compiled dart code generated from Pheasant Files, and the main entry file main.phs.dart).

In future versions, other libraries will be created to expose etra functionality such as support for making plugins, libraries and much more.

Resources #

If you have any issues, suggestions, or bigger ideas that may not be properly encapsulated in github, send me an email.

This package uses the MIT License.

6
likes
130
points
74
downloads

Publisher

verified publishertech.nugegroup.com

Weekly Downloads

The Pheasant Framework is a progressive, fast-reload, modern frontend web framework that allows you to make powerful web applications in Dart.

Repository (GitHub)
View/report issues
Contributing

Topics

#pheasant #web #framework

Documentation

API reference

License

MIT (license)

Dependencies

html, pheasant_build, pheasant_temp

More

Packages that depend on pheasant