WIP setup for ember starter

This commit is contained in:
Daniil Borovkov 2018-12-04 15:13:26 +06:00
parent f409dec68f
commit fdf5b6024d
23 changed files with 1380 additions and 35 deletions

42
.eslintrc.js Normal file
View File

@ -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
}
}
]
};

4
.gitignore vendored
View File

@ -21,4 +21,6 @@
# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
/package.json.ember-try
chains.json

View File

@ -1,11 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Embark</title>
<link rel="stylesheet" href="css/app.css">
<script src="js/app.js"></script>
<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-quickstart.css">
{{content-for "head-footer"}}
</head>
<body>
<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>
<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>
</html>

View File

@ -1,4 +1,4 @@
import EmbarkJS from 'Embark/EmbarkJS';
// import EmbarkJS from 'Embark/EmbarkJS';
// import your contracts
// e.g if you have a contract named SimpleStorage:

View File

@ -7,6 +7,7 @@ const Router = EmberRouter.extend({
});
Router.map(function() {
this.route('blockchain');
});
export default Router;

4
app/routes/blockchain.js Normal file
View File

@ -0,0 +1,4 @@
import Route from '@ember/routing/route';
export default Route.extend({
});

1
app/styles/app.scss Normal file
View File

@ -0,0 +1 @@
@import "ember-cli-bootstrap-4/bootstrap";

View File

@ -1 +1,3 @@
{{outlet}}
{{outlet}}
{{component ember-blockchain}}

View File

@ -0,0 +1,3 @@
{{outlet}}
<h1>Blockchain</h1>

View File

@ -0,0 +1 @@
{{yield}}

View File

@ -1 +0,0 @@
{}

View File

@ -2,7 +2,7 @@
module.exports = function(environment) {
let ENV = {
modulePrefix: 'ember-quickstart',
modulePrefix: 'embark-ember-template',
environment,
rootURL: '/',
locationType: 'auto',

24
ember-cli-build.js Normal file
View File

@ -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();
};

View File

@ -13,6 +13,7 @@
"@ember/optional-features": "^0.6.3",
"broccoli-asset-rev": "^2.7.0",
"ember-ajax": "^3.1.0",
"ember-bootstrap": "^2.3.0",
"ember-cli": "~3.5.1",
"ember-cli-app-version": "^3.2.0",
"ember-cli-babel": "^6.16.0",
@ -35,5 +36,8 @@
"eslint-plugin-ember": "^5.2.0",
"loader.js": "^4.7.0",
"qunit-dom": "^0.8.0"
},
"dependencies": {
"ember-cli-bootstrap-4": "^0.7.0"
}
}

0
tests/helpers/.gitkeep Normal file
View File

33
tests/index.html Normal file
View File

@ -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>

View File

View File

@ -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');
});
});

View File

@ -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');
});
});

8
tests/test-helper.js Normal file
View File

@ -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
tests/unit/.gitkeep Normal file
View File

View File

@ -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);
});
});

1196
yarn.lock

File diff suppressed because it is too large Load Diff