This repository has been archived by the owner on Jun 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Techn1x/master
Fixed npm install + updates
- Loading branch information
Showing
4 changed files
with
46 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
/*jshint node:true*/ | ||
module.exports = { | ||
description: '' | ||
description: 'add leaflet-polylinedecorator, using npm', | ||
|
||
// locals: function(options) { | ||
// // Return custom template variables here. | ||
// return { | ||
// foo: options.entity.options.foo | ||
// }; | ||
// } | ||
|
||
afterInstall: function(options) { | ||
return this.addBowerPackageToProject('leaflet-polylinedecorator', 'bbecquet/Leaflet.PolylineDecorator#^leaflet-0.7.2'); | ||
normalizeEntityName: function() {}, // no-op since we're just adding dependencies | ||
|
||
afterInstall: function() { | ||
return this.addPackageToProject('leaflet-polylinedecorator', '^1.2.0'); // Add's a package to the project's package.json | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,41 @@ | ||
/* jshint node: true */ | ||
'use strict'; | ||
const resolve = require('resolve'); | ||
const path = require('path'); | ||
const Funnel = require('broccoli-funnel'); | ||
|
||
module.exports = { | ||
name: 'ember-leaflet-polyline-decorator', | ||
|
||
treeForVendor: function() { | ||
let dist = path.join(this.pathBase('leaflet-polylinedecorator'), 'dist'); | ||
return new Funnel(dist, { destDir: 'leaflet-polylinedecorator' }); | ||
}, | ||
|
||
included: function(app) { | ||
app.import(app.bowerDirectory + '/leaflet-polylinedecorator/leaflet.polylineDecorator.js'); | ||
this._super.included.apply(this, arguments); | ||
|
||
// If the addon has the _findHost() method (in ember-cli >= 2.7.0), we'll just | ||
// use that. | ||
if (typeof this._findHost === 'function') { | ||
app = this._findHost(); | ||
} | ||
|
||
// Otherwise, we'll use this implementation borrowed from the _findHost() | ||
// method in ember-cli. | ||
// Keep iterating upward until we don't have a grandparent. | ||
// Has to do this grandparent check because at some point we hit the project. | ||
var current = this; | ||
do { | ||
app = current.app || app; | ||
} while (current.parent.parent && (current = current.parent)); | ||
|
||
var baseDir = 'vendor/leaflet-polylinedecorator/'; | ||
|
||
app.import(baseDir + 'leaflet.polylineDecorator.js'); // Import the javascript into the app | ||
}, | ||
|
||
pathBase: function(packageName) { | ||
return path.dirname(resolve.sync(packageName + '/package.json', { basedir: __dirname })); | ||
} | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters