Skip to content

Commit b273c9b

Browse files
committed
fix: fix filenames to be windows compatible. closes #53
1 parent 474c748 commit b273c9b

File tree

33 files changed

+27
-21
lines changed

33 files changed

+27
-21
lines changed

β€Žpackage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"registry": "https://registry.npmjs.org/"
2424
},
2525
"scripts": {
26-
"lint": "eslint --ext '.js,.ts,.tsx' .",
26+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
2727
"typescript": "tsc --noEmit",
2828
"build": "babel --extensions .ts,.tsx src --out-dir lib --ignore '**/__tests__/**' --source-maps --delete-dir-on-start",
2929
"watch": "yarn build --watch",

β€Žsrc/cli.ts

100755100644
File mode changed.

β€Žsrc/create.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,13 @@ export default async function create(argv: yargs.Arguments<any>) {
244244
const files = await fs.readdir(source);
245245

246246
for (const f of files) {
247-
const target = path.join(dest, ejs.render(f.replace(/^\$/, ''), options));
247+
const target = path.join(
248+
dest,
249+
ejs.render(f.replace(/^\$/, ''), options, {
250+
openDelimiter: '{',
251+
closeDelimiter: '}',
252+
})
253+
);
248254

249255
const file = path.join(source, f);
250256
const stats = await fs.stat(file);

β€Žtemplates/common/$package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"scripts": {
2323
"test": "jest",
2424
"typescript": "tsc --noEmit",
25-
"lint": "eslint --ext .js,.ts,.tsx .",
25+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
2626
"prepare": "bob build",
2727
"release": "release-it",
2828
"example": "yarn --cwd example",
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ class <%= project.name %>Module(reactContext: ReactApplicationContext) : ReactCo
1515
// See https://facebook.github.io/react-native/docs/native-modules-android
1616
@ReactMethod
1717
fun multiply(a: Int, b: Int, promise: Promise) {
18-
<% if (project.cpp) {%>
18+
<% if (project.cpp) { %>
1919
promise.resolve(nativeMultiply(a, b));
2020
<% } else { %>
2121
promise.resolve(a * b)
2222
<% } %>
2323
}
2424

25-
<% if (project.cpp) {%>
25+
<% if (project.cpp) { %>
2626
external fun nativeMultiply(a: Int, b: Int): Int;
2727

2828
companion object

0 commit comments

Comments
Β (0)