Skip to content

Commit

Permalink
change file structure to new one provided by ember-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
aomran committed Sep 27, 2014
1 parent 8590ab0 commit 2bde5f8
Show file tree
Hide file tree
Showing 70 changed files with 836 additions and 5,152 deletions.
5 changes: 3 additions & 2 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"directory": "vendor"
}
"directory": "bower_components",
"analytics": false
}
33 changes: 33 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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

[*.js]
indent_style = space
indent_size = 2

[*.hbs]
indent_style = space
indent_size = 2

[*.css]
indent_style = space
indent_size = 2

[*.html]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
9 changes: 9 additions & 0 deletions .ember-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
/**
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
}
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp

# dependencies
/node_modules
/bower_components/*

# misc
/.sass-cache
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log
testem.log
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
language: node_js

sudo: false

cache:
directories:
- node_modules

install:
- npm install -g bower
- npm install
- bower install

script:
- npm test
20 changes: 20 additions & 0 deletions Brocfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* global require, module */

var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

var app = new EmberAddon();

// 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.

module.exports = app.toTree();
Empty file added addon/.gitkeep
Empty file.
Empty file added app/.gitkeep
Empty file.
2 changes: 1 addition & 1 deletion app/components/ember-chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default Ember.Component.extend({
renderChart: function(){
var context = this.get('element').getContext('2d');
var data = this.get('data');
var type = this.get('type').capitalize();
var type = this.get('type').classify();
var options = Ember.merge({}, this.get('options'));

var chart = new Chart(context)[type](data, options);
Expand Down
18 changes: 16 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
{
"name": "ember-cli-chart",
"name": "dummy",
"dependencies": {
"chartjs": "v1.0.1-beta.4"
"handlebars": "~1.3.0",
"jquery": "^1.11.1",
"ember": "1.7.0",
"ember-data": "1.0.0-beta.10",
"ember-resolver": "~0.1.7",
"loader": "stefanpenner/loader.js#1.0.1",
"ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.3",
"ember-cli-test-loader": "rwjblue/ember-cli-test-loader#0.0.4",
"ember-load-initializers": "stefanpenner/ember-load-initializers#0.0.2",
"ember-qunit": "0.1.8",
"ember-qunit-notifications": "0.0.4",
"qunit": "~1.15.0"
},
"devDependencies": {
"chartjs": "1.0.1-beta.4"
}
}
5 changes: 5 additions & 0 deletions config/environment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = function(/* environment, appConfig */) {
return { };
};
2 changes: 0 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

module.exports = {
name: 'Ember CLI Chart',

Expand Down
31 changes: 27 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@
"name": "ember-cli-chart",
"version": "1.0.4",
"description": "Ember component for ChartJS",
"main": "index.js",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"start": "ember server",
"build": "ember build",
"test": "ember test"
},
"engines": {
"node": ">= 0.10.0"
},
"repository": {
"type": "git",
Expand All @@ -20,5 +28,20 @@
"bugs": {
"url": "https://github.com/aomra015/ember-cli-chart/issues"
},
"homepage": "https://github.com/aomra015/ember-cli-chart"
}
"homepage": "https://github.com/aomra015/ember-cli-chart",
"devDependencies": {
"body-parser": "^1.2.0",
"broccoli-asset-rev": "0.1.1",
"broccoli-ember-hbs-template-compiler": "^1.6.1",
"ember-cli": "0.0.46",
"ember-cli-ic-ajax": "0.1.1",
"ember-cli-inject-live-reload": "^1.0.2",
"ember-cli-qunit": "0.1.0",
"ember-data": "1.0.0-beta.10",
"express": "^4.8.5",
"glob": "^4.0.5"
},
"ember-addon": {
"configPath": "tests/dummy/config"
}
}
11 changes: 11 additions & 0 deletions testem.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"framework": "qunit",
"test_page": "tests/index.html",
"launch_in_ci": [
"PhantomJS"
],
"launch_in_dev": [
"PhantomJS",
"Chrome"
]
}
75 changes: 75 additions & 0 deletions tests/.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"predef": [
"document",
"window",
"location",
"setTimeout",
"$",
"-Promise",
"QUnit",
"define",
"console",
"equal",
"notEqual",
"notStrictEqual",
"test",
"asyncTest",
"testBoth",
"testWithDefault",
"raises",
"throws",
"deepEqual",
"start",
"stop",
"ok",
"strictEqual",
"module",
"moduleFor",
"moduleForComponent",
"moduleForModel",
"process",
"expect",
"visit",
"exists",
"fillIn",
"click",
"keyEvent",
"triggerEvent",
"find",
"findWithAssert",
"wait",
"DS",
"keyEvent",
"isolatedContainer",
"startApp",
"andThen",
"currentURL",
"currentPath",
"currentRouteName"
],
"node": false,
"browser": false,
"boss": true,
"curly": false,
"debug": false,
"devel": false,
"eqeqeq": true,
"evil": true,
"forin": false,
"immed": false,
"laxbreak": false,
"newcap": true,
"noarg": true,
"noempty": false,
"nonew": false,
"nomen": false,
"onevar": false,
"plusplus": false,
"regexp": false,
"undef": true,
"sub": true,
"strict": false,
"white": false,
"eqnull": true,
"esnext": true
}
32 changes: 32 additions & 0 deletions tests/dummy/.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"predef": {
"document": true,
"window": true,
"-Promise": true
},
"browser" : true,
"boss" : true,
"curly": true,
"debug": false,
"devel": true,
"eqeqeq": true,
"evil": true,
"forin": false,
"immed": false,
"laxbreak": false,
"newcap": true,
"noarg": true,
"noempty": false,
"nonew": false,
"nomen": false,
"onevar": false,
"plusplus": false,
"regexp": false,
"undef": true,
"sub": true,
"strict": false,
"white": false,
"eqnull": true,
"esnext": true,
"unused": true
}
16 changes: 16 additions & 0 deletions tests/dummy/app/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Ember from 'ember';
import Resolver from 'ember/resolver';
import loadInitializers from 'ember/load-initializers';
import config from './config/environment';

Ember.MODEL_FACTORY_INJECTIONS = true;

var App = Ember.Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver: Resolver
});

loadInitializers(App, config.modulePrefix);

export default App;
Empty file.
Empty file.
Loading

0 comments on commit 2bde5f8

Please sign in to comment.