Skip to content

Commit b1ba1b1

Browse files
lisaychuangkul3r4
authored andcommittedSep 27, 2018
Resolve LGTM alert by adding semicolons to avoid automated semicolon insertions
1 parent ea648bc commit b1ba1b1

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed
 

‎lib/Preview.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
'use strict'
17+
'use strict';
1818

1919
const Hogan = require('hogan.js');
2020
const fs = require('fs');
@@ -45,7 +45,7 @@ function generateEmbeds(config) {
4545
glob(config.src + '/**/*.html', {}, (err, files) => {
4646
files.forEach(file => generateEmbed(config, file));
4747
});
48-
}
48+
};
4949

5050
/**
5151
* Generates embeds for a given file.
@@ -76,7 +76,7 @@ function generateEmbed(config, file) {
7676
generateTemplate(context);
7777
});
7878
});
79-
}
79+
};
8080

8181
/**
8282
* Syntax highlights a string.
@@ -89,10 +89,10 @@ function highlight(code) {
8989
reject(err);
9090
} else {
9191
resolve(result.toString());
92-
}
92+
};
9393
});
9494
});
95-
}
95+
};
9696

9797
/**
9898
* Renders the given template into a file.
@@ -112,9 +112,9 @@ function generate(file, template, context, minifyResult) {
112112
removeComments: true,
113113
removeAttributeQuotes: true
114114
});
115-
}
115+
};
116116
writeFile(path.join(context.config.destRoot, file), string);
117-
}
117+
};
118118

119119
/**
120120
* Appends a list of flags separated by a '.' to a filename.
@@ -123,15 +123,15 @@ function addFlag() {
123123
const filename = arguments[0];
124124
const postfix = [].slice.call(arguments, 1).join('.');
125125
return filename.replace('.html', '.' + postfix + '.html');
126-
}
126+
};
127127

128128
/**
129129
* Parses an ABE document from a file.
130130
*/
131131
function parseDocument(file) {
132132
const inputString = fs.readFileSync(file, 'utf-8');
133133
return DocumentParser.parse(inputString);
134-
}
134+
};
135135

136136
/**
137137
* Opens the embed html file in a browser to determine the initial height.
@@ -165,17 +165,17 @@ function generateTemplate(context) {
165165
})
166166
.catch(err => console.log(err));
167167
});
168-
}
168+
};
169169

170170
function compileTemplate(filePath) {
171171
let string = fs.readFileSync(path.join(templatesDir, filePath), 'utf8');
172172
return Hogan.compile(string);
173-
}
173+
};
174174

175175
function writeFile(filePath, content) {
176176
mkdirp(path.dirname(filePath));
177177
fs.writeFileSync(filePath, content);
178-
}
178+
};
179179

180180
module.exports = {};
181181
module.exports.generatePreview = generateEmbeds;

0 commit comments

Comments
 (0)
Please sign in to comment.