Skip to content

Commit

Permalink
Move localforage dependencies from bower to npm (#2)
Browse files Browse the repository at this point in the history
* move localforage dependency from bower to npm

* move localforage to dependency instead of devDependency

* add app.import from node_modules dir

* clean bower.json and update yarn.lock
  • Loading branch information
hbxie authored and Mogball committed Apr 20, 2018
1 parent 6d9f599 commit 00a1242
Show file tree
Hide file tree
Showing 5 changed files with 1,315 additions and 642 deletions.
7 changes: 0 additions & 7 deletions blueprints/storage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ module.exports = {
}
],

afterInstall: function () {
return this.addBowerPackagesToProject([
{ name: 'localforage', target: '~1.5.5' },
{ name: 'localforage-sessionstoragewrapper', target: '~1.2.0' }
]);
},

locals: function(options) {
var storage = options.storage;
var type = options.type;
Expand Down
2 changes: 0 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"name": "ember-localforage",
"dependencies": {
"localforage": "1.5.x",
"localforage-sessionstoragewrapper": "1.2.x",
"highlightjs": "~9.1.0",
"inuitcss": "6.0.0-beta.4"
}
Expand Down
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ module.exports = {
app.import('vendor/save-as.js');
app.import('vendor/Blob.js');
}
app.import(app.bowerDirectory + '/localforage/dist/localforage.min.js');
app.import(app.bowerDirectory + '/localforage-sessionstoragewrapper/src/localforage-sessionstoragewrapper.js')

app.import('node_modules/localforage/dist/localforage.min.js');
app.import('node_modules/localforage-sessionstoragewrapper/src/localforage-sessionstoragewrapper.js');

this._super.included.apply(this, arguments);
},
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
"chalk": "^2.3.0",
"ember-cli-babel": "^6.6.0",
"ember-cli-string-utils": "^1.1.0",
"ember-cli-version-checker": "^2.1.0"
"ember-cli-version-checker": "^2.1.0",
"localforage": "~1.7.1",
"localforage-sessionstoragewrapper": "~1.2.0"
},
"devDependencies": {
"broccoli-asset-rev": "^2.5.0",
Expand Down
Loading

0 comments on commit 00a1242

Please sign in to comment.