Skip to content
This repository has been archived by the owner on Jul 13, 2019. It is now read-only.

ISSUE-42 Add ember project #44

Open
wants to merge 4 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ coverage/

node_modules/


\.DS_Store
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ At this point the `create-nos-dapp` command should be available. To create a dAp
create-nos-dapp
```

It will now ask you to choose a project template and what name you'd like to give it. The CLI-tool will create the project in the current working directory.
It will now ask you to choose a project template and what name you'd like to give it. The CLI-tool will create the project in the current working directory.

#### Usage with flags

Expand All @@ -78,6 +78,7 @@ Optional arguments:

#### Getting started with the project templates
- [React Starter Kit](https://github.com/nos/create-nos-dapp/blob/template/react/packages/react)
- [Ember Starter Kit](https://github.com/nos/create-nos-dapp/tree/development/packages/ember)
- [VueJS Starter Kit (Coming soon)](https://github.com/nos/create-nos-dapp)
- [AngularJS Starter Kit (Coming soon)](https://github.com/nos/create-nos-dapp)
- [Vanilla Javascript Starter Kit (Coming soon)](https://github.com/nos/create-nos-dapp)
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"CLI",
"starter",
"react",
"ember"
"js",
"javascript"
],
Expand Down
20 changes: 20 additions & 0 deletions packages/ember/.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
10 changes: 10 additions & 0 deletions packages/ember/.ember-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
/**
Ember CLI sends analytics information by default. The data is completely
anonymous, but there are times when you might want to disable this behavior.

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false,
"usePods": true
}
18 changes: 18 additions & 0 deletions packages/ember/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/node_modules/

# misc
/coverage/
!.*

# ember-try
/.node_modules.ember-try/
/package.json.ember-try
40 changes: 40 additions & 0 deletions packages/ember/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
},
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
browser: true
},
rules: {
},
overrides: [
// node files
{
files: [
'.template-lintrc.js',
'ember-cli-build.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'lib/*/index.js'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
},
env: {
browser: false,
node: true
}
}
]
};
21 changes: 21 additions & 0 deletions packages/ember/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/

# dependencies
/node_modules/

# misc
/.sass-cache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/package.json.ember-try
5 changes: 5 additions & 0 deletions packages/ember/.template-lintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: 'recommended'
};
27 changes: 27 additions & 0 deletions packages/ember/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
language: node_js
node_js:
- "6"

sudo: false
dist: trusty

addons:
chrome: stable

cache:
directories:
- $HOME/.npm

env:
global:
# See https://git.io/vdao3 for details.
- JOBS=1

before_install:
- npm config set spin false

script:
- npm run lint:hbs
- npm run lint:js
- npm test
3 changes: 3 additions & 0 deletions packages/ember/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignore_dirs": ["tmp", "dist"]
}
57 changes: 57 additions & 0 deletions packages/ember/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# ember-app

This README outlines the details of collaborating on this Ember 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)
* [Ember CLI](https://ember-cli.com/)
* [Google Chrome](https://google.com/chrome/)

## Installation

* `git clone <repository-url>` this repository
* `cd ember-app`
* `npm install`

## Running / Development

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

### Code Generators

Make use of the many generators for code, try `ember help generate` for more details

### Running Tests

* `ember test`
* `ember test --server`

### Linting

* `npm run lint:hbs`
* `npm run lint:js`
* `npm run lint:js -- --fix`

### Building

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

### Deploying

Specify what it takes to deploy your app.

## Further Reading / Useful Links

* [ember.js](https://emberjs.com/)
* [ember-cli](https://ember-cli.com/)
* Development Browser Extensions
* [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
* [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)
17 changes: 17 additions & 0 deletions packages/ember/app/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Application from '@ember/application';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';

const App = Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver,
rootElement: '#nos-app',
LOG_TRANSITIONS: ['development', 'test'].includes(config.environment),
LOG_TRANSITIONS_INTERNAL: ['development', 'test'].includes(config.environment)
});

loadInitializers(App, config.modulePrefix);

export default App;
4 changes: 4 additions & 0 deletions packages/ember/app/application/route.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Route from '@ember/routing/route';
import { injectNOS, nosProps } from '@nosplatform/api-functions';

export default Route.extend({});
10 changes: 10 additions & 0 deletions packages/ember/app/application/template.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<header class="header">
<h1 class="title">A nOS dApp starter-kit!</h1>
{{spinning-logo}}
</header>

<p class="intro">
To get started, edit <code>/app/application/template.hbs</code> and save to reload.
</p>
<p class="intro">Or test out the following demo functions!</p>
<hr class="line-break" />
4 changes: 4 additions & 0 deletions packages/ember/app/components/spinning-logo/component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Component from '@ember/component';

export default Component.extend({
});
20 changes: 20 additions & 0 deletions packages/ember/app/components/spinning-logo/styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.logo-container {
display: block;
max-width: 200px;
margin: 32px auto;
position: relative;
}

.nos-logo {
animation: nOS-logo-spin infinite 3s linear;
width: 100%
}

@keyframes nOS-logo-spin {
from {
transform: rotate(0deg)
}
to {
transform: rotate(360deg)
}
}
3 changes: 3 additions & 0 deletions packages/ember/app/components/spinning-logo/template.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="logo-container">
<img src="assets/logo.png" class="nos-logo " alt="nOS logo" key="nosLogo" />
</div>
25 changes: 25 additions & 0 deletions packages/ember/app/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Nos App</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">

{{content-for "head"}}

<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/ember-app.css">

{{content-for "head-footer"}}
</head>
<body>
<div id="nos-app" class="app"></div>

<script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/ember-app.js"></script>

{{content-for "body-footer"}}
</body>
</html>
3 changes: 3 additions & 0 deletions packages/ember/app/resolver.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Resolver from 'ember-resolver';

export default Resolver;
11 changes: 11 additions & 0 deletions packages/ember/app/router.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import EmberRouter from '@ember/routing/router';
import config from './config/environment';

const Router = EmberRouter.extend({
location: config.locationType,
rootURL: config.rootURL
});

Router.map(function() {});

export default Router;
35 changes: 35 additions & 0 deletions packages/ember/app/styles/app.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:300italic,400italic,700italic,400,300,700);
@import "pod-styles";

html, body {
font-family: Source Sans Pro;
margin: 0;
padding: 0;
background-color: #ffffff;
text-align: center
}

.app {
text-align: center;
}

.intro {
font-size: large;
}

.line-break {
width: 75%;
border-top: 1px solid #333333;
margin: 32px auto;
}


.header {
background-color: #f0f0f0;
color: #333333;
padding: 24px;
margin-bottom: 32px;
}
.title {
font-size: 1.5em;
}
Loading