1
0
mirror of https://github.com/konpa/devicon.git synced 2025-08-17 12:00:56 +02:00

Major build improvements (#1668)

* Major build improvements

* Cleanup and fix path

* chore: apply suggestions from code review

Co-authored-by: Jørgen Kalsnes Hagen <43886029+Snailedlt@users.noreply.github.com>

* Remove `selenium` from the NPM dependencies

* Revert `nano` icon changes

* Use quote notes

* Update

* chore: apply suggestions from code review

Co-authored-by: Jørgen Kalsnes Hagen <43886029+Snailedlt@users.noreply.github.com>

* Snailedlt/improve build changes (#187)

* Make README more readable

* move logic from index.html to script.js

* fix devicon min css in head

* Fix build script missing token error

* Add more print statements to local build script

* Change from ng-href to href in code view

* Minor readme improvements

---------

Co-authored-by: David Leal <halfpacho@gmail.com>

---------

Co-authored-by: Jørgen Kalsnes Hagen <43886029+Snailedlt@users.noreply.github.com>
This commit is contained in:
David Leal
2023-04-21 08:46:43 -06:00
committed by GitHub
parent c97a0bb00a
commit b6e387d942
21 changed files with 2403 additions and 2093 deletions

View File

@@ -14,7 +14,7 @@ devicon.controller('IconListCtrl', function($scope, $http, $compile) {
var gitHubPath = 'devicons/devicon';
var url = 'https://api.github.com/repos/' + gitHubPath + '/tags';
$scope.latestReleaseTagging = 'master';
$scope.latestReleaseTagging = 'latest';
$http.get(url).success(function (data) {
if(data.length > 0) {
$scope.latestReleaseTagging = data[0].name;
@@ -24,7 +24,20 @@ devicon.controller('IconListCtrl', function($scope, $http, $compile) {
});
var versionStr = '@' + $scope.latestReleaseTagging;
var baseUrl = `https://cdn.jsdelivr.net/gh/${gitHubPath}${versionStr}/`
var baseUrl
// Make sure one of the files exist, otherwise, use fallback link.
var path = '/devicon.json';
var xhr = new XMLHttpRequest();
xhr.open('HEAD', path, false);
xhr.send();
if (xhr.status == "404") {
baseUrl = `https://cdn.jsdelivr.net/gh/${gitHubPath}${versionStr}/`
} else {
baseUrl = `/`;
}
$scope.baseUrl = baseUrl
// Get devicon.json
$http.get(baseUrl + 'devicon.json').success(function(data) {