WIP setup for ember starter
This commit is contained in:
parent
f409dec68f
commit
fdf5b6024d
|
@ -0,0 +1,42 @@
|
||||||
|
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: [
|
||||||
|
'.eslintrc.js',
|
||||||
|
'.template-lintrc.js',
|
||||||
|
'ember-cli-build.js',
|
||||||
|
'testem.js',
|
||||||
|
'blueprints/*/index.js',
|
||||||
|
'config/**/*.js',
|
||||||
|
'lib/*/index.js',
|
||||||
|
'webpack.config.js'
|
||||||
|
],
|
||||||
|
parserOptions: {
|
||||||
|
sourceType: 'script',
|
||||||
|
ecmaVersion: 2015
|
||||||
|
},
|
||||||
|
env: {
|
||||||
|
browser: false,
|
||||||
|
node: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
|
@ -22,3 +22,5 @@
|
||||||
/.node_modules.ember-try/
|
/.node_modules.ember-try/
|
||||||
/bower.json.ember-try
|
/bower.json.ember-try
|
||||||
/package.json.ember-try
|
/package.json.ember-try
|
||||||
|
|
||||||
|
chains.json
|
|
@ -1,11 +1,29 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<title>Embark</title>
|
<title>Embark</title>
|
||||||
<link rel="stylesheet" href="css/app.css">
|
<meta name="description" content="">
|
||||||
<script src="js/app.js"></script>
|
<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-quickstart.css">
|
||||||
|
|
||||||
|
{{content-for "head-footer"}}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h3>Welcome to Embark!</h3>
|
<h3>Welcome to Embark!</h3>
|
||||||
<p>See the <a href="http://embark.readthedocs.io/en/latest/index.html" target="_blank">Embark's documentation</a> to see what you can do with Embark!</p>
|
<p>See the <a href="http://embark.readthedocs.io/en/latest/index.html" target="_blank">Embark's documentation</a> to see what you can do with Embark!</p>
|
||||||
|
<h2>Text</h2>
|
||||||
|
{{content-for "body"}}
|
||||||
|
|
||||||
|
<script src="{{rootURL}}assets/vendor.js"></script>
|
||||||
|
<script src="{{rootURL}}assets/ember-quickstart.js"></script>
|
||||||
|
|
||||||
|
{{content-for "body-footer"}}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import EmbarkJS from 'Embark/EmbarkJS';
|
// import EmbarkJS from 'Embark/EmbarkJS';
|
||||||
|
|
||||||
// import your contracts
|
// import your contracts
|
||||||
// e.g if you have a contract named SimpleStorage:
|
// e.g if you have a contract named SimpleStorage:
|
||||||
|
|
|
@ -7,6 +7,7 @@ const Router = EmberRouter.extend({
|
||||||
});
|
});
|
||||||
|
|
||||||
Router.map(function() {
|
Router.map(function() {
|
||||||
|
this.route('blockchain');
|
||||||
});
|
});
|
||||||
|
|
||||||
export default Router;
|
export default Router;
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
import Route from '@ember/routing/route';
|
||||||
|
|
||||||
|
export default Route.extend({
|
||||||
|
});
|
|
@ -0,0 +1 @@
|
||||||
|
@import "ember-cli-bootstrap-4/bootstrap";
|
|
@ -1 +1,3 @@
|
||||||
{{outlet}}
|
{{outlet}}
|
||||||
|
|
||||||
|
{{component ember-blockchain}}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{{outlet}}
|
||||||
|
|
||||||
|
<h1>Blockchain</h1>
|
|
@ -0,0 +1 @@
|
||||||
|
{{yield}}
|
|
@ -1 +0,0 @@
|
||||||
{}
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
module.exports = function(environment) {
|
module.exports = function(environment) {
|
||||||
let ENV = {
|
let ENV = {
|
||||||
modulePrefix: 'ember-quickstart',
|
modulePrefix: 'embark-ember-template',
|
||||||
environment,
|
environment,
|
||||||
rootURL: '/',
|
rootURL: '/',
|
||||||
locationType: 'auto',
|
locationType: 'auto',
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
||||||
|
|
||||||
|
module.exports = function(defaults) {
|
||||||
|
let app = new EmberApp(defaults, {
|
||||||
|
// Add options here
|
||||||
|
});
|
||||||
|
|
||||||
|
// Use `app.import` to add additional libraries to the generated
|
||||||
|
// output files.
|
||||||
|
//
|
||||||
|
// If you need to use different assets in different
|
||||||
|
// environments, specify an object as the first parameter. That
|
||||||
|
// object's keys should be the environment name and the values
|
||||||
|
// should be the asset to use in that environment.
|
||||||
|
//
|
||||||
|
// If the library that you are including contains AMD or ES6
|
||||||
|
// modules that you would like to import into your application
|
||||||
|
// please specify an object with the list of modules as keys
|
||||||
|
// along with the exports of each module as its value.
|
||||||
|
|
||||||
|
return app.toTree();
|
||||||
|
};
|
|
@ -13,6 +13,7 @@
|
||||||
"@ember/optional-features": "^0.6.3",
|
"@ember/optional-features": "^0.6.3",
|
||||||
"broccoli-asset-rev": "^2.7.0",
|
"broccoli-asset-rev": "^2.7.0",
|
||||||
"ember-ajax": "^3.1.0",
|
"ember-ajax": "^3.1.0",
|
||||||
|
"ember-bootstrap": "^2.3.0",
|
||||||
"ember-cli": "~3.5.1",
|
"ember-cli": "~3.5.1",
|
||||||
"ember-cli-app-version": "^3.2.0",
|
"ember-cli-app-version": "^3.2.0",
|
||||||
"ember-cli-babel": "^6.16.0",
|
"ember-cli-babel": "^6.16.0",
|
||||||
|
@ -35,5 +36,8 @@
|
||||||
"eslint-plugin-ember": "^5.2.0",
|
"eslint-plugin-ember": "^5.2.0",
|
||||||
"loader.js": "^4.7.0",
|
"loader.js": "^4.7.0",
|
||||||
"qunit-dom": "^0.8.0"
|
"qunit-dom": "^0.8.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ember-cli-bootstrap-4": "^0.7.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<title>EmberQuickstart 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/ember-quickstart.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/ember-quickstart.js"></script>
|
||||||
|
<script src="{{rootURL}}assets/tests.js"></script>
|
||||||
|
|
||||||
|
{{content-for "body-footer"}}
|
||||||
|
{{content-for "test-body-footer"}}
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,26 @@
|
||||||
|
import { module, test } from 'qunit';
|
||||||
|
import { setupRenderingTest } from 'ember-qunit';
|
||||||
|
import { render } from '@ember/test-helpers';
|
||||||
|
import hbs from 'htmlbars-inline-precompile';
|
||||||
|
|
||||||
|
module('Integration | Component | ember-blockchain', function(hooks) {
|
||||||
|
setupRenderingTest(hooks);
|
||||||
|
|
||||||
|
test('it renders', async function(assert) {
|
||||||
|
// Set any properties with this.set('myProperty', 'value');
|
||||||
|
// Handle any actions with this.set('myAction', function(val) { ... });
|
||||||
|
|
||||||
|
await render(hbs`{{ember-blockchain}}`);
|
||||||
|
|
||||||
|
assert.equal(this.element.textContent.trim(), '');
|
||||||
|
|
||||||
|
// Template block usage:
|
||||||
|
await render(hbs`
|
||||||
|
{{#ember-blockchain}}
|
||||||
|
template block text
|
||||||
|
{{/ember-blockchain}}
|
||||||
|
`);
|
||||||
|
|
||||||
|
assert.equal(this.element.textContent.trim(), 'template block text');
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,26 @@
|
||||||
|
import { module, test } from 'qunit';
|
||||||
|
import { setupRenderingTest } from 'ember-qunit';
|
||||||
|
import { render } from '@ember/test-helpers';
|
||||||
|
import hbs from 'htmlbars-inline-precompile';
|
||||||
|
|
||||||
|
module('Integration | Component | people-list', function(hooks) {
|
||||||
|
setupRenderingTest(hooks);
|
||||||
|
|
||||||
|
test('it renders', async function(assert) {
|
||||||
|
// Set any properties with this.set('myProperty', 'value');
|
||||||
|
// Handle any actions with this.set('myAction', function(val) { ... });
|
||||||
|
|
||||||
|
await render(hbs`{{people-list}}`);
|
||||||
|
|
||||||
|
assert.equal(this.element.textContent.trim(), '');
|
||||||
|
|
||||||
|
// Template block usage:
|
||||||
|
await render(hbs`
|
||||||
|
{{#people-list}}
|
||||||
|
template block text
|
||||||
|
{{/people-list}}
|
||||||
|
`);
|
||||||
|
|
||||||
|
assert.equal(this.element.textContent.trim(), 'template block text');
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,8 @@
|
||||||
|
import Application from '../app';
|
||||||
|
import config from '../config/environment';
|
||||||
|
import { setApplication } from '@ember/test-helpers';
|
||||||
|
import { start } from 'ember-qunit';
|
||||||
|
|
||||||
|
setApplication(Application.create(config.APP));
|
||||||
|
|
||||||
|
start();
|
|
@ -0,0 +1,11 @@
|
||||||
|
import { module, test } from 'qunit';
|
||||||
|
import { setupTest } from 'ember-qunit';
|
||||||
|
|
||||||
|
module('Unit | Route | blockchain', function(hooks) {
|
||||||
|
setupTest(hooks);
|
||||||
|
|
||||||
|
test('it exists', function(assert) {
|
||||||
|
let route = this.owner.lookup('route:blockchain');
|
||||||
|
assert.ok(route);
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue