ember init
This commit is contained in:
parent
b7fe33cd23
commit
51c0d58dfb
19 changed files with 814 additions and 55 deletions
13
web/.eslintrc.js
Normal file
13
web/.eslintrc.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
parserOptions: {
|
||||
ecmaVersion: 2017,
|
||||
sourceType: 'module'
|
||||
},
|
||||
extends: 'eslint:recommended',
|
||||
env: {
|
||||
browser: true
|
||||
},
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
11
web/.gitignore
vendored
11
web/.gitignore
vendored
|
|
@ -1,4 +1,4 @@
|
|||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||
# See https://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# compiled output
|
||||
/dist
|
||||
|
|
@ -13,6 +13,11 @@
|
|||
/connect.lock
|
||||
/coverage/*
|
||||
/libpeerconnection.log
|
||||
npm-debug.log
|
||||
npm-debug.log*
|
||||
yarn-error.log
|
||||
testem.log
|
||||
/.idea/
|
||||
|
||||
# ember-try
|
||||
.node_modules.ember-try/
|
||||
bower.json.ember-try
|
||||
package.json.ember-try
|
||||
|
|
|
|||
|
|
@ -1,24 +1,21 @@
|
|||
---
|
||||
language: node_js
|
||||
node_js:
|
||||
- "4"
|
||||
- "6"
|
||||
|
||||
sudo: false
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.npm
|
||||
- $HOME/.cache # includes bowers cache
|
||||
yarn: true
|
||||
|
||||
before_install:
|
||||
- npm config set spin false
|
||||
- npm install -g bower phantomjs-prebuilt
|
||||
- bower --version
|
||||
- curl -o- -L https://yarnpkg.com/install.sh | bash
|
||||
- export PATH=$HOME/.yarn/bin:$PATH
|
||||
- yarn global add phantomjs-prebuilt
|
||||
- phantomjs --version
|
||||
|
||||
install:
|
||||
- npm install
|
||||
- bower install
|
||||
- yarn install --non-interactive
|
||||
|
||||
script:
|
||||
- npm test
|
||||
- yarn test
|
||||
|
|
|
|||
|
|
@ -7,10 +7,9 @@ Music awesomeness for hue lights.
|
|||
|
||||
You will need the following things properly installed on your computer.
|
||||
|
||||
* [Git](http://git-scm.com/)
|
||||
* [Node.js](http://nodejs.org/) (with NPM)
|
||||
* [Bower](http://bower.io/)
|
||||
* [Ember CLI](http://ember-cli.com/)
|
||||
* [Git](https://git-scm.com/)
|
||||
* [Node.js](https://nodejs.org/) (with NPM)
|
||||
* [Ember CLI](https://ember-cli.com/)
|
||||
* [PhantomJS](http://phantomjs.org/)
|
||||
|
||||
## Installation
|
||||
|
|
@ -34,11 +33,14 @@ Make use of the many generators for code, try `ember help generate` for more det
|
|||
* `ember build` (development)
|
||||
* `ember build --environment production` (production)
|
||||
|
||||
### Deploying
|
||||
|
||||
Specify what it takes to deploy your app.
|
||||
|
||||
## Further Reading / Useful Links
|
||||
|
||||
* [ember.js](http://emberjs.com/)
|
||||
* [ember-cli](http://ember-cli.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/)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,9 @@ import Resolver from './resolver';
|
|||
import loadInitializers from 'ember-load-initializers';
|
||||
import config from './config/environment';
|
||||
|
||||
let App;
|
||||
|
||||
Ember.MODEL_FACTORY_INJECTIONS = true;
|
||||
|
||||
App = Ember.Application.extend({
|
||||
const App = Ember.Application.extend({
|
||||
modulePrefix: config.modulePrefix,
|
||||
podModulePrefix: config.podModulePrefix,
|
||||
Resolver
|
||||
|
|
|
|||
5
web/app/templates/application.hbs
Normal file
5
web/app/templates/application.hbs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{{!-- The following component displays Ember's default welcome message. --}}
|
||||
{{welcome-page}}
|
||||
{{!-- Feel free to remove this! --}}
|
||||
|
||||
{{outlet}}
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
/* jshint node: true */
|
||||
/* eslint-env node */
|
||||
'use strict';
|
||||
|
||||
module.exports = function(environment) {
|
||||
var ENV = {
|
||||
let ENV = {
|
||||
modulePrefix: 'huegasm',
|
||||
podModulePrefix: 'huegasm/pods',
|
||||
environment,
|
||||
|
|
|
|||
9
web/config/targets.js
Normal file
9
web/config/targets.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/* eslint-env node */
|
||||
module.exports = {
|
||||
browsers: [
|
||||
'ie 11',
|
||||
'last 1 Chrome versions',
|
||||
'last 1 Firefox versions',
|
||||
'last 1 Safari versions'
|
||||
]
|
||||
};
|
||||
|
|
@ -1,14 +1,16 @@
|
|||
/* global require, module */
|
||||
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
||||
var Funnel = require('broccoli-funnel');
|
||||
/* eslint-env node */
|
||||
'use strict';
|
||||
|
||||
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
||||
const Funnel = require('broccoli-funnel');
|
||||
|
||||
module.exports = function(defaults) {
|
||||
var app = new EmberApp(defaults, {
|
||||
let app = new EmberApp(defaults, {
|
||||
fingerprint:{
|
||||
exclude: ['logo.png']
|
||||
}
|
||||
});
|
||||
var extraAssets = new Funnel('bower_components/bootstrap-sass/assets/fonts/bootstrap/', {
|
||||
let extraAssets = new Funnel('bower_components/bootstrap-sass/assets/fonts/bootstrap/', {
|
||||
srcDir: '/',
|
||||
include: ['**'],
|
||||
destDir: '/fonts/bootstrap'
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
"deploy": "ember deploy production"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
"node": "^4.5 || 6.* || >= 7.*"
|
||||
},
|
||||
"author": "Egor Philippov",
|
||||
"devDependencies": {
|
||||
|
|
@ -26,10 +26,12 @@
|
|||
"ember-cli-deploy": "^1.0.0",
|
||||
"ember-cli-deploy-build": "^1.0.0",
|
||||
"ember-cli-deploy-git": "^1.1.0",
|
||||
"ember-cli-eslint": "^3.0.0",
|
||||
"ember-cli-htmlbars": "^2.0.0",
|
||||
"ember-cli-htmlbars-inline-precompile": "^0.4.0",
|
||||
"ember-cli-inject-live-reload": "^1.3.1",
|
||||
"ember-cli-nouislider": "^0.13.0",
|
||||
"ember-cli-qunit": "^4.0.0",
|
||||
"ember-cli-release": "^1.0.0-beta.2",
|
||||
"ember-cli-sass": "^7.0.0",
|
||||
"ember-cli-shims": "^1.0.2",
|
||||
|
|
@ -44,5 +46,8 @@
|
|||
"ember-source": "^2.11.0",
|
||||
"ember-truth-helpers": "^1.2.0",
|
||||
"loader.js": "^4.0.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"bower": "^1.3.12"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
12
web/testem.js
Normal file
12
web/testem.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/* eslint-env node */
|
||||
module.exports = {
|
||||
test_page: 'tests/index.html?hidepassed',
|
||||
disable_watching: true,
|
||||
launch_in_ci: [
|
||||
'PhantomJS'
|
||||
],
|
||||
launch_in_dev: [
|
||||
'PhantomJS',
|
||||
'Chrome'
|
||||
]
|
||||
};
|
||||
5
web/tests/.eslintrc.js
Normal file
5
web/tests/.eslintrc.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
module.exports = {
|
||||
env: {
|
||||
embertest: true
|
||||
}
|
||||
};
|
||||
5
web/tests/helpers/destroy-app.js
Normal file
5
web/tests/helpers/destroy-app.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
export default function destroyApp(application) {
|
||||
Ember.run(application, 'destroy');
|
||||
}
|
||||
23
web/tests/helpers/module-for-acceptance.js
Normal file
23
web/tests/helpers/module-for-acceptance.js
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import { module } from 'qunit';
|
||||
import Ember from 'ember';
|
||||
import startApp from '../helpers/start-app';
|
||||
import destroyApp from '../helpers/destroy-app';
|
||||
|
||||
const { RSVP: { resolve } } = Ember;
|
||||
|
||||
export default function(name, options = {}) {
|
||||
module(name, {
|
||||
beforeEach() {
|
||||
this.application = startApp();
|
||||
|
||||
if (options.beforeEach) {
|
||||
return options.beforeEach.apply(this, arguments);
|
||||
}
|
||||
},
|
||||
|
||||
afterEach() {
|
||||
let afterEach = options.afterEach && options.afterEach.apply(this, arguments);
|
||||
return resolve(afterEach).then(() => destroyApp(this.application));
|
||||
}
|
||||
});
|
||||
}
|
||||
11
web/tests/helpers/resolver.js
Normal file
11
web/tests/helpers/resolver.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import Resolver from '../../resolver';
|
||||
import config from '../../config/environment';
|
||||
|
||||
const resolver = Resolver.create();
|
||||
|
||||
resolver.namespace = {
|
||||
modulePrefix: config.modulePrefix,
|
||||
podModulePrefix: config.podModulePrefix
|
||||
};
|
||||
|
||||
export default resolver;
|
||||
15
web/tests/helpers/start-app.js
Normal file
15
web/tests/helpers/start-app.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import Ember from 'ember';
|
||||
import Application from '../../app';
|
||||
import config from '../../config/environment';
|
||||
|
||||
export default function startApp(attrs) {
|
||||
let attributes = Ember.merge({}, config.APP);
|
||||
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
|
||||
|
||||
return Ember.run(() => {
|
||||
let application = Application.create(attributes);
|
||||
application.setupForTesting();
|
||||
application.injectTestHelpers();
|
||||
return application;
|
||||
});
|
||||
}
|
||||
33
web/tests/index.html
Normal file
33
web/tests/index.html
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Huegasm Tests</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
{{content-for "head"}}
|
||||
{{content-for "test-head"}}
|
||||
|
||||
<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
|
||||
<link rel="stylesheet" href="{{rootURL}}assets/huegasm.css">
|
||||
<link rel="stylesheet" href="{{rootURL}}assets/test-support.css">
|
||||
|
||||
{{content-for "head-footer"}}
|
||||
{{content-for "test-head-footer"}}
|
||||
</head>
|
||||
<body>
|
||||
{{content-for "body"}}
|
||||
{{content-for "test-body"}}
|
||||
|
||||
<script src="/testem.js" integrity=""></script>
|
||||
<script src="{{rootURL}}assets/vendor.js"></script>
|
||||
<script src="{{rootURL}}assets/test-support.js"></script>
|
||||
<script src="{{rootURL}}assets/huegasm.js"></script>
|
||||
<script src="{{rootURL}}assets/tests.js"></script>
|
||||
|
||||
{{content-for "body-footer"}}
|
||||
{{content-for "test-body-footer"}}
|
||||
</body>
|
||||
</html>
|
||||
8
web/tests/test-helper.js
Normal file
8
web/tests/test-helper.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import resolver from './helpers/resolver';
|
||||
import {
|
||||
setResolver
|
||||
} from 'ember-qunit';
|
||||
import { start } from 'ember-cli-qunit';
|
||||
|
||||
setResolver(resolver);
|
||||
start();
|
||||
660
web/yarn.lock
660
web/yarn.lock
File diff suppressed because it is too large
Load diff
Reference in a new issue