Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bower packaging #5

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
dist/
tmp-code.js
bower_components/
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
language: node_js
script: "phantomjs tests/runner.js tests/index.html"

before_install:
- npm install -g bower
- bower install

script: "phantomjs tests/runner.js tests/index.html"
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Fully tested.
Usage
-----

Download the latest distribution and then use it like this:
Download the latest distribution or use bower to install
`ember-indexeddb-adapter`.

```js
App.ApplicationSerializer = DS.IndexedDBSerializer.extend();
Expand Down Expand Up @@ -161,8 +162,10 @@ send a PR for one of them.
Tests
-----

Run `rackup` in your terminal (make sure you have Ruby installed). Then visit
`http://localhost:9292` in your browser.
First, install depdendencies with bower: `bower install`.

Run `rackup` in your terminal (make sure you have Ruby and the rack gem installed).
Then visit `http://localhost:9292` in your browser.

Please, disregard Travis CI for now because PhantomJS (1.9.3) doesn't support
IndexedDB. IndexedDBShim.js doesn't work
Expand Down
4 changes: 1 addition & 3 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
desc "Builds the JS files"
task :build do
version = File.open("VERSION").read.strip

files = [
"packages/indexeddb-adapter/lib/indexeddb_migration.js",
"packages/indexeddb-adapter/lib/indexeddb_serializer.js",
Expand All @@ -12,7 +10,7 @@ task :build do
code = files.map { |file| File.open(file).read }

FileUtils.mkdir_p("dist")
file = File.new("dist/ember_indexeddb_adapter_#{version}.js", "w+")
file = File.new("dist/ember_indexeddb_adapter.js", "w+")
file.write(code.join("\n"))
file.close

Expand Down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

16 changes: 16 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "ember-indexeddb-adapter",
"version": "0.5.1",
"main": [
"dist/ember_indexeddb_adapter.js"
],
"dependencies": {
"jquery": "1.11.1",
"ember": "1.5.1",
"ember-data": "1.0.0-beta.7"
},
"devDependencies": {
"qunit": "",
"IndexedDBShim": ""
}
}
Loading