Skip to content

Commit

Permalink
Merge pull request #157 from azirbel/bower-and-versioning
Browse files Browse the repository at this point in the history
Bower and versioning
  • Loading branch information
azirbel committed May 20, 2014
2 parents 539410f + 6c56fce commit 1191d4d
Show file tree
Hide file tree
Showing 103 changed files with 205 additions and 35,334 deletions.
10 changes: 6 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
node_modules/
gh_pages/
bower_components/
build/
doc/
gh_pages/
lib/
node_modules/
tests/lib
tests/css
.DS_Store
.stage
*.swo
*.swp
.DS_Store
doc/
17 changes: 17 additions & 0 deletions .release.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"non-interactive": false,
"dry-run": false,
"verbose": false,
"force": false,
"pkgFiles": ["package.json", "bower.json"],
"increment": "patch",
"commitMessage": "Release %s",
"tagName": "v%s",
"tagAnnotation": "Release %s",
"buildCommand": "grunt dist",
"distRepo": false,
"distStageDir": ".stage",
"distBase": "",
"distFiles": ["dist/**/*"],
"publish": false
}
8 changes: 0 additions & 8 deletions CHANGELOG

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ember Table Changelog

### Ember Table 0.1.0 _(October 23, 2013)_

* Initial release

67 changes: 48 additions & 19 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,26 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-browserify2');
grunt.loadNpmTasks('grunt-ember-templates');
grunt.loadNpmTasks('grunt-jsdoc');
grunt.loadNpmTasks('grunt-neuter');
grunt.loadNpmTasks('grunt-banner');
grunt.loadNpmTasks('grunt-text-replace');
grunt.loadNpmTasks('grunt-bower-task');

// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

meta: {
banner: '/*! <%=pkg.name%> - v<%=pkg.version%> (build <%=pkg.build%>) - ' +
'<%=grunt.template.today("dddd, mmmm dS, yyyy, h:MM:ss TT")%> */'
bower: {
install: {
options: {
cleanup: true,
layout: 'byComponent'
}
}
},

// browserify2: {
// // Bundle containing all client scripts (WebApp, Ember.js)
// table: {
// entry: [
// './build/src/main.js'
// ],
// compile: './lib/ember-table-lib.js'
// }
// },

coffee: {
srcs: {
options: {
Expand Down Expand Up @@ -66,7 +62,7 @@ module.exports = function (grunt) {
},

neuter: {
options:{
options: {
includeSourceURL: false,
separator: "\n"
},
Expand Down Expand Up @@ -137,7 +133,7 @@ module.exports = function (grunt) {
dest: 'gh_pages/css'
}, {
expand: true,
cwd: 'dependencies/font-awesome/font/',
cwd: 'lib/font-awesome/font/',
src: ['**'],
dest: 'gh_pages/font'
}, {
Expand Down Expand Up @@ -179,7 +175,6 @@ module.exports = function (grunt) {
uglify: {
file: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n',
preserveComments: false,
beautify: false,
mangle: true,
Expand All @@ -195,13 +190,46 @@ module.exports = function (grunt) {
}
},

// Add a banner to dist files which includes version & year of release
usebanner: {
dist: {
options: {
banner: '/*!\n* <%=pkg.name %> v<%=pkg.version%>\n' +
'* Copyright 2012-<%=grunt.template.today("yyyy")%> Addepar Inc.\n' +
'* See LICENSE.\n*/',
},
files: {
src: ['dist/*']
}
}
},

replace: {
global_version: {
src: ['VERSION'],
overwrite: true,
replacements: [{
from: /.*\..*\..*/,
to: '<%=pkg.version%>'
}]
},
main_coffee_version: {
src: ['src/main.coffee'],
overwrite: true,
replacements: [{
from: /Ember.Table.VERSION = '.*\..*\..*'/,
to: "Ember.Table.VERSION = '<%=pkg.version%>'"
}]
}
},

watch: {
grunt: {
files: ["Gruntfile.coffee"],
tasks: ["default"]
},
code: {
files: ["src/**/*.coffee", "app/**/*.coffee", "dependencies/**/*.js"],
files: ["src/**/*.coffee", "app/**/*.coffee", "dependencies/**/*.js", "lib/**/*.js"],
tasks: ["coffee", "neuter"]
},
handlebars: {
Expand All @@ -224,6 +252,7 @@ module.exports = function (grunt) {

grunt.registerTask("build_app", ["coffee:app", "emberTemplates", "neuter"]);

grunt.registerTask("default", ["build_srcs", "build_app", "less", "copy", "uglify", "watch"]);
grunt.registerTask("dist", ["replace", "build_srcs", "build_app", "less", "copy", "uglify", "usebanner"]);

grunt.registerTask("default", ["bower", "replace", "build_srcs", "build_app", "less", "copy", "uglify", "usebanner", "watch"]);
};
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ Hit up : `http://localhost:8000/examples`
* Support for colspan and rowspan
* Switch to ember/list-view for lazy rendering

### Maintainers
Update version numbers and release using https://github.com/webpro/release-it. Install:
```
$ npm install -g release-it
$ alias release="release-it"
```
Release process:
```
$ vim CHANGELOG.md
$ release <options>
```

### Copyright and License
Copyright © 2013 Addepar, Inc. All Rights Reserved

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.2
0.1.0
6 changes: 3 additions & 3 deletions app/app.coffee
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ember-Table Dependencies
require 'dependencies/bootstrap/js/bootstrap'
require 'dependencies/antiscroll/antiscroll'
require 'lib/bootstrap/bootstrap'
require 'lib/antiscroll/antiscroll'
require 'dependencies/ember-addepar-mixins/resize_handler'
require 'dependencies/ember-addepar-mixins/style_bindings'
require 'dist/ember-table'
Expand All @@ -9,7 +9,7 @@ require 'dist/ember-table'
require 'dependencies/date'

# Editable Horizon and Sparkline dependency
require 'dependencies/d3.v3'
require 'lib/d3/d3'
require 'dependencies/horizon'

window.App = Ember.Application.create
Expand Down
4 changes: 2 additions & 2 deletions app/assets/css/app.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// External Libraries on which addepar-components.css relies
// -------------------------
@import "../../../dependencies/bootstrap/less/bootstrap.less";
@import '../../../dependencies/jquery-ui/jquery-ui-1.10.1.custom.min.css';
@import "../../../lib/bootstrap/bootstrap.css";
@import '../../../lib/jquery-ui/jquery-ui.css';
@import '../../../dependencies/addepar-bootstrap-theme/addepar-bootstrap-theme.less';

// Ember Table
Expand Down
13 changes: 8 additions & 5 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@
<link type="text/css" rel="stylesheet" href="http://fast.fonts.net/cssapi/cc61a2f8-3c32-45ef-9be7-fc0cc1fab22b.css"/>

<!-- Load assets -->
<link rel="stylesheet" href="/lib/antiscroll/antiscroll.css">
<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.css">
<link rel="stylesheet" href="/gh_pages/css/app.css">
</head>
<body>

<!-- javascript -->
<script src="/lib/jquery/jquery.js"></script>
<script src="/lib/jquery-ui/jquery-ui.custom.js"></script>
<script src="/lib/jquery-mousewheel/jquery.mousewheel.js"></script>
<script src="/lib/antiscroll/antiscroll.js"></script>
<script src="/lib/handlebars/handlebars.js"></script>
<script src="/lib/ember/ember.js"></script>
<script src="/gh_pages/lib/prettify.js"></script>
<script src="/gh_pages/lib/jquery-1.10.2.min.js"></script>
<script src="/gh_pages/lib/jquery-ui-1.10.1.custom.min.js"></script>
<script src="/gh_pages/lib/jquery.mousewheel.js"></script>
<script src="/gh_pages/lib/handlebars.js"></script>
<script src="/gh_pages/lib/ember.js"></script>
<script src="/gh_pages/app.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion app/views/ember_table/editable.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ App.RatingTableCell = Ember.Table.TableCell.extend
click: (event) ->
rating = @$('.rating span').index(event.target)
return if rating is -1
@get('column').setCellContent(@get('rowContent'), rating)
@get('column').setCellContent(@get('row'), rating)
@applyRating(rating)
51 changes: 51 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"name": "ember-table",
"version": "0.1.0",
"description": "Table built using ember.js that lazily renders rows.",
"keywords": [
"ember",
"ember-table"
],
"main": [
"./dist/ember-table.css",
"./dist/ember-table.js",
"./dist/ember-table.min.js"
],
"ignore": [
"app",
"dependencies",
"src",
"tests",
".gitignore",
"bower.json",
"CHANGELOG",
"Gruntfile.js",
"LICENSE",
"README.md",
"examples.js",
"package.json"
],
"dependencies": {
"antiscroll": "fa3f81d3c07b647a63036da1de859fcaf1355993",
"bootstrap": "3.0.0",
"ember": "1.4.0",
"handlebars": "1.3.0",
"jquery": "1.10.2",
"jquery-mousewheel": "3.1.4",
"jquery-ui": "1.10.1"
},
"devDependencies": {
"d3": "3.2.7",
"font-awesome": "3.2.1",
"modernizr": "2.6.1",
"qunit": "1.12.0"
},
"exportsOverride": {
"jquery-ui": {
".": [
"ui/jquery-ui.custom.js",
"themes/base/jquery-ui.css"
]
}
}
}
Loading

0 comments on commit 1191d4d

Please sign in to comment.