mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-17 05:21:36 +03:00
d1957958e3
Aligns all requirements vertically for easier reading + adds single quote standard consistently throughout Ghost, except in long strings.
18 lines
321 B
JavaScript
18 lines
321 B
JavaScript
var when = require('when');
|
|
|
|
module.exports = function (version, data) {
|
|
var importer;
|
|
|
|
try {
|
|
importer = require('./' + version);
|
|
} catch (ignore) {
|
|
// Zero effs given
|
|
}
|
|
|
|
if (!importer) {
|
|
return when.reject("No importer found");
|
|
}
|
|
|
|
return importer.importData(data);
|
|
};
|