Skip to content

Commit

Permalink
Move to Ember CLI version
Browse files Browse the repository at this point in the history
This upgrade allows easy installs into Ember CLI apps, and is also fully
backwards-compatible with globals-based Ember apps.

* Convert from Coffeescript to JS
* Restructure to use Ember CLI conventions
* Blueprint to import Ember Table dependencies
* New demo app
    * Example code is auto-built from files backing the demo
* Add globals build, with build code in the `packaging` folder
* Fix/change to LazyContainerView involving `childViews`

See http://github.com/Addepar/ember-table-addon for more information.
  • Loading branch information
Alex Zirbel committed May 22, 2015
1 parent 8df61e6 commit 710bd51
Show file tree
Hide file tree
Showing 298 changed files with 10,636 additions and 9,926 deletions.
3 changes: 2 additions & 1 deletion .bowerrc
@@ -1,3 +1,4 @@
{
"directory": "vendor"
"directory": "bower_components",
"analytics": false
}
16 changes: 16 additions & 0 deletions .editorconfig
@@ -0,0 +1,16 @@
# 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

[*.{diff,md}]
trim_trailing_whitespace = false
10 changes: 10 additions & 0 deletions .ember-cli
@@ -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,
"output-path": "ember-dist/"
}
30 changes: 20 additions & 10 deletions .gitignore
@@ -1,12 +1,22 @@
bower_components/
build/
doc/
gh_pages/
node_modules/
tests/lib
tests/css
vendor/
# See http://help.github.com/ignore-files/ for more about ignoring files.

.DS_Store

# compiled output
/tmp
/ember-dist

# dependencies
/node_modules
/bower_components

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

# grunt-release-it
.stage
*.swo
*.swp
32 changes: 32 additions & 0 deletions .jshintrc
@@ -0,0 +1,32 @@
{
"predef": [
"document",
"window",
"-Promise"
],
"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
}
12 changes: 12 additions & 0 deletions .npmignore
@@ -0,0 +1,12 @@
bower_components/
tests/

.bowerrc
.editorconfig
.ember-cli
.travis.yml
.npmignore
**/.gitkeep
bower.json
Brocfile.js
testem.json
20 changes: 20 additions & 0 deletions .travis.yml
@@ -0,0 +1,20 @@
---
language: node_js

sudo: false

cache:
directories:
- node_modules

before_install:
- "npm config set spin false"
- "npm install -g npm@^2"

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

script:
- npm test
47 changes: 47 additions & 0 deletions Brocfile.js
@@ -0,0 +1,47 @@
/* global require, module */

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

// Escape HTML using approach in
// http://stackoverflow.com/questions/24816/escaping-html-strings-with-jquery
var entityMap = {
"&": "&",
"<": "&lt;",
">": "&gt;",
'"': '&quot;',
"'": '&#39;',
"/": '&#x2F;'
};

function escapeHtml(string) {
return String(string).replace(/[&<>"'\/]/g, function (s) {
return entityMap[s];
});
}

var app = new EmberAddon({
/*
* Replace patterns. We use this to replace strings such as:
* @@{controllers/file.js}
* With the content of those files.
*/
replace: {
files: [
'**/*.js'
],
patterns: [{
match: /@@{([^}]*)}/g,
replacement: function(matchedText) {
filename = matchedText.slice(3, -1);
fullFilename = './tests/dummy/app/' + filename;
fileContents = fs.readFileSync(fullFilename, 'utf8');
return escapeHtml(fileContents).replace(/\n/g, '\\n');
}
}]
}
});

app.import(app.bowerDirectory + '/d3/d3.js');

module.exports = app.toTree();
25 changes: 12 additions & 13 deletions CONTRIBUTING.md
Expand Up @@ -55,17 +55,15 @@ provide as much detail and context as possible.

## Writing Code in Ember Table

Ember-table is written in [CoffeeScript](http://coffeescript.org/) and compiled
into JavaScript using [Grunt](http://gruntjs.com/). Contributing to ember-table
requires that you have grunt and NPM (for pulling in dependencies) locally
installed.

The `src` folder contains all the source code for the ember-table project
itself. The `app` folder contains the sample app and documentation, and should
be updated whenever changes will add functionality, modify or remove existing
functionality, or change public APIs. The `dist` folder contains the compiled
ember-table code and should not be directly modified but instead generated using
`grunt dist`.
Ember Table is written as an Ember CLI addon. This means that source files are
in the `addon` and `app` folders, the demo application is in the `tests/dummy`
folder, and tests are in the `tests` folder.

Temporarily, we are supporting a globals-based build to be used with Ember apps
that don't yet use Ember CLI. This build is created via code in the `packaging`
folder, and the compiled files are in the `dist` folder. These files are
checked into version control, but instead of modifying them directly, please
generate them with `grunt dist`.

## Pull requests

Expand Down Expand Up @@ -139,7 +137,7 @@ included in the project:
with a clear title and description against the `master` branch.

**IMPORTANT**: By submitting a patch, you agree to allow the project owners to
license your work under the terms of the [BSD License](LICENSE).
license your work under the terms of the [BSD License](LICENSE.md).


## Running tests
Expand All @@ -158,7 +156,8 @@ Coming soon!
## License

By contributing your code, you agree to license your contribution under the
[BSD license](LICENSE).
[BSD license](LICENSE.md).


#### NOTE: Largely copied from https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md

0 comments on commit 710bd51

Please sign in to comment.