Skip to content

Commit bdaca6c

Browse files
author
lumenn-home
committed
Corrected tab indent, updated version
1 parent 7b0db57 commit bdaca6c

File tree

2 files changed

+43
-43
lines changed

2 files changed

+43
-43
lines changed

bin/concat.js

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -11,45 +11,44 @@ fs.writeFileSync(bundlePath, '');
1111
fs.writeFileSync(bundleTypeScriptDefinitionPath, '');
1212

1313
// loop folders
14-
folders.forEach(folder => {
15-
16-
fs.readdir(folder, (err, files) => {
17-
files = files.filter(file => !(/(^|\/)\.[^\/\.]/g).test(file));
18-
files.forEach(file => {
19-
let filePath = path.resolve(process.cwd(), `${folder}${file}`);
20-
cat(filePath, (error, data) => {
21-
if (error !== null) {
22-
console.log(error);
23-
process.exit();
24-
}
25-
fs.appendFileSync(bundlePath, `//${file}\n${data}\n`);
26-
});
27-
});
28-
14+
folders.forEach((folder) => {
15+
fs.readdir(folder, (err, files) => {
16+
files = files.filter((file) => !(/(^|\/)\.[^\/\.]/g).test(file));
17+
18+
files.forEach((file) => {
19+
let filePath = path.resolve(process.cwd(), `${folder}${file}`);
20+
cat(filePath, (error, data) => {
21+
if (error !== null) {
22+
console.log(error);
23+
process.exit();
24+
}
25+
26+
fs.appendFileSync(bundlePath, `//${file}\n${data}\n`);
27+
});
2928
});
30-
31-
// build TypeScript-Definition path
32-
const tsdFilename = `${path.basename(folder)}.d.ts`;
33-
const tsdPath = path.resolve(process.cwd(), tsdFilename);
34-
35-
// if TypeScript-Definition exists
36-
if (fs.existsSync(tsdPath)) {
37-
cat(tsdPath, (error, data) => {
38-
if (error !== null) {
39-
console.log(error);
40-
process.exit();
41-
}
42-
43-
44-
if (!hasLicense) {
45-
// add one times Apache license
46-
hasLicense = true;
47-
} else {
48-
// remove Apache License
49-
data = data.split('\n').slice(14).join('\n');
50-
}
51-
52-
fs.appendFileSync(bundleTypeScriptDefinitionPath, `// ${tsdFilename}\n${data}\n`);
53-
});
54-
}
55-
});
29+
});
30+
31+
// build TypeScript-Definition path
32+
const tsdFilename = `${path.basename(folder)}.d.ts`;
33+
const tsdPath = path.resolve(process.cwd(), tsdFilename);
34+
35+
// if TypeScript-Definition exists
36+
if (fs.existsSync(tsdPath)) {
37+
cat(tsdPath, (error, data) => {
38+
if (error !== null) {
39+
console.log(error);
40+
process.exit();
41+
}
42+
43+
if (!hasLicense) {
44+
// add one times Apache license
45+
hasLicense = true;
46+
} else {
47+
// remove Apache License
48+
data = data.split('\n').slice(14).join('\n');
49+
}
50+
51+
fs.appendFileSync(bundleTypeScriptDefinitionPath, `// ${tsdFilename}\n${data}\n`);
52+
});
53+
}
54+
});

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "extendscript-es5-shim",
3-
"version": "0.2.0",
3+
"version": "0.3.0",
44
"description": "a collection of useful es5-shims for Extendscript",
55
"main": "index.js",
66
"types": "index.d.ts",
@@ -21,7 +21,8 @@
2121
],
2222
"contributers": [
2323
"Fabian Morón Zirfas <fabian.moron.zirfas@gmail.com> (http://fabianmoronzirfas.me)",
24-
"EugenTepin"
24+
"EugenTepin",
25+
"MrSpoocy (https://github.com/MrSpoocy)"
2526
],
2627
"license": "MIT",
2728
"bugs": {

0 commit comments

Comments
 (0)