diff --git a/core/client/lib/asset-delivery/index.js b/core/client/lib/asset-delivery/index.js index d24f55a346..735519c039 100644 --- a/core/client/lib/asset-delivery/index.js +++ b/core/client/lib/asset-delivery/index.js @@ -2,15 +2,20 @@ module.exports = { name: 'asset-delivery', postBuild: function (results) { var fs = this.project.require('fs-extra'), - cpd = this.project.require('ember-cli-copy-dereference'), + walkSync = this.project.require('walk-sync'), + assetsIn = results.directory + '/assets', templateOut = '../server/views/default.hbs', - assetsOut = '../built/assets'; + assetsOut = '../built/assets', + assets = walkSync(assetsIn); - fs.removeSync(templateOut); - fs.removeSync(assetsOut); fs.ensureDirSync(assetsOut); - cpd.sync(results.directory + '/index.html', templateOut); - cpd.sync(results.directory + '/assets', assetsOut); + fs.copySync(results.directory + '/index.html', templateOut, {clobber: true}); + + assets.forEach(function (relativePath) { + if (relativePath.slice(-1) === '/') { return; } + + fs.copySync(assetsIn + '/' + relativePath, assetsOut + '/' + relativePath, {clobber:true}); + }); } }; diff --git a/core/client/package.json b/core/client/package.json index 0961a49fc2..bb7250bc56 100644 --- a/core/client/package.json +++ b/core/client/package.json @@ -24,7 +24,6 @@ "ember-cli-app-version": "0.3.3", "ember-cli-babel": "^5.0.0", "ember-cli-content-security-policy": "0.4.0", - "ember-cli-copy-dereference": "1.0.0", "ember-cli-dependency-checker": "^1.0.0", "ember-cli-fastclick": "1.0.3", "ember-cli-htmlbars": "0.7.6", @@ -39,7 +38,8 @@ "ember-myth": "0.1.1", "ember-sinon": "0.2.1", "fs-extra": "0.16.3", - "glob": "^4.0.5" + "glob": "^4.0.5", + "walk-sync": "^0.1.3" }, "ember-addon": { "paths": [