├── .gitignore ├── LICENSE ├── README.md ├── build.js ├── commonjs ├── mdi.d.ts └── mdi.js ├── mdi.d.ts ├── mdi.js ├── package-lock.json └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | # reduce module size 3 | mdi.ts -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Pictogrammers Free License 2 | -------------------------- 3 | 4 | This icon collection is released as free, open source, and GPL friendly by 5 | the [Pictogrammers](http://pictogrammers.com/) icon group. You may use it 6 | for commercial projects, open source projects, or anything really. 7 | 8 | # Icons: Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0) 9 | Some of the icons are redistributed under the Apache 2.0 license. All other 10 | icons are either redistributed under their respective licenses or are 11 | distributed under the Apache 2.0 license. 12 | 13 | # Fonts: Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0) 14 | All web and desktop fonts are distributed under the Apache 2.0 license. Web 15 | and desktop fonts contain some icons that are redistributed under the Apache 16 | 2.0 license. All other icons are either redistributed under their respective 17 | licenses or are distributed under the Apache 2.0 license. 18 | 19 | # Code: MIT (https://opensource.org/licenses/MIT) 20 | The MIT license applies to all non-font and non-icon files. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | > *Note:* Please use the main [MaterialDesign](https://github.com/Templarian/MaterialDesign/issues) repo to report issues. This repo is for distribution of the JavaScript files only. 2 | 3 | # JavaScript/TypeScript - Material Design Icons 4 | 5 | JavaScript and TypeScript distribution for the [Material Design Icons](https://materialdesignicons.com). This module contains all the path data for all icons. 6 | 7 | ``` 8 | npm install @mdi/js 9 | ``` 10 | 11 | ## Usage 12 | 13 | ```js 14 | import { mdiAccount } from '@mdi/js' 15 | 16 | console.log(mdiAccount); // "M...Z" 17 | ``` 18 | 19 | > Note: [WebPack](https://webpack.js.org) 4 or [Rollup](https://rollupjs.org) will tree shake unused icons. 20 | 21 | ## Related Packages 22 | 23 | [NPM @MDI Organization](https://npmjs.com/org/mdi) 24 | 25 | - React: [MaterialDesign-React](https://github.com/Templarian/MaterialDesign-React) 26 | - SVG: [MaterialDesign-SVG](https://github.com/Templarian/MaterialDesign-SVG) 27 | - Webfont: [MaterialDesign-Webfont](https://github.com/Templarian/MaterialDesign-Webfont) 28 | - Font-Build: [MaterialDesign-Font-Build](https://github.com/Templarian/MaterialDesign-Font-Build) 29 | - Desktop Font: [MaterialDesign-Font](https://github.com/Templarian/MaterialDesign-Font) 30 | 31 | ## Learn More 32 | 33 | - [MaterialDesignIcons.com](https://materialdesignicons.com) 34 | - https://github.com/Templarian/MaterialDesign -------------------------------------------------------------------------------- /build.js: -------------------------------------------------------------------------------- 1 | const util = require('@mdi/util'); 2 | 3 | const meta = util.getMeta(true); 4 | 5 | const find = /(\-\w)/g; 6 | const convert = function(matches){ 7 | return matches[1].toUpperCase(); 8 | }; 9 | 10 | const lines = meta.map(icon => { 11 | let name = icon.name.replace(find, convert); 12 | name = `${name[0].toUpperCase()}${name.slice(1)}`; 13 | return `export const mdi${name}: string = "${icon.path}";`; 14 | }); 15 | 16 | const output = `// Material Design Icons v${util.getVersion()}\n${lines.join('\n')}`; 17 | 18 | util.write("mdi.ts", output); -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@mdi/js", 3 | "version": "7.4.47", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "@mdi/js", 9 | "version": "7.4.47", 10 | "license": "Apache-2.0", 11 | "devDependencies": { 12 | "@mdi/svg": "^7.4.47", 13 | "@mdi/util": "^0.3.2" 14 | } 15 | }, 16 | "node_modules/@mdi/svg": { 17 | "version": "7.4.47", 18 | "resolved": "https://registry.npmjs.org/@mdi/svg/-/svg-7.4.47.tgz", 19 | "integrity": "sha512-WQ2gDll12T9WD34fdRFgQVgO8bag3gavrAgJ0frN4phlwdJARpE6gO1YvLEMJR0KKgoc+/Ea/A0Pp11I00xBvw==", 20 | "dev": true 21 | }, 22 | "node_modules/@mdi/util": { 23 | "version": "0.3.2", 24 | "resolved": "https://registry.npmjs.org/@mdi/util/-/util-0.3.2.tgz", 25 | "integrity": "sha512-0ICbKIcsI+OYSqz6SWsYVJA6+kM+irQQiwYGBtJlq0a0sI0JrB2bCrc4S/xVfexqwa1EG8dlSY/ohsQllEXnyQ==", 26 | "dev": true 27 | } 28 | }, 29 | "dependencies": { 30 | "@mdi/svg": { 31 | "version": "7.4.47", 32 | "resolved": "https://registry.npmjs.org/@mdi/svg/-/svg-7.4.47.tgz", 33 | "integrity": "sha512-WQ2gDll12T9WD34fdRFgQVgO8bag3gavrAgJ0frN4phlwdJARpE6gO1YvLEMJR0KKgoc+/Ea/A0Pp11I00xBvw==", 34 | "dev": true 35 | }, 36 | "@mdi/util": { 37 | "version": "0.3.2", 38 | "resolved": "https://registry.npmjs.org/@mdi/util/-/util-0.3.2.tgz", 39 | "integrity": "sha512-0ICbKIcsI+OYSqz6SWsYVJA6+kM+irQQiwYGBtJlq0a0sI0JrB2bCrc4S/xVfexqwa1EG8dlSY/ohsQllEXnyQ==", 40 | "dev": true 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@mdi/js", 3 | "version": "7.4.47", 4 | "description": "Dist for Material Design Icons for JS/TypeScript", 5 | "main": "commonjs/mdi.js", 6 | "module": "mdi.js", 7 | "types": "mdi.d.ts", 8 | "sideEffects": false, 9 | "scripts": { 10 | "build": "npm update && npm install && npm run buildjs && npm run es5 && npm run commonjs", 11 | "buildjs": "node build.js", 12 | "es5": "tsc -d mdi.ts --target es5 --module es2015", 13 | "commonjs": "tsc -d mdi.ts --outDir commonjs", 14 | "umd": "tsc -d mdi.ts --module UMD --outDir umd", 15 | "test": "echo \"Error: no test specified\" && exit 1" 16 | }, 17 | "repository": { 18 | "type": "git", 19 | "url": "git+https://github.com/Templarian/MaterialDesign-JS.git" 20 | }, 21 | "keywords": [ 22 | "Material", 23 | "Design", 24 | "Icons", 25 | "mdi" 26 | ], 27 | "author": "Austin Andrews", 28 | "license": "Apache-2.0", 29 | "bugs": { 30 | "url": "https://github.com/Templarian/MaterialDesign-JS/issues" 31 | }, 32 | "homepage": "https://github.com/Templarian/MaterialDesign-JS#readme", 33 | "devDependencies": { 34 | "@mdi/svg": "^7.4.47", 35 | "@mdi/util": "^0.3.2" 36 | } 37 | } 38 | --------------------------------------------------------------------------------