Skip to content

Commit

Permalink
Initial Commit from Ember CLI v3.0.0
Browse files Browse the repository at this point in the history
                                                        _...,
                                                     ,:^;,...;
              -+===;.         ,,--++====++-,,,     .:  /.....,
            :::::~+++++#:,+#++++++++++++++++++#*..:   /,......
           (,,,,,,::=+++##++++++++++++++++++++++#.   :....../
            ...,,,,,::++++++++++++++++++++++++++++++*..,...:
            *..+...,#@@@@@@@@@++++++++++++++++++++++#*....*
              @#,;##############@@@+*+#@@@@@@@@@@#*++#..<
              *@##@@+,-*^^^*-+@####@@@######@@@#####@@,,,+
                @#@*            @#@@@@#@@+--*^^*--#@@@@@@#
                @#@.    @#      @##+++@#,           .@@#@@
                 #@#    @@     +@@++++#@@     @@     :@@
                 :@#*         @#@++++++@#*    #@     @@+
                :*+@@#;,.__.+@#@+,-^^.++@#          @@++
               ;*  :*@@@##@@@@;++r._j^.+@##@+,.__,,@@++.
              /*    ........+++++++++++++#@@@@@###@@#++++,
            ,:       ...,@@@#++===----==@@@####,,....+++++
           .:       ......@@##@\   ;   :@####@,,...... +++.
           ;       .........@###,   ;  ;xx#@;,,.....   *;+,
           |       ........,*;xxxx--^--=xxx,........   :+#;
           ;         ......,,;xxxxxxxxxxxxx;,.....     *+#
            ;          ......,::xxxx;.     ......       +.   .
             *;            .........  +###  ....       / ,. /:| ,.
               .+:             ...  ;##++##, .      ,#. (..v..;*./
                  **                ##  ###*    .:*&&&+. \.,....<,
                   #&+**==-..,,__  ;##  ###  :,*+&&&&&&&v+#&,,.._/
                  #&&&&*...,::,,.  ##; ,##* .*****;:&&&&&&&&&
                 ,+*+;~*..*** *.* ### ###* *******    *+#&;*
                                  ##,;##    ****    :,  **
         #####    ##   ###  ###,  ########       .#####   ;##  ##
        #######  ;##  #### ,###.  ##########    ########  ### ####
       ###  ###  ### ##########   ####  ####   ,##   ###  #######*
      ### ,###  ##############:   ##     ###  #### ,##   :#### ###  ##;
  ##########    ########### ##   .##    ,###  #######    ##### :######
    ######    .###### ####  ##   ###    ### ######*    :#####   ####
       #############  ####  ################    ######## ###
        #####*  *#*    #:   :###   *###*         *####    #*
  • Loading branch information
ember-tomster authored and James-Byrne committed Feb 22, 2018
0 parents commit bafd86f
Show file tree
Hide file tree
Showing 23 changed files with 292 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true


[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2

[*.hbs]
insert_final_newline = false

[*.{diff,md}]
trim_trailing_whitespace = false
3 changes: 3 additions & 0 deletions .ember-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"blueprint": "@glimmer/blueprint"
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
tmp/*
dist
3 changes: 3 additions & 0 deletions .watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignore_dirs": ["tmp", "dist"]
}
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# dublin-bus

This README outlines the details of collaborating on this Glimmer application.
A short introduction of this app could easily go here.

## Prerequisites

You will need the following things properly installed on your computer.

* [Git](https://git-scm.com/)
* [Node.js](https://nodejs.org/) (with NPM)
* [Yarn](https://yarnpkg.com/en/)
* [Ember CLI](https://ember-cli.com/)

## Installation

* `git clone <repository-url>` this repository
* `cd dublin-bus`
* `yarn`

## Running / Development

* `ember serve`
* Visit your app at [http://localhost:4200](http://localhost:4200).

### Building

* `ember build` (development)
* `ember build --environment production` (production)

## Further Reading / Useful Links

* [glimmerjs](http://github.com/tildeio/glimmer/)
* [ember-cli](https://ember-cli.com/)
10 changes: 10 additions & 0 deletions config/environment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use strict';

module.exports = function(environment) {
let ENV = {
modulePrefix: 'dublin-bus',
environment
};

return ENV;
};
11 changes: 11 additions & 0 deletions config/module-map.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* This is just a placeholder file to keep TypeScript aware editors happy. At build time,
* it will be replaced with a complete map of resolvable module paths => rolled up contents.
*/

export interface Dict<T> {
[index: string]: T;
}

declare let map: Dict<any>;
export default map;
9 changes: 9 additions & 0 deletions config/resolver-configuration.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* This is just a placeholder file to keep TypeScript aware editors happy. At build time,
* it will be replaced with a resolver configuration composed from your application's
* `config/environment.js` (and supplemented with default settings as possible).
*/

import { ResolverConfiguration } from '@glimmer/resolver';
declare var _default: ResolverConfiguration;
export default _default;
18 changes: 18 additions & 0 deletions config/targets.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use strict';

let browsers = [
'> 5%',
'last 2 Edge versions',
'last 2 Chrome versions',
'last 2 Firefox versions',
'last 2 Safari versions',
];

if (process.env.EMBER_ENV === 'test') {
browsers = [
'last 1 Chrome versions',
'last 1 Firefox versions'
];
}

module.exports = { browsers };
11 changes: 11 additions & 0 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use strict';

const GlimmerApp = require('@glimmer/application-pipeline').GlimmerApp;

module.exports = function(defaults) {
let app = new GlimmerApp(defaults, {
// Add options here
});

return app.toTree();
};
36 changes: 36 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "dublin-bus",
"version": "0.0.0",
"description": "A brand new Glimmer app.",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build -prod",
"start": "ember server",
"test": "ember test"
},
"devDependencies": {
"@glimmer/application": "^0.9.1",
"@glimmer/application-pipeline": "^0.10.0",
"@glimmer/blueprint": "~0.9.1",
"@glimmer/component": "^0.9.1",
"@glimmer/inline-precompile": "^1.0.0",
"@glimmer/resolver": "^0.4.1",
"@glimmer/test-helpers": "^0.30.3",
"@types/qunit": "^2.0.31",
"broccoli-asset-rev": "^2.5.0",
"ember-cli": "^2.14.0",
"ember-cli-dependency-checker": "^2.0.1",
"ember-cli-inject-live-reload": "^1.6.1",
"ember-cli-tslint": "^0.1.3",
"ember-cli-uglify": "^2.0.0-beta.1",
"qunitjs": "^2.3.3",
"typescript": "~2.6.0"
},
"engines": {
"node": ">= 4.0"
},
"private": true
}
3 changes: 3 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# http://www.robotstxt.org
User-agent: *
Disallow:
19 changes: 19 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { ComponentManager, setPropertyDidChange } from '@glimmer/component';
import App from './main';

const app = new App();
const containerElement = document.getElementById('app');

setPropertyDidChange(() => {
app.scheduleRerender();
});

app.registerInitializer({
initialize(registry) {
registry.register(`component-manager:/${app.rootName}/component-managers/main`, ComponentManager);
}
});

app.renderComponent('DublinBus', containerElement, null);

app.boot();
20 changes: 20 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import Application, { DOMBuilder, RuntimeCompilerLoader, SyncRenderer } from '@glimmer/application';
import Resolver, { BasicModuleRegistry } from '@glimmer/resolver';
import moduleMap from '../config/module-map';
import resolverConfiguration from '../config/resolver-configuration';

export default class App extends Application {
constructor() {
let moduleRegistry = new BasicModuleRegistry(moduleMap);
let resolver = new Resolver(resolverConfiguration, moduleRegistry);
const element = document.body;

super({
builder: new DOMBuilder({ element, nextSibling: null }),
loader: new RuntimeCompilerLoader(resolver),
renderer: new SyncRenderer(),
resolver,
rootName: resolverConfiguration.app.rootName
});
}
}
13 changes: 13 additions & 0 deletions src/ui/components/DublinBus/component-test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import hbs from '@glimmer/inline-precompile';
import { setupRenderingTest } from '@glimmer/test-helpers';

const { module, test } = QUnit;

module('Component: DublinBus', function(hooks) {
setupRenderingTest(hooks);

test('it renders', async function(assert) {
await this.render(hbs`<DublinBus />`);
assert.equal(this.containerElement.textContent, 'Welcome to Glimmer!\n');
});
});
5 changes: 5 additions & 0 deletions src/ui/components/DublinBus/component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Component from '@glimmer/component';

export default class DublinBus extends Component {

}
1 change: 1 addition & 0 deletions src/ui/components/DublinBus/template.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div><h1>Welcome to Glimmer!</h1></div>
24 changes: 24 additions & 0 deletions src/ui/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Hello Glimmer</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">

{{content-for "head"}}

<link rel="stylesheet" href="{{rootURL}}app.css">

{{content-for "head-footer"}}
</head>
<body>
{{content-for "body"}}

<div id="app"></div>
<script src="{{rootURL}}app.js"></script>

{{content-for "body-footer"}}
</body>
</html>
3 changes: 3 additions & 0 deletions src/ui/styles/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
h1 {
color: #444;
}
7 changes: 7 additions & 0 deletions src/utils/test-helpers/test-helper.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { setApp, start } from '@glimmer/test-helpers';
import App from '../../main';

QUnit.config.autostart = false;
setApp(App);
import '../../../tests';
start();
7 changes: 7 additions & 0 deletions testem.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"framework": "qunit",
"src_files": ["src/**/*"],
"serve_files": ["index.js"],
"disable_watching": true,
"launch_in_ci": ["Firefox", "Chrome"]
}
18 changes: 18 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"compilerOptions": {
"target": "es6",
"module": "es2015",
"inlineSourceMap": true,
"inlineSources": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"types": [
"qunit"
]
},
"exclude": [
"node_modules",
"tmp",
"dist"
]
}
14 changes: 14 additions & 0 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"defaultSeverity": "error",
"extends": [
"tslint:recommended"
],
"jsRules": {},
"rules": {
"quotemark": [true, "single"],
"trailing-comma": false,
"only-arrow-functions": false,
"prefer-const": false
},
"rulesDirectory": []
}

0 comments on commit bafd86f

Please sign in to comment.