From 35bdead5563470deeff61a6a0cb2cbc6d03a6c11 Mon Sep 17 00:00:00 2001 From: simonihmig Date: Sat, 1 Dec 2018 00:12:54 +0100 Subject: [PATCH] [BUGFIX beta] fix line endings of component blueprint on Windows --- blueprints/component/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/blueprints/component/index.js b/blueprints/component/index.js index e315c462922..fb86140b8c4 100644 --- a/blueprints/component/index.js +++ b/blueprints/component/index.js @@ -6,6 +6,7 @@ const pathUtil = require('ember-cli-path-utils'); const getPathOption = require('ember-cli-get-component-path-option'); const normalizeEntityName = require('ember-cli-normalize-entity-name'); const isModuleUnificationProject = require('../module-unification').isModuleUnificationProject; +const EOL = require('os').EOL; module.exports = { description: 'Generates a component.', @@ -89,8 +90,8 @@ module.exports = { 'templates/components/' + stringUtil.dasherize(options.entity.name); } - importTemplate = "import layout from '" + templatePath + "';\n"; - contents = '\n layout'; + importTemplate = "import layout from '" + templatePath + "';" + EOL; + contents = EOL + ' layout'; } return {