I have two inject files in my generator, one to import and one to add to an export to a single file.
inject-import.ejs.t
---
inject: true
to: src/components/index.js
before: export {
skip_if: components/<%= name %>
append: true
---
import <%= name %> from "./<%= name %>";
inject-export.ejs.t
---
inject: true
to: src/components/index.js
after: export {
skip_if: components/<%= name %>
append: true
---
<%= name %>,
Which creates a modifies this file:
import Foo from "./Foo"; <-- Inject's the import here
import Input from "./Input";
import Modal from "./modal";
import Table from "./admin/table";
import Button from "./admin/button";
import Grid from "./admin/nested/grid";
export {
Foo, <-- Inject's the export here
Input,
Modal,
Table,
Button,
Grid,
};
The issue is when I run my hygen component new Foo command to create a new Foo component and inject the imports into the file above, the injection changes the line endings from CRLF to LF.
Is there anyway to stop this?
I'm on Windows 10 using vscode v1.55.2 and Hygen v6.0.4.
I have two inject files in my generator, one to import and one to add to an export to a single file.
inject-import.ejs.t
inject-export.ejs.t
Which creates a modifies this file:
The issue is when I run my
hygen component new Foo
command to create a new Foo component and inject the imports into the file above, the injection changes the line endings from CRLF to LF.Is there anyway to stop this?
I'm on Windows 10 using vscode v1.55.2 and Hygen v6.0.4.