Update npm scripts explorer to use codicons (ref #90911)

This commit is contained in:
Miguel Solorio 2020-03-04 16:13:36 -08:00
parent 599043c528
commit 573fe9e800
15 changed files with 14 additions and 61 deletions

View file

@ -57,18 +57,12 @@
{
"command": "npm.runScript",
"title": "%command.run%",
"icon": {
"light": "resources/light/continue.svg",
"dark": "resources/dark/continue.svg"
}
"icon": "$(run)"
},
{
"command": "npm.debugScript",
"title": "%command.debug%",
"icon": {
"light": "resources/light/debug.svg",
"dark": "resources/dark/debug.svg"
}
"icon": "$(debug)"
},
{
"command": "npm.openScript",
@ -81,10 +75,7 @@
{
"command": "npm.refresh",
"title": "%command.refresh%",
"icon": {
"light": "resources/light/refresh.svg",
"dark": "resources/dark/refresh.svg"
}
"icon": "$(refresh)"
},
{
"command": "npm.runSelectedScript",

View file

@ -1,3 +0,0 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 2V14.4805L12.9146 8.24024L4 2ZM11.1809 8.24024L4.995 12.5684V3.91209L11.1809 8.24024Z" fill="#C5C5C5"/>
</svg>

Before

Width:  |  Height:  |  Size: 259 B

View file

@ -1,5 +0,0 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.01996 8.50166L3.01725 8.46085C3.01812 8.47446 3.01903 8.48807 3.01996 8.50166Z" fill="#C5C5C5"/>
<path d="M7.2577 8.90466L5.4876 7.12558L6.07922 6.53397L7.95097 8.41518L9.79605 6.57011L10.3877 7.16171L8.61769 8.93167L10.3878 10.7108L9.79619 11.3024L7.92445 9.42114L6.07936 11.2662L5.48775 10.6746L7.2577 8.90466Z" fill="#C5C5C5"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.8775 3.91833V4.5H11.6624L13.3203 2.8421L13.9119 3.43371L12.3421 5.00354L12.361 5.05303C12.6914 5.91515 12.8775 6.88815 12.8775 7.91833C12.8775 8.11403 12.8708 8.30766 12.8576 8.49886L12.8546 8.5425H14.92V9.37916H12.7495L12.7434 9.41265C12.567 10.3771 12.2239 11.2564 11.7565 11.9964L11.7218 12.0515L13.7182 14.058L13.1251 14.6481L11.2153 12.7287L11.1576 12.7932C10.2949 13.7582 9.17697 14.3367 7.95917 14.3367C6.72251 14.3367 5.58881 13.7401 4.72075 12.748L4.66326 12.6823L2.79157 14.554L2.19995 13.9624L4.16317 11.9992L4.12918 11.9442C3.6785 11.2152 3.34718 10.3545 3.17494 9.41265L3.16882 9.37916H1V8.5425H3.0637L3.0607 8.49886C3.04755 8.30766 3.04084 8.11403 3.04084 7.91833C3.04084 6.90159 3.22212 5.94055 3.54446 5.08683L3.56303 5.03764L1.95216 3.41862L2.54527 2.8285L4.20835 4.5H5.04084V3.91833C5.04084 2.30658 6.34742 1 7.95917 1C9.57092 1 10.8775 2.30658 10.8775 3.91833ZM5.87751 3.91833V4.5H10.0408V3.91833C10.0408 2.76866 9.10884 1.83667 7.95917 1.83667C6.8095 1.83667 5.87751 2.76866 5.87751 3.91833ZM11.5938 5.38957L11.5739 5.33667H4.34441L4.32451 5.38957C4.0411 6.1427 3.8775 7.00011 3.8775 7.91833C3.8775 9.52826 4.38048 10.9522 5.15153 11.9546C5.9219 12.9561 6.9225 13.5 7.95917 13.5C8.99584 13.5 9.99644 12.9561 10.7668 11.9546C11.5379 10.9522 12.0408 9.52826 12.0408 7.91833C12.0408 7.00011 11.8772 6.14269 11.5938 5.38957Z" fill="#C5C5C5"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -1,5 +0,0 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g opacity="0.5">
<path d="M2.80723 14.9754C2.57119 14.9721 2.33826 14.9211 2.12247 14.8254C1.90667 14.7297 1.71248 14.5913 1.55158 14.4186C1.2385 14.1334 1.04433 13.7408 1.00775 13.3189C0.966225 12.8828 1.09269 12.4473 1.36133 12.1013C2.56779 10.8289 4.9473 8.4494 6.67811 6.75479C6.30983 5.75887 6.32704 4.66127 6.72637 3.67739C7.05474 2.85876 7.63869 2.16805 8.39129 1.70807C8.9817 1.31706 9.66031 1.07944 10.3657 1.01673C11.0711 0.954022 11.7809 1.06819 12.4311 1.34892L13.0482 1.6162L10.1824 4.56738L11.4371 5.82582L14.3809 2.94887L14.6482 3.56788C14.8735 4.08976 14.993 4.65119 14.9997 5.21961C15.0064 5.78802 14.9002 6.35211 14.6872 6.87915C14.476 7.40029 14.1623 7.87368 13.7647 8.27122C13.5394 8.49169 13.2904 8.68653 13.0222 8.85218C12.4673 9.22275 11.8324 9.45636 11.1697 9.5338C10.5069 9.61124 9.83521 9.5303 9.20982 9.29764C8.11194 10.4113 5.37142 13.1704 3.89119 14.5522C3.59426 14.8219 3.20832 14.9726 2.80723 14.9754ZM10.7448 1.92802C10.087 1.92637 9.44359 2.12018 8.89614 2.48485C8.68265 2.6152 8.48437 2.76897 8.30498 2.9433C7.82789 3.42423 7.50926 4.03953 7.39182 4.70669C7.27437 5.37385 7.36374 6.06098 7.64792 6.67591L7.78342 6.97288L7.55048 7.20025C5.81224 8.89672 3.28146 11.4201 2.06479 12.7045C1.95646 12.8658 1.91012 13.0608 1.93435 13.2535C1.95857 13.4463 2.05171 13.6238 2.19657 13.7532C2.28005 13.8462 2.38177 13.9211 2.49541 13.9731C2.59557 14.0184 2.70383 14.043 2.81373 14.0455C2.98064 14.0413 3.14044 13.977 3.26383 13.8646C4.83687 12.3964 7.87622 9.32641 8.76807 8.42435L8.9973 8.19326L9.29242 8.32783C9.80618 8.56732 10.3731 8.66985 10.9382 8.62545C11.5033 8.58106 12.0473 8.39125 12.5174 8.07447C12.7313 7.9426 12.9296 7.78694 13.1085 7.61045C13.4183 7.30153 13.6631 6.93374 13.8286 6.52874C13.994 6.12375 14.0767 5.68974 14.0719 5.25228C14.0719 5.03662 14.0505 4.82148 14.0078 4.61007L11.4306 7.12508L8.87944 4.57759L11.3944 1.98834C11.1804 1.94674 10.9628 1.92653 10.7448 1.92802Z" fill="#C5C5C5"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2 KiB

View file

@ -1,4 +0,0 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.56253 2.51574C3.46348 3.45007 2 5.55411 2 7.99996C2 11.3137 4.68629 14 8 14C11.3137 14 14 11.3137 14 7.99996C14 5.32516 12.2497 3.05916 9.83199 2.28479L9.52968 3.23829C11.5429 3.88451 13 5.77207 13 7.99996C13 10.7614 10.7614 13 8 13C5.23858 13 3 10.7614 3 7.99996C3 6.31101 3.83742 4.81764 5.11969 3.91242L5.56253 2.51574Z" fill="#C5C5C5"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M5 3H2V2H5.5L6 2.5V6H5V3Z" fill="#C5C5C5"/>
</svg>

Before

Width:  |  Height:  |  Size: 589 B

View file

@ -1,3 +0,0 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2.80723 14.9754C2.57119 14.9721 2.33826 14.9211 2.12247 14.8254C1.90667 14.7297 1.71248 14.5913 1.55158 14.4186C1.2385 14.1334 1.04433 13.7408 1.00775 13.3189C0.966225 12.8828 1.09269 12.4473 1.36133 12.1013C2.56779 10.8289 4.9473 8.4494 6.67811 6.75479C6.30983 5.75887 6.32704 4.66127 6.72637 3.67739C7.05474 2.85876 7.63869 2.16805 8.39129 1.70807C8.9817 1.31706 9.66031 1.07944 10.3657 1.01673C11.0711 0.954022 11.7809 1.06819 12.4311 1.34892L13.0482 1.6162L10.1824 4.56738L11.4371 5.82582L14.3809 2.94887L14.6482 3.56788C14.8735 4.08976 14.993 4.65119 14.9997 5.21961C15.0064 5.78802 14.9002 6.35211 14.6872 6.87915C14.476 7.40029 14.1623 7.87368 13.7647 8.27122C13.5394 8.49169 13.2904 8.68653 13.0222 8.85218C12.4673 9.22275 11.8324 9.45636 11.1697 9.5338C10.5069 9.61124 9.83521 9.5303 9.20982 9.29764C8.11194 10.4113 5.37142 13.1704 3.89119 14.5522C3.59426 14.8219 3.20832 14.9726 2.80723 14.9754ZM10.7448 1.92802C10.087 1.92637 9.44359 2.12018 8.89614 2.48485C8.68265 2.6152 8.48437 2.76897 8.30498 2.9433C7.82789 3.42423 7.50926 4.03953 7.39182 4.70669C7.27438 5.37385 7.36374 6.06098 7.64792 6.67591L7.78342 6.97288L7.55048 7.20025C5.81224 8.89672 3.28146 11.4201 2.06479 12.7045C1.95646 12.8658 1.91012 13.0608 1.93435 13.2535C1.95857 13.4463 2.05171 13.6238 2.19657 13.7532C2.28005 13.8462 2.38177 13.9211 2.49541 13.9731C2.59557 14.0184 2.70383 14.043 2.81373 14.0455C2.98064 14.0413 3.14044 13.977 3.26383 13.8646C4.83687 12.3964 7.87622 9.32641 8.76807 8.42435L8.9973 8.19326L9.29242 8.32783C9.80617 8.56732 10.3731 8.66985 10.9382 8.62545C11.5033 8.58106 12.0473 8.39125 12.5174 8.07447C12.7313 7.9426 12.9296 7.78694 13.1085 7.61045C13.4183 7.30153 13.6631 6.93374 13.8286 6.52874C13.994 6.12375 14.0767 5.68974 14.0719 5.25228C14.0719 5.03662 14.0505 4.82148 14.0078 4.61007L11.4306 7.12508L8.87944 4.57759L11.3944 1.98834C11.1804 1.94674 10.9628 1.92653 10.7448 1.92802Z" fill="#C5C5C5"/>
</svg>

Before

Width:  |  Height:  |  Size: 2 KiB

View file

@ -1,3 +0,0 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 2V14.4805L12.9146 8.24024L4 2ZM11.1809 8.24024L4.995 12.5684V3.91209L11.1809 8.24024Z" fill="#424242"/>
</svg>

Before

Width:  |  Height:  |  Size: 259 B

View file

@ -1,5 +0,0 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.01996 8.50166L3.01725 8.46085C3.01812 8.47446 3.01903 8.48807 3.01996 8.50166Z" fill="#424242"/>
<path d="M7.2577 8.90466L5.4876 7.12558L6.07922 6.53397L7.95097 8.41518L9.79605 6.57011L10.3877 7.16171L8.61769 8.93167L10.3878 10.7108L9.79619 11.3024L7.92445 9.42114L6.07936 11.2662L5.48775 10.6746L7.2577 8.90466Z" fill="#424242"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.8775 3.91833V4.5H11.6624L13.3203 2.8421L13.9119 3.43371L12.3421 5.00354L12.361 5.05303C12.6914 5.91515 12.8775 6.88815 12.8775 7.91833C12.8775 8.11403 12.8708 8.30766 12.8576 8.49886L12.8546 8.5425H14.92V9.37916H12.7495L12.7434 9.41265C12.567 10.3771 12.2239 11.2564 11.7565 11.9964L11.7218 12.0515L13.7182 14.058L13.1251 14.6481L11.2153 12.7287L11.1576 12.7932C10.2949 13.7582 9.17697 14.3367 7.95917 14.3367C6.72251 14.3367 5.58881 13.7401 4.72075 12.748L4.66326 12.6823L2.79157 14.554L2.19995 13.9624L4.16317 11.9992L4.12918 11.9442C3.6785 11.2152 3.34718 10.3545 3.17494 9.41265L3.16882 9.37916H1V8.5425H3.0637L3.0607 8.49886C3.04755 8.30766 3.04084 8.11403 3.04084 7.91833C3.04084 6.90159 3.22212 5.94055 3.54446 5.08683L3.56303 5.03764L1.95216 3.41862L2.54527 2.8285L4.20835 4.5H5.04084V3.91833C5.04084 2.30658 6.34742 1 7.95917 1C9.57092 1 10.8775 2.30658 10.8775 3.91833ZM5.87751 3.91833V4.5H10.0408V3.91833C10.0408 2.76866 9.10884 1.83667 7.95917 1.83667C6.8095 1.83667 5.87751 2.76866 5.87751 3.91833ZM11.5938 5.38957L11.5739 5.33667H4.34441L4.32451 5.38957C4.0411 6.1427 3.8775 7.00011 3.8775 7.91833C3.8775 9.52826 4.38048 10.9522 5.15153 11.9546C5.9219 12.9561 6.9225 13.5 7.95917 13.5C8.99584 13.5 9.99644 12.9561 10.7668 11.9546C11.5379 10.9522 12.0408 9.52826 12.0408 7.91833C12.0408 7.00011 11.8772 6.14269 11.5938 5.38957Z" fill="#424242"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -1,5 +0,0 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g opacity="0.5">
<path d="M2.80723 14.9754C2.57119 14.9721 2.33826 14.9211 2.12247 14.8254C1.90667 14.7297 1.71248 14.5913 1.55158 14.4186C1.2385 14.1334 1.04433 13.7408 1.00775 13.3189C0.966225 12.8828 1.09269 12.4473 1.36133 12.1013C2.56779 10.8289 4.9473 8.4494 6.67811 6.75479C6.30983 5.75887 6.32704 4.66127 6.72637 3.67739C7.05474 2.85876 7.63869 2.16805 8.39129 1.70807C8.9817 1.31706 9.66031 1.07944 10.3657 1.01673C11.0711 0.954022 11.7809 1.06819 12.4311 1.34892L13.0482 1.6162L10.1824 4.56738L11.4371 5.82582L14.3809 2.94887L14.6482 3.56788C14.8735 4.08976 14.993 4.65119 14.9997 5.21961C15.0064 5.78802 14.9002 6.35211 14.6872 6.87915C14.476 7.40029 14.1623 7.87368 13.7647 8.27122C13.5394 8.49169 13.2904 8.68653 13.0222 8.85218C12.4673 9.22275 11.8324 9.45636 11.1697 9.5338C10.5069 9.61124 9.83521 9.5303 9.20982 9.29764C8.11194 10.4113 5.37142 13.1704 3.89119 14.5522C3.59426 14.8219 3.20832 14.9726 2.80723 14.9754ZM10.7448 1.92802C10.087 1.92637 9.44359 2.12018 8.89614 2.48485C8.68265 2.6152 8.48437 2.76897 8.30498 2.9433C7.82789 3.42423 7.50926 4.03953 7.39182 4.70669C7.27437 5.37385 7.36374 6.06098 7.64792 6.67591L7.78342 6.97288L7.55048 7.20025C5.81224 8.89672 3.28146 11.4201 2.06479 12.7045C1.95646 12.8658 1.91012 13.0608 1.93435 13.2535C1.95857 13.4463 2.05171 13.6238 2.19657 13.7532C2.28005 13.8462 2.38177 13.9211 2.49541 13.9731C2.59557 14.0184 2.70383 14.043 2.81373 14.0455C2.98064 14.0413 3.14044 13.977 3.26383 13.8646C4.83687 12.3964 7.87622 9.32641 8.76807 8.42435L8.9973 8.19326L9.29242 8.32783C9.80618 8.56732 10.3731 8.66985 10.9382 8.62545C11.5033 8.58106 12.0473 8.39125 12.5174 8.07447C12.7313 7.9426 12.9296 7.78694 13.1085 7.61045C13.4183 7.30153 13.6631 6.93374 13.8286 6.52874C13.994 6.12375 14.0767 5.68974 14.0719 5.25228C14.0719 5.03662 14.0505 4.82148 14.0078 4.61007L11.4306 7.12508L8.87944 4.57759L11.3944 1.98834C11.1804 1.94674 10.9628 1.92653 10.7448 1.92802Z" fill="#424242"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2 KiB

View file

@ -1,4 +0,0 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.56253 2.51574C3.46348 3.45007 2 5.55411 2 7.99996C2 11.3137 4.68629 14 8 14C11.3137 14 14 11.3137 14 7.99996C14 5.32516 12.2497 3.05916 9.83199 2.28479L9.52968 3.23829C11.5429 3.88451 13 5.77207 13 7.99996C13 10.7614 10.7614 13 8 13C5.23858 13 3 10.7614 3 7.99996C3 6.31101 3.83742 4.81764 5.11969 3.91242L5.56253 2.51574Z" fill="#424242"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M5 3H2V2H5.5L6 2.5V6H5V3Z" fill="#424242"/>
</svg>

Before

Width:  |  Height:  |  Size: 589 B

View file

@ -1,3 +0,0 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2.80723 14.9754C2.57119 14.9721 2.33826 14.9211 2.12247 14.8254C1.90667 14.7297 1.71248 14.5913 1.55158 14.4186C1.2385 14.1334 1.04433 13.7408 1.00775 13.3189C0.966225 12.8828 1.09269 12.4473 1.36133 12.1013C2.56779 10.8289 4.9473 8.4494 6.67811 6.75479C6.30983 5.75887 6.32704 4.66127 6.72637 3.67739C7.05474 2.85876 7.63869 2.16805 8.39129 1.70807C8.9817 1.31706 9.66031 1.07944 10.3657 1.01673C11.0711 0.954022 11.7809 1.06819 12.4311 1.34892L13.0482 1.6162L10.1824 4.56738L11.4371 5.82582L14.3809 2.94887L14.6482 3.56788C14.8735 4.08976 14.993 4.65119 14.9997 5.21961C15.0064 5.78802 14.9002 6.35211 14.6872 6.87915C14.476 7.40029 14.1623 7.87368 13.7647 8.27122C13.5394 8.49169 13.2904 8.68653 13.0222 8.85218C12.4673 9.22275 11.8324 9.45636 11.1697 9.5338C10.5069 9.61124 9.83521 9.5303 9.20982 9.29764C8.11194 10.4113 5.37142 13.1704 3.89119 14.5522C3.59426 14.8219 3.20832 14.9726 2.80723 14.9754ZM10.7448 1.92802C10.087 1.92637 9.44359 2.12018 8.89614 2.48485C8.68265 2.6152 8.48437 2.76897 8.30498 2.9433C7.82789 3.42423 7.50926 4.03953 7.39182 4.70669C7.27438 5.37385 7.36374 6.06098 7.64792 6.67591L7.78342 6.97288L7.55048 7.20025C5.81224 8.89672 3.28146 11.4201 2.06479 12.7045C1.95646 12.8658 1.91012 13.0608 1.93435 13.2535C1.95857 13.4463 2.05171 13.6238 2.19657 13.7532C2.28005 13.8462 2.38177 13.9211 2.49541 13.9731C2.59557 14.0184 2.70383 14.043 2.81373 14.0455C2.98064 14.0413 3.14044 13.977 3.26383 13.8646C4.83687 12.3964 7.87622 9.32641 8.76807 8.42435L8.9973 8.19326L9.29242 8.32783C9.80617 8.56732 10.3731 8.66985 10.9382 8.62545C11.5033 8.58106 12.0473 8.39125 12.5174 8.07447C12.7313 7.9426 12.9296 7.78694 13.1085 7.61045C13.4183 7.30153 13.6631 6.93374 13.8286 6.52874C13.994 6.12375 14.0767 5.68974 14.0719 5.25228C14.0719 5.03662 14.0505 4.82148 14.0078 4.61007L11.4306 7.12508L8.87944 4.57759L11.3944 1.98834C11.1804 1.94674 10.9628 1.92653 10.7448 1.92802Z" fill="#424242"/>
</svg>

Before

Width:  |  Height:  |  Size: 2 KiB

View file

@ -73,7 +73,7 @@ class NpmScript extends TreeItem {
task: Task;
package: PackageJSON;
constructor(context: ExtensionContext, packageJson: PackageJSON, task: Task) {
constructor(_context: ExtensionContext, packageJson: PackageJSON, task: Task) {
super(task.name, TreeItemCollapsibleState.None);
const command: ExplorerCommands = workspace.getConfiguration('npm').get<ExplorerCommands>('scriptExplorerAction') || 'open';
@ -98,15 +98,9 @@ class NpmScript extends TreeItem {
this.command = commandList[command];
if (task.group && task.group === TaskGroup.Clean) {
this.iconPath = {
light: context.asAbsolutePath(path.join('resources', 'light', 'prepostscript.svg')),
dark: context.asAbsolutePath(path.join('resources', 'dark', 'prepostscript.svg'))
};
this.iconPath = new ThemeIcon('wrench-subaction');
} else {
this.iconPath = {
light: context.asAbsolutePath(path.join('resources', 'light', 'script.svg')),
dark: context.asAbsolutePath(path.join('resources', 'dark', 'script.svg'))
};
this.iconPath = new ThemeIcon('wrench');
}
if (task.detail) {
this.tooltip = task.detail;

View file

@ -0,0 +1,3 @@
.codicon-wrench-subaction {
opacity: 0.5;
}

View file

@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./codicon/codicon';
import 'vs/css!./codicon/codicon-modifications';
import 'vs/css!./codicon/codicon-animations';
import { escape } from 'vs/base/common/strings';
import { renderCodicons } from 'vs/base/common/codicons';

View file

@ -141,6 +141,10 @@
margin-top: 3px;
}
.customview-tree .monaco-list .monaco-list-row.selected .custom-view-tree-node-item > .custom-view-tree-node-item-icon.codicon {
color: currentColor !important;
}
.customview-tree .monaco-list .monaco-list-row .custom-view-tree-node-item .custom-view-tree-node-item-resourceLabel .monaco-icon-label-container > .monaco-icon-name-container {
flex: 1;
}