Adding material icon theme submodule and patches.
This commit is contained in:
parent
492a559279
commit
febc5cf2b2
17
.gitignore
vendored
Normal file
17
.gitignore
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
.pc
|
||||
out
|
||||
dist
|
||||
|
||||
node_modules
|
||||
|
||||
.vscode-test/**
|
||||
*.vsix
|
||||
|
||||
icons/file.svg
|
||||
icons/folder.svg
|
||||
icons/folder-open.svg
|
||||
icons/folder-root.svg
|
||||
icons/folder-root-open.svg
|
||||
|
||||
src/scripts/preview/*.html
|
||||
src/scripts/contributors/*.html
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "material-icon-theme"]
|
||||
path = material-icon-theme
|
||||
url = git@github.com:PKief/vscode-material-icon-theme.git
|
62
build/web-extension.webpack.config.js
Normal file
62
build/web-extension.webpack.config.js
Normal file
@ -0,0 +1,62 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
//@ts-check
|
||||
'use strict';
|
||||
|
||||
//@ts-check
|
||||
/** @typedef {import('webpack').Configuration} WebpackConfig **/
|
||||
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
|
||||
module.exports = /** @type WebpackConfig */ {
|
||||
context: path.dirname(__dirname),
|
||||
mode: 'none', // this leaves the source code as close as possible to the original (when packaging we set this to 'production')
|
||||
target: 'webworker', // extensions run in a webworker context
|
||||
entry: {
|
||||
extension: './material-icon-theme/src/web/extension.ts',
|
||||
},
|
||||
resolve: {
|
||||
mainFields: ['browser', 'module', 'main'],
|
||||
extensions: ['.ts', '.js'], // support ts-files and js-files
|
||||
alias: {},
|
||||
fallback: {
|
||||
assert: require.resolve('assert'),
|
||||
path: false,
|
||||
fs: false,
|
||||
},
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
exclude: /node_modules/,
|
||||
use: [
|
||||
{
|
||||
loader: 'ts-loader',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new webpack.ProvidePlugin({
|
||||
process: 'process/browser',
|
||||
}),
|
||||
],
|
||||
externals: {
|
||||
vscode: 'commonjs vscode', // ignored because it doesn't exist
|
||||
},
|
||||
performance: {
|
||||
hints: false,
|
||||
},
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
path: path.join(__dirname, '../dist/web'),
|
||||
libraryTarget: 'commonjs',
|
||||
},
|
||||
devtool: 'nosources-source-map',
|
||||
};
|
53
build/webpack.config.js
Normal file
53
build/webpack.config.js
Normal file
@ -0,0 +1,53 @@
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
|
||||
const ROOT_DIR = path.resolve(__dirname);
|
||||
|
||||
const copyPatterns = [
|
||||
{
|
||||
from: `${ROOT_DIR}/../fonts/fira-code-vf.woff`, to: '[name][ext]',
|
||||
}
|
||||
];
|
||||
|
||||
/** @type {import('webpack').Configuration} */
|
||||
const config = {
|
||||
context: path.dirname(__dirname),
|
||||
target: 'node',
|
||||
node: {
|
||||
__dirname: false,
|
||||
__filename: false,
|
||||
},
|
||||
entry: './material-icon-theme/src/extension.ts',
|
||||
output: {
|
||||
path: path.resolve(__dirname, '../dist'),
|
||||
filename: 'extension.js',
|
||||
libraryTarget: 'commonjs2',
|
||||
devtoolModuleFilenameTemplate: '../[resource-path]',
|
||||
clean: true,
|
||||
},
|
||||
devtool: 'source-map',
|
||||
externals: {
|
||||
vscode: 'commonjs vscode',
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.ts', '.js'],
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
exclude: /node_modules/,
|
||||
use: 'ts-loader',
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new CopyPlugin({
|
||||
patterns: copyPatterns
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
||||
module.exports = config;
|
BIN
fonts/.DS_Store
vendored
Normal file
BIN
fonts/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
fonts/FiraCode-Regular.ttf
Normal file
BIN
fonts/FiraCode-Regular.ttf
Normal file
Binary file not shown.
BIN
fonts/FiraCode-Regular.woff
Normal file
BIN
fonts/FiraCode-Regular.woff
Normal file
Binary file not shown.
BIN
fonts/fira-code-nerd-font-regular.woff
Normal file
BIN
fonts/fira-code-nerd-font-regular.woff
Normal file
Binary file not shown.
BIN
fonts/fira-code-variable-font-wght.ttf
Normal file
BIN
fonts/fira-code-variable-font-wght.ttf
Normal file
Binary file not shown.
BIN
fonts/fira-code-variable-font-wght.woff
Normal file
BIN
fonts/fira-code-variable-font-wght.woff
Normal file
Binary file not shown.
BIN
fonts/fira-code-vf.woff
Normal file
BIN
fonts/fira-code-vf.woff
Normal file
Binary file not shown.
1
material-icon-theme
Submodule
1
material-icon-theme
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 9fbf85c7247f494c1d60d93edd24ec275ff635c5
|
8022
package-lock.json
generated
Normal file
8022
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
269
package.json
Normal file
269
package.json
Normal file
@ -0,0 +1,269 @@
|
||||
{
|
||||
"name": "fira-code-material-icon-theme",
|
||||
"displayName": "Fira Code and Material Icon Theme",
|
||||
"description": "Fira Code Font and Material Design Icons for Visual Studio Code",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"build": "npm run compile:dev && npm run generateJson",
|
||||
"check": "ts-node ./src/scripts/icons/checks",
|
||||
"compile": "webpack --config ./build/webpack.config.js --mode production",
|
||||
"compile:dev": "webpack --config ./build/webpack.config.js --mode none",
|
||||
"compile:watch": "webpack --config ./build/webpack.config.js --mode none --watch",
|
||||
"compile-web": "webpack --config ./build/web-extension.webpack.config.js",
|
||||
"watch-web": "webpack --watch --config ./build/web-extension.webpack.config.js",
|
||||
"package-web": "webpack --mode production --devtool hidden-source-map --config ./build/web-extension.webpack.config.js",
|
||||
"contributors": "ts-node ./material-icon-theme/src/scripts/contributors/index.ts",
|
||||
"generateJson": "ts-node ./material-icon-theme/src/scripts/icons/generateJson.ts",
|
||||
"lint": "eslint -c .eslintrc.json --ext .ts ./material-icon-theme/src/**/*.ts",
|
||||
"postcompile": "npm run generateJson && npm run check",
|
||||
"pretest": "npm run build && tsc -p ./",
|
||||
"preview": "ts-node ./src/scripts/preview",
|
||||
"svgo": "svgo -i icons -o icons -q",
|
||||
"test": "node ./out/test/runTest.js",
|
||||
"changelog": "changelog-machine --config changelog.config.json",
|
||||
"preversion": "npm run contributors && git add images/contributors.png && npm run preview && git add images/fileIcons.png && git add images/folderIcons.png",
|
||||
"version": "npm run changelog && git add CHANGELOG.md",
|
||||
"vscode:prepublish": "npm run package-web"
|
||||
},
|
||||
"publisher": "aleleba",
|
||||
"author": {
|
||||
"name": "Alejandro Lembke Barrientos",
|
||||
"email": "aleleba01@gmail.com",
|
||||
"url": "https://github.com/aleleba"
|
||||
},
|
||||
"engines": {
|
||||
"vscode": "^1.51.0"
|
||||
},
|
||||
"homepage": "https://github.com/aleleba/vscode-fira-code-and-material-icon-theme",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aleleba/vscode-fira-code-and-material-icon-theme.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/aleleba/vscode-fira-code-and-material-icon-theme/issues"
|
||||
},
|
||||
"icon": "logo.png",
|
||||
"galleryBanner": {
|
||||
"color": "#1e1e1e",
|
||||
"theme": "dark"
|
||||
},
|
||||
"categories": [
|
||||
"Themes"
|
||||
],
|
||||
"keywords": [
|
||||
"icons",
|
||||
"font",
|
||||
"Fira Code",
|
||||
"theme",
|
||||
"material",
|
||||
"icon-theme",
|
||||
"customization"
|
||||
],
|
||||
"extensionKind": [
|
||||
"ui",
|
||||
"workspace"
|
||||
],
|
||||
"capabilities": {
|
||||
"untrustedWorkspaces": {
|
||||
"supported": true
|
||||
},
|
||||
"virtualWorkspaces": true
|
||||
},
|
||||
"activationEvents": [
|
||||
"onStartupFinished"
|
||||
],
|
||||
"main": "./dist/extension",
|
||||
"browser": "./dist/web/extension.js",
|
||||
"sideEffects": false,
|
||||
"files": [
|
||||
"icons",
|
||||
"dist/material-icons.json"
|
||||
],
|
||||
"contributes": {
|
||||
"iconThemes": [
|
||||
{
|
||||
"id": "fira-code-material-icon-theme",
|
||||
"label": "Fira Code And Material Icon Theme",
|
||||
"path": "./dist/material-icons.json",
|
||||
"_watch": true
|
||||
}
|
||||
],
|
||||
"commands": [
|
||||
{
|
||||
"command": "material-icon-theme.activateIcons",
|
||||
"title": "%command.activateIcons%",
|
||||
"enablement": "!isWeb"
|
||||
},
|
||||
{
|
||||
"command": "material-icon-theme.toggleIconPacks",
|
||||
"title": "%command.toggleIconPacks%",
|
||||
"enablement": "!isWeb"
|
||||
},
|
||||
{
|
||||
"command": "material-icon-theme.changeFolderTheme",
|
||||
"title": "%command.changeFolderTheme%",
|
||||
"enablement": "!isWeb"
|
||||
},
|
||||
{
|
||||
"command": "material-icon-theme.changeFolderColor",
|
||||
"title": "%command.changeFolderColor%",
|
||||
"enablement": "!isWeb"
|
||||
},
|
||||
{
|
||||
"command": "material-icon-theme.changeFileColor",
|
||||
"title": "%command.changeFileColor%",
|
||||
"enablement": "!isWeb"
|
||||
},
|
||||
{
|
||||
"command": "material-icon-theme.restoreDefaultConfig",
|
||||
"title": "%command.restoreDefaultConfig%",
|
||||
"enablement": "!isWeb"
|
||||
},
|
||||
{
|
||||
"command": "material-icon-theme.toggleExplorerArrows",
|
||||
"title": "%command.toggleExplorerArrows%",
|
||||
"enablement": "!isWeb"
|
||||
},
|
||||
{
|
||||
"command": "material-icon-theme.changeOpacity",
|
||||
"title": "%command.changeOpacity%",
|
||||
"enablement": "!isWeb"
|
||||
},
|
||||
{
|
||||
"command": "material-icon-theme.toggleGrayscale",
|
||||
"title": "%command.toggleGrayscale%",
|
||||
"enablement": "!isWeb"
|
||||
},
|
||||
{
|
||||
"command": "material-icon-theme.changeSaturation",
|
||||
"title": "%command.changeSaturation%",
|
||||
"enablement": "!isWeb"
|
||||
}
|
||||
],
|
||||
"configuration": {
|
||||
"type": "object",
|
||||
"title": "%configuration.title%",
|
||||
"properties": {
|
||||
"material-icon-theme.activeIconPack": {
|
||||
"type": "string",
|
||||
"default": "angular",
|
||||
"description": "%configuration.activeIconPack%",
|
||||
"enumDescriptions": [
|
||||
"%configuration.activeIconPack.angular%",
|
||||
"%configuration.activeIconPack.angular_ngrx%",
|
||||
"%configuration.activeIconPack.react%",
|
||||
"%configuration.activeIconPack.react_redux%",
|
||||
"%configuration.activeIconPack.qwik%",
|
||||
"%configuration.activeIconPack.vue%",
|
||||
"%configuration.activeIconPack.vue_vuex%",
|
||||
"%configuration.activeIconPack.nest%",
|
||||
"%configuration.activeIconPack.none%"
|
||||
],
|
||||
"enum": [
|
||||
"angular",
|
||||
"angular_ngrx",
|
||||
"react",
|
||||
"react_redux",
|
||||
"qwik",
|
||||
"vue",
|
||||
"vue_vuex",
|
||||
"nest",
|
||||
"none"
|
||||
]
|
||||
},
|
||||
"material-icon-theme.files.associations": {
|
||||
"type": "object",
|
||||
"default": {},
|
||||
"description": "%configuration.files.associations%"
|
||||
},
|
||||
"material-icon-theme.folders.associations": {
|
||||
"type": "object",
|
||||
"default": {},
|
||||
"description": "%configuration.folders.associations%"
|
||||
},
|
||||
"material-icon-theme.languages.associations": {
|
||||
"type": "object",
|
||||
"default": {},
|
||||
"description": "%configuration.languages.associations%"
|
||||
},
|
||||
"material-icon-theme.folders.theme": {
|
||||
"type": "string",
|
||||
"default": "specific",
|
||||
"description": "%configuration.folders.theme%",
|
||||
"enumDescriptions": [
|
||||
"%configuration.folders.theme.specific%",
|
||||
"%configuration.folders.theme.classic%",
|
||||
"%configuration.folders.theme.none%"
|
||||
],
|
||||
"enum": [
|
||||
"specific",
|
||||
"classic",
|
||||
"none"
|
||||
]
|
||||
},
|
||||
"material-icon-theme.folders.color": {
|
||||
"type": "string",
|
||||
"default": "#90a4ae",
|
||||
"pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$",
|
||||
"description": "%configuration.folders.color%"
|
||||
},
|
||||
"material-icon-theme.files.color": {
|
||||
"type": "string",
|
||||
"default": "#90a4ae",
|
||||
"pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$",
|
||||
"description": "%configuration.files.color%"
|
||||
},
|
||||
"material-icon-theme.opacity": {
|
||||
"type": "number",
|
||||
"default": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1,
|
||||
"description": "%configuration.opacity%"
|
||||
},
|
||||
"material-icon-theme.hidesExplorerArrows": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "%configuration.hidesExplorerArrows%"
|
||||
},
|
||||
"material-icon-theme.saturation": {
|
||||
"type": "number",
|
||||
"default": 1,
|
||||
"minimum": 0,
|
||||
"maximum": 1,
|
||||
"description": "%configuration.saturation%"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"lodash.merge": "4.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/glob": "^7.2.0",
|
||||
"@types/lodash.merge": "^4.6.7",
|
||||
"@types/mocha": "^9.1.1",
|
||||
"@types/node": "^17.0.35",
|
||||
"@types/puppeteer": "^5.4.6",
|
||||
"@types/vscode": "~1.51.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.26.0",
|
||||
"@typescript-eslint/parser": "^5.26.0",
|
||||
"axios": "^1.4.0",
|
||||
"changelog-machine": "^1.0.2",
|
||||
"copy-webpack-plugin": "^11.0.0",
|
||||
"eslint": "^8.16.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"glob": "^8.0.3",
|
||||
"mocha": "^10.0.0",
|
||||
"prettier": "^2.6.2",
|
||||
"puppeteer": "^14.1.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"svgo": "^2.8.0",
|
||||
"ts-loader": "^9.3.0",
|
||||
"ts-node": "^10.8.0",
|
||||
"typescript": "^4.7.2",
|
||||
"vscode-test": "^1.6.1",
|
||||
"webpack": "^5.71.1",
|
||||
"webpack-cli": "^4.9.2"
|
||||
}
|
||||
}
|
67
patches/fira-patch.diff
Normal file
67
patches/fira-patch.diff
Normal file
@ -0,0 +1,67 @@
|
||||
Index: vscode-fira-code-and-material-icon-theme/material-icon-theme/src/icons/generator/jsonGenerator.ts
|
||||
===================================================================
|
||||
--- vscode-fira-code-and-material-icon-theme.orig/material-icon-theme/src/icons/generator/jsonGenerator.ts
|
||||
+++ vscode-fira-code-and-material-icon-theme/material-icon-theme/src/icons/generator/jsonGenerator.ts
|
||||
@@ -34,6 +34,20 @@ export const generateIconConfigurationOb
|
||||
options: IconJsonOptions
|
||||
): IconConfiguration => {
|
||||
const iconConfig = merge({}, new IconConfiguration(), { options });
|
||||
+ const fonts = [
|
||||
+ {
|
||||
+ id: 'Fira Code',
|
||||
+ src: [
|
||||
+ {
|
||||
+ path: './fira-code-vf.woff',
|
||||
+ format: 'woff',
|
||||
+ },
|
||||
+ ],
|
||||
+ weight: 'normal',
|
||||
+ style: 'normal',
|
||||
+ size: '100%',
|
||||
+ },
|
||||
+ ];
|
||||
const languageIconDefinitions = loadLanguageIconDefinitions(
|
||||
languageIcons,
|
||||
iconConfig,
|
||||
@@ -50,12 +64,19 @@ export const generateIconConfigurationOb
|
||||
options
|
||||
);
|
||||
|
||||
- return merge(
|
||||
+ let returnedObject = merge(
|
||||
{},
|
||||
languageIconDefinitions,
|
||||
fileIconDefinitions,
|
||||
folderIconDefinitions
|
||||
);
|
||||
+
|
||||
+ returnedObject = {
|
||||
+ ...returnedObject,
|
||||
+ fonts,
|
||||
+ };
|
||||
+
|
||||
+ return returnedObject;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -139,7 +160,7 @@ export const createIconFile = (
|
||||
let iconJsonPath = __dirname;
|
||||
// if executed via script
|
||||
if (basename(__dirname) !== 'dist') {
|
||||
- iconJsonPath = join(__dirname, '..', '..', '..', 'dist');
|
||||
+ iconJsonPath = join(__dirname, '..', '..', '..', '..', 'dist');
|
||||
}
|
||||
writeFileSync(
|
||||
join(iconJsonPath, iconJsonName),
|
||||
Index: vscode-fira-code-and-material-icon-theme/material-icon-theme/src/models/iconConfiguration.ts
|
||||
===================================================================
|
||||
--- vscode-fira-code-and-material-icon-theme.orig/material-icon-theme/src/models/iconConfiguration.ts
|
||||
+++ vscode-fira-code-and-material-icon-theme/material-icon-theme/src/models/iconConfiguration.ts
|
||||
@@ -1,6 +1,7 @@
|
||||
import { IconJsonOptions } from './';
|
||||
|
||||
export class IconConfiguration {
|
||||
+ fonts?: Array<any>;
|
||||
file?: string;
|
||||
folder?: string;
|
||||
folderExpanded?: string;
|
1
patches/series
Normal file
1
patches/series
Normal file
@ -0,0 +1 @@
|
||||
fira-patch.diff
|
Loading…
Reference in New Issue
Block a user