• Stars
    star
    1,123
  • Rank 39,725 (Top 0.9 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 8 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Status Build Status BrowserStack Status

Glimmer is a flexible, low-level rendering pipeline for building a "live" DOM from Handlebars templates that can subsequently be updated cheaply when data changes.

It is written in TypeScript.

The project is still going through rapid changes at the moment. For the time being, please refer the architecture overview for more information.

Building Glimmer

  1. Ensure that Node.js is installed.
  2. Run npm install or yarn install to ensure the required dependencies are installed.
  3. Run npm run build to build each Glimmer package. The builds will be placed in the dist/ directory.

Glimmer's packages are only built when running npm run build (or ember build --env production). If you run ember build without setting the production environment, dist/ will only contain test assets.

If you want to use the built packages in other projects, you can use npm run yarn:link to execute the yarn link command inside each built package. (You must build the packages first with npm run build).

How to Run Tests

Via Ember CLI

  1. Run: ember test --server

Ember CLI is a CI tool, so it will run tests as you change files.

On the console with PhantomJS

  1. Run npm test.

In a browser

  1. Run npm start.
  2. Visit http://localhost:7357/tests/.

TypeScript Notes

"Friend" Properties and Methods

In TypeScript, private and protected refer to the class itself (and its subclasses).

Sometimes, you want to add a property or method that shouldn't be considered part of the external API (for other packages or Ember) but is expected to be used as part of an internal protocol.

In that case, it's ok to mark the property as private or protected and use ['property'] syntax to access the property inside of the same package.

class Layout {
  private template: Template;
}

function compile(layout: Layout, environment: Environment): CompiledBlock {
  return layout['template'].compile(environment);
}

The idea is that the compile function might as well be a private method on the class, but because the function leaks into untyped code, we want to be more careful and avoid exporting it.

Other use-cases might include protocols where a cluster of classes is intended to work together internally, but it's difficult to describe as a single class hierarchy.

This is a semi-blessed workflow according to the TypeScript team, and Visual Studio Code (and tsc) correctly type check uses of indexed properties, and provide autocompletion, etc.

You should not treat use of ['foo'] syntax as license to access private properties outside of the package.


Cross-browser testing provided by:

BrowserStack

More Repositories

1

glimmer.js

Central repository for the Glimmer.js project
TypeScript
746
star
2

glimmer-website

Website for the Glimmer.js project
CSS
78
star
3

glimmer-experimental

A set of experimental high-level APIs built on Glimmer.js
TypeScript
58
star
4

glimmer-component

[MOVED] This package is now part of the Glimmer.js monorepo
51
star
5

glimmer-di

TypeScript
42
star
6

glimmer-demos

A collection of benchmark demos.
CSS
41
star
7

todomvc-demo

An implementation of TodoMVC
TypeScript
40
star
8

glimmer-web-component

Library to boot up your Glimmer components as Web Components
TypeScript
30
star
9

glimmer-application

[MOVED] This package is now part of the Glimmer.js monorepo
30
star
10

glimmer-blueprint

[MOVED] This package is now part of the Glimmer.js monorepo
25
star
11

broccoli-rust2wasm

A Broccoli Plugin for compiling Rust to WebAssembly
TypeScript
23
star
12

glimmer-application-pipeline

Tooling for developing Glimmer standalone apps with ember-cli
TypeScript
21
star
13

glimmer-playground

Interactive web playground for writing and running Glimmer components
TypeScript
17
star
14

glimmer-build

Build tooling for Glimmer packages.
JavaScript
10
star
15

glimmer-api-docs

API documentation viewer
CSS
8
star
16

hello-glimmer

JavaScript
8
star
17

glimmer-resolver

TypeScript
7
star
18

glimmer-embedding-tutorial

A simplistic example of a Glimmer embedding environment to explain how the embedding APIs work
TypeScript
6
star
19

resolution-map-builder

JavaScript
4
star
20

glimmer-inline-precompile

JavaScript
3
star
21

glimmer-env

Stubs for glimmer application environment variables
TypeScript
2
star
22

glimmer-test-helpers

Test helpers for Glimmer applications
TypeScript
2
star
23

glimmer-blueprint-output

The generated output of `ember new my-app -b @glimmer/blueprint`.
1
star
24

babel-plugin-glimmer-inline-precompile

JavaScript
1
star
25

glimmer-bench

Benchmarking Suite For Glimmer
JavaScript
1
star
26

glimmer-application-test-helpers

[MOVED] This package is now part of the Glimmer.js monorepo
1
star
27

babel-plugin-import-helpers

Make helpers named imports instead of global member expression
JavaScript
1
star
28

babel-helpers

Babel helpers patched to support copy style static inheritance for IE >= 10
JavaScript
1
star
29

resolver-configuration-builder

JavaScript
1
star
30

glimmer-compat

Fully supported compatibility layer for legacy browsers and deprecated constructs needed for Ember
1
star