Skip to content

Commit

Permalink
Make sure correct path is used for intl-tel-input assets (#57)
Browse files Browse the repository at this point in the history
* Make sure correct path is used

In case monorepo, etc
  • Loading branch information
Dan Wenzel authored and dcyriller committed Apr 17, 2019
1 parent c9cd811 commit b0bb19f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const Funnel = require('broccoli-funnel')
const MergeTrees = require('broccoli-merge-trees')
const path = require('path')

const scriptsDestDir = 'assets/ember-phone-input/scripts/'
const intlTelInputScriptName = 'intlTelInput.min.js'
Expand Down Expand Up @@ -31,7 +32,11 @@ module.exports = {
treeForPublic() {
// copy these files to destDir
// to be able to lazyLoad them || not to bundle them into vendor.js
const intlTelInputFiles = new Funnel('node_modules/intl-tel-input', {
const intlTelInputPath = path.resolve(
require.resolve('intl-tel-input'),
'..'
)
const intlTelInputFiles = new Funnel(intlTelInputPath, {
srcDir: '/build/js',
include: [intlTelInputScriptName, utilsScriptName],
destDir: `/${scriptsDestDir}`
Expand Down

0 comments on commit b0bb19f

Please sign in to comment.