Skip to content

Commit

Permalink
chore(release): update lib files
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Hamilton committed May 25, 2019
1 parent dd23c99 commit f68d2d2
Show file tree
Hide file tree
Showing 15 changed files with 3,488 additions and 3,467 deletions.
20 changes: 10 additions & 10 deletions lib/enums/IconType.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var IconType;
(function (IconType) {
IconType["SOLID"] = "solid";
IconType["OUTLINE"] = "outline";
IconType["THIN"] = "thin";
IconType["BRAND"] = "brand";
})(IconType || (IconType = {}));
exports.default = IconType;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var IconType;
(function (IconType) {
IconType["SOLID"] = "solid";
IconType["OUTLINE"] = "outline";
IconType["THIN"] = "thin";
IconType["BRAND"] = "brand";
})(IconType || (IconType = {}));
exports.default = IconType;
98 changes: 49 additions & 49 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
// tasks
var InitialPrompt_1 = __importDefault(require("./tasks/InitialPrompt"));
var DownloadAsset_1 = __importDefault(require("./tasks/DownloadAsset"));
var BuildDist_1 = __importDefault(require("./tasks/BuildDist"));
var CleanUp_1 = __importDefault(require("./tasks/CleanUp"));
// utils
var Logger_1 = __importDefault(require("./util/Logger"));
function run() {
if (process.argv.includes('--clean')) {
CleanUp_1.default()
.then(function () {
process.exit(0);
});
}
else {
InitialPrompt_1.default()
.then(function (results) {
DownloadAsset_1.default(results)
.then(function (paths) {
Promise.resolve().then(function () { return __importStar(require("./parsers/" + results.iconSet.parser)); }).then(function (Parser) {
Parser.default(results, paths)
.then(function (parseResults) {
BuildDist_1.default(results, parseResults)
.then(function () {
process.exit(0);
});
});
})
.catch(function (err) {
Logger_1.default.error(err);
process.exit(1);
});
});
});
}
}
exports.default = run;
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
// tasks
var InitialPrompt_1 = __importDefault(require("./tasks/InitialPrompt"));
var DownloadAsset_1 = __importDefault(require("./tasks/DownloadAsset"));
var BuildDist_1 = __importDefault(require("./tasks/BuildDist"));
var CleanUp_1 = __importDefault(require("./tasks/CleanUp"));
// utils
var Logger_1 = __importDefault(require("./util/Logger"));
function run() {
if (process.argv.includes('--clean')) {
CleanUp_1.default()
.then(function () {
process.exit(0);
});
}
else {
InitialPrompt_1.default()
.then(function (results) {
DownloadAsset_1.default(results)
.then(function (paths) {
Promise.resolve().then(function () { return __importStar(require("./parsers/" + results.iconSet.parser)); }).then(function (Parser) {
Parser.default(results, paths)
.then(function (parseResults) {
BuildDist_1.default(results, parseResults)
.then(function () {
process.exit(0);
});
});
})
.catch(function (err) {
Logger_1.default.error(err);
process.exit(1);
});
});
});
}
}
exports.default = run;
84 changes: 42 additions & 42 deletions lib/modals/Category.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
// static
var categories_json_1 = __importDefault(require("../static/categories.json"));
var Category = /** @class */ (function () {
function Category(data) {
this.data = data;
}
Object.defineProperty(Category.prototype, "rawName", {
get: function () {
return this.data.name;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Category.prototype, "name", {
get: function () {
return this.data.label;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Category.prototype, "description", {
get: function () {
return categories_json_1.default[this.rawName];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Category.prototype, "icons", {
get: function () {
return this.data.icons;
},
enumerable: true,
configurable: true
});
return Category;
}());
exports.default = Category;
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
// static
var categories_json_1 = __importDefault(require("../static/categories.json"));
var Category = /** @class */ (function () {
function Category(data) {
this.data = data;
}
Object.defineProperty(Category.prototype, "rawName", {
get: function () {
return this.data.name;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Category.prototype, "name", {
get: function () {
return this.data.label;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Category.prototype, "description", {
get: function () {
return categories_json_1.default[this.rawName];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Category.prototype, "icons", {
get: function () {
return this.data.icons;
},
enumerable: true,
configurable: true
});
return Category;
}());
exports.default = Category;
170 changes: 85 additions & 85 deletions lib/modals/Icon.js
Original file line number Diff line number Diff line change
@@ -1,85 +1,85 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
// utils
var Converter_1 = __importDefault(require("../util/Converter"));
// enums
var IconType_1 = __importDefault(require("../enums/IconType"));
// static
var corrections_json_1 = __importDefault(require("../static/corrections.json"));
var Icon = /** @class */ (function () {
function Icon(data) {
this.data = data;
}
Icon.prototype.hasCorrection = function (field) {
var iconCorrection = corrections_json_1.default[this.rawName];
if (iconCorrection !== undefined) {
return iconCorrection[field] !== undefined;
}
return false;
};
Icon.prototype.correction = function (field) {
return this.hasCorrection(field)
? corrections_json_1.default[this.rawName][field]
: '';
};
Object.defineProperty(Icon.prototype, "rawName", {
get: function () {
return this.data.name;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Icon.prototype, "name", {
get: function () {
var name = this.data.name;
if (this.type === IconType_1.default.OUTLINE) {
name += '-outline';
}
if (this.type === IconType_1.default.THIN) {
name += '-thin';
}
return this.hasCorrection('name')
? this.correction('name')
: Converter_1.default.iconName(name);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Icon.prototype, "className", {
get: function () {
return this.hasCorrection('className')
? this.correction('className')
: Converter_1.default.iconClassName(this.name);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Icon.prototype, "unicode", {
get: function () {
return this.hasCorrection('unicode')
? this.correction('unicode')
: "\\" + this.data.unicode;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Icon.prototype, "type", {
get: function () {
return this.data.type;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Icon.prototype, "searchTerms", {
get: function () {
return this.data.searchTerms.join(', ');
},
enumerable: true,
configurable: true
});
return Icon;
}());
exports.default = Icon;
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
// utils
var Converter_1 = __importDefault(require("../util/Converter"));
// enums
var IconType_1 = __importDefault(require("../enums/IconType"));
// static
var corrections_json_1 = __importDefault(require("../static/corrections.json"));
var Icon = /** @class */ (function () {
function Icon(data) {
this.data = data;
}
Icon.prototype.hasCorrection = function (field) {
var iconCorrection = corrections_json_1.default[this.rawName];
if (iconCorrection !== undefined) {
return iconCorrection[field] !== undefined;
}
return false;
};
Icon.prototype.correction = function (field) {
return this.hasCorrection(field)
? corrections_json_1.default[this.rawName][field]
: '';
};
Object.defineProperty(Icon.prototype, "rawName", {
get: function () {
return this.data.name;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Icon.prototype, "name", {
get: function () {
var name = this.data.name;
if (this.type === IconType_1.default.OUTLINE) {
name += '-outline';
}
if (this.type === IconType_1.default.THIN) {
name += '-thin';
}
return this.hasCorrection('name')
? this.correction('name')
: Converter_1.default.iconName(name);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Icon.prototype, "className", {
get: function () {
return this.hasCorrection('className')
? this.correction('className')
: Converter_1.default.iconClassName(this.name);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Icon.prototype, "unicode", {
get: function () {
return this.hasCorrection('unicode')
? this.correction('unicode')
: "\\" + this.data.unicode;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Icon.prototype, "type", {
get: function () {
return this.data.type;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Icon.prototype, "searchTerms", {
get: function () {
return this.data.searchTerms.join(', ');
},
enumerable: true,
configurable: true
});
return Icon;
}());
exports.default = Icon;
Loading

0 comments on commit f68d2d2

Please sign in to comment.