dev eb73e7d6c8c9 cached
18 files
23.9 KB
7.7k tokens
4 symbols
1 requests
Download .txt
Repository: robcresswell/vue-material-design-icons
Branch: dev
Commit: eb73e7d6c8c9
Files: 18
Total size: 23.9 KB

Directory structure:
gitextract_5c8v8d18/

├── .babelrc
├── .circleci/
│   └── config.yml
├── .dependabot/
│   └── config.yml
├── .gitignore
├── .npmrc
├── .nvmrc
├── .prettierrc.json
├── .releaserc
├── CHANGELOG.md
├── LICENSE
├── README.md
├── __tests__/
│   ├── __snapshots__/
│   │   └── icon.js.snap
│   └── icon.js
├── build.ts
├── jest.config.js
├── package.json
├── styles.css
└── tsconfig.json

================================================
FILE CONTENTS
================================================

================================================
FILE: .babelrc
================================================
{
  "presets": [["@babel/preset-env", {"targets": { "node": "current" }}]]
}


================================================
FILE: .circleci/config.yml
================================================
version: 2.1
defaults: &defaults
  working_directory: ~/ci
  resource_class: small
  docker:
    - image: cimg/node:lts
commands:
  install_deps:
    description: Install dependencies
    steps:
      - checkout
      - run: npm ci
jobs:
  test:
    <<: *defaults
    steps:
      - install_deps
      - run: npm run build
      - run: ./node_modules/.bin/jest --runInBand --ci
      - store_test_results:
          path: reports
  release:
    <<: *defaults
    steps:
      - install_deps
      - run: npm run build
      - run: npx semantic-release
workflows:
  version: 2
  test_and_release:
    jobs:
      - test
      - release:
          requires:
            - test


================================================
FILE: .dependabot/config.yml
================================================
version: 1

update_configs:
  - package_manager: "javascript"
    directory: "/"
    update_schedule: "live"
    default_reviewers:
      - "robcresswell"
    default_assignees:
      - "robcresswell"
    version_requirement_updates: "increase_versions"
    commit_message:
      prefix: "feat"
      prefix_development: "chore"
      include_scope: true


================================================
FILE: .gitignore
================================================
*.swp
.DS_Store
node_modules/
*.log
*.tgz
dist/
coverage/
reports/


================================================
FILE: .npmrc
================================================
audit=false
fund=false


================================================
FILE: .nvmrc
================================================
18


================================================
FILE: .prettierrc.json
================================================
{
  "arrowParens": "always",
  "trailingComma": "all",
  "singleQuote": true,
  "htmlWhitespaceSensitivity": "ignore"
}


================================================
FILE: .releaserc
================================================
{
  "branches": "dev",
  "tagFormat": "${version}",
  "pkgRoot": "dist/",
  "plugins": [
    "@semantic-release/commit-analyzer",
    [
      "@semantic-release/github",
      {
        "successComment": false
      }
    ],
    "@semantic-release/npm",
    "@semantic-release/release-notes-generator"
  ]
}


================================================
FILE: CHANGELOG.md
================================================
# Change Log

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

# [3.2.0](https://gitlab.com/robcresswell/vue-material-design-icons/compare/3.1.0...3.2.0) (2019-04-24)


### Features

* New icons (mdi dep update) ([0382799](https://gitlab.com/robcresswell/vue-material-design-icons/commit/0382799))



# [3.1.0](https://gitlab.com/robcresswell/vue-material-design-icons/compare/3.0.0...3.1.0) (2019-03-04)


### Features

* New icons & dependency upgrades ([03b3de1](https://gitlab.com/robcresswell/vue-material-design-icons/commit/03b3de1))



<a name="3.0.0"></a>
# [3.0.0](https://gitlab.com/robcresswell/vue-material-design-icons/compare/2.8.0...3.0.0) (2019-02-03)


### Bug Fixes

* delegate click events ([84f5c00](https://gitlab.com/robcresswell/vue-material-design-icons/commit/84f5c00))


### BREAKING CHANGES

* This is an extremely cautious breaking change, mostly
because an icon library should definitely not cause breakages.

Previously the library required manually added click handlers, which was
fine when declaring the icons inline but not helpful when using them
programmatically with libraries like Vuetify.



<a name="2.8.0"></a>
# [2.8.0](https://gitlab.com/robcresswell/vue-material-design-icons/compare/2.7.0...2.8.0) (2019-02-03)


### Features

* Add ability to change size via a prop ([d4e76ed](https://gitlab.com/robcresswell/vue-material-design-icons/commit/d4e76ed))



<a name="2.7.0"></a>
# [2.7.0](https://gitlab.com/robcresswell/vue-material-design-icons/compare/2.6.0...2.7.0) (2019-02-03)


### Features

* Add more icons ([05f3f45](https://gitlab.com/robcresswell/vue-material-design-icons/commit/05f3f45))



<a name="2.6.0"></a>
# [2.6.0](https://gitlab.com/robcresswell/vue-material-design-icons/compare/2.5.0...2.6.0) (2019-01-03)


### Features

* Add new icons (update [@mdi](https://gitlab.com/mdi)/js) ([285726e](https://gitlab.com/robcresswell/vue-material-design-icons/commit/285726e))



<a name="2.5.0"></a>
# [2.5.0](https://gitlab.com/robcresswell/vue-material-design-icons/compare/2.4.0...2.5.0) (2018-12-23)


### Bug Fixes

* A basic size instructions to README ([66bf350](https://gitlab.com/robcresswell/vue-material-design-icons/commit/66bf350))
* IE11 tooltip support ([3966a2d](https://gitlab.com/robcresswell/vue-material-design-icons/commit/3966a2d))


### Features

* Add new icons (update [@mdi](https://gitlab.com/mdi)/js) ([23f7868](https://gitlab.com/robcresswell/vue-material-design-icons/commit/23f7868))



<a name="2.4.0"></a>
# [2.4.0](https://gitlab.com/robcresswell/vue-material-design-icons/compare/2.3.0...2.4.0) (2018-11-04)


### Features

* New icons (updated mdi) ([236124c](https://gitlab.com/robcresswell/vue-material-design-icons/commit/236124c))



<a name="2.3.0"></a>
# [2.3.0](https://gitlab.com/robcresswell/vue-material-design-icons/compare/2.1.1...2.3.0) (2018-10-10)


### Features

* Update to newest version of mdi ([208c0ab](https://gitlab.com/robcresswell/vue-material-design-icons/commit/208c0ab))



<a name="2.2.0"></a>
# [2.2.0](https://gitlab.com/robcresswell/vue-material-design-icons/compare/2.1.1...2.2.0) (2018-10-10)


### Features

* Update to newest version of mdi ([208c0ab](https://gitlab.com/robcresswell/vue-material-design-icons/commit/208c0ab))



<a name="2.1.1"></a>
## [2.1.1](https://gitlab.com/robcresswell/vue-material-design-icons/compare/2.1.0...2.1.1) (2018-09-03)


### Bug Fixes

* Fix broken publish ([c7fb649](https://gitlab.com/robcresswell/vue-material-design-icons/commit/c7fb649))



<a name="2.1.0"></a>
# [2.1.0](https://gitlab.com/robcresswell/vue-material-design-icons/compare/2.0.0...2.1.0) (2018-09-03)


### Features

* Update mdi (new icons) ([8e2dc27](https://gitlab.com/robcresswell/vue-material-design-icons/commit/8e2dc27))



<a name="2.0.0"></a>
# [2.0.0](https://gitlab.com/robcresswell/vue-material-design-icons/compare/1.6.0...2.0.0) (2018-08-18)


### Features

* Upgrade MDI & match vue styleguide ([cfdf17e](https://gitlab.com/robcresswell/vue-material-design-icons/commit/cfdf17e)), closes [#1](https://gitlab.com/robcresswell/vue-material-design-icons/issues/1) [#2](https://gitlab.com/robcresswell/vue-material-design-icons/issues/2)


### BREAKING CHANGES

* Match the component names to the structure recommended
by the Vue style guide. This means all files now begin with a capital
letter, i.e. "android.vue" is now "Android.vue", and the component
names are Pascal-cased instead of camel-cased. i.e.
"CheckboxMarkedCircle" instead of "checkbox-marked-circle".

Other changes include:
- Async build script, to make it a little faster. Also refactored to
  use the new @mdi/svg repo, so some of the build hacks can go away.
- Added some testing and snapshots, to make upgrades quicker to verify.
- Updated to the lastest version of MDI for more icons.
- Updated the LICENSE for 2018
- Added .nvmrc
- Fairly unimportant, but the generated .vue files now pass all the
  rules on the Vue style guide; this should make them a little more
  consistent and easier to read for those familiar with Vue.



<a name="1.6.0"></a>
# [1.6.0](https://gitlab.com/robcresswell/vue-material-design-icons/compare/1.5.1...1.6.0) (2018-07-22)


### Features

* Update mdi to 2.5.94 ([6fefdbe](https://gitlab.com/robcresswell/vue-material-design-icons/commit/6fefdbe))



<a name="1.5.1"></a>
## [1.5.1](https://gitlab.com/robcresswell/vue-material-design-icons/compare/1.5.0...1.5.1) (2018-05-28)


### Bug Fixes

* Fix release script ([4a7b3df](https://gitlab.com/robcresswell/vue-material-design-icons/commit/4a7b3df))



<a name="1.5.0"></a>
# [1.5.0](https://gitlab.com/robcresswell/vue-material-design-icons/compare/1.4.0...1.5.0) (2018-05-28)


### Features

* Update to latest version of material design icons ([57d4857](https://gitlab.com/robcresswell/vue-material-design-icons/commit/57d4857))



<a name="1.4.0"></a>
# [1.4.0](https://gitlab.com/robcresswell/vue-material-design-icons/compare/1.3.0...1.4.0) (2018-04-19)


### Bug Fixes

* Make standard-version tag format match existing tags ([13ca214](https://gitlab.com/robcresswell/vue-material-design-icons/commit/13ca214))
* Remove CHANGELOG header for standard-version ([cd28237](https://gitlab.com/robcresswell/vue-material-design-icons/commit/cd28237))


### Features

* Add standard-version for easier CHANGELOG creation ([826b17d](https://gitlab.com/robcresswell/vue-material-design-icons/commit/826b17d))
* Upgrade the build tooling ([52495c0](https://gitlab.com/robcresswell/vue-material-design-icons/commit/52495c0))
* Use [@mdi](https://gitlab.com/mdi)/svg from npm instead of git ([7542255](https://gitlab.com/robcresswell/vue-material-design-icons/commit/7542255))



## [1.3.0] - 2018-04-02
- Updated to use icons from v2.2.43 of [MaterialDesign]
  (https://github.com/Templarian/MaterialDesign)

## [1.2.1] - 2018-03-08

### Changed
- Updated `styles.css` so that it was actually valid CSS. Previously it was
  SCSS. *facepalm*

## [1.2.0] - 2018-03-07

### Changed
- Updated the `MaterialDesign-SVG` dependency, adding many new icons
- Moved the internal tooling to Yarn
- Slightly changed the repo description wording

## [1.1.0] - 2018-02-07

### Added
- Added a `fillColor` prop that lets you set a fill colour via component prop
  rather than CSS. Thanks to [Sagar Subedi](https://gitlab.com/sagarSubedi) for
  the change.

### Changed
- Modified the base template to set a default title via prop definition, instead
  of using a computed prop. This shouldn't make any outward difference, but makes
  the code a little cleaner.

### Fixed
- Improved the package.json scripts so that they work from a fresh clone
  of the repo.

## [1.0.0] - 2018-01-09

### Added
- Added a "Props" section to the README
- Added a `decorative` prop that toggles whether icons are hidden from
  screen readers. This is false by default (i.e. icons are shown to screen
  readers)

### Changed
- Changed the icon IDs to classes (i.e. `#android-icon` is now `.android-icon`)
  to avoid invalid HTML when using the same icon multiple times in one page
- Changed the `aria-labelled-by` attribute to an `aria-label` attribute to
  avoid using duplicate IDs
- Changed the wrapping element from a `<div>` to a `<span>`

## [0.8.2] - 2017-12-13

### Changed
- Small improvements to the README, such as extra tips, and formatting fixes

## [0.8.1] - 2017-12-11

### Fixed
- Fixed the excessive padding around the `title`

## [0.8.0] - 2017-12-11

### Changed
- Updated the `MaterialDesign-SVG` dependency, adding many new icons
- Updated to a new version of `mustache`
- Added credit referencing the `mdi-vue` library

## [0.7.1] - 2017-08-06

### Added
- Added a "Tips" section to the `README`

## [0.7.0] - 2017-08-06

### Added
- Added a `title` prop to the icons, allowing the title to be customised. The
  default is still `<icon-name>-icon`, e.g. `android-icon`

### Changed
- Changed the title ID from `<icon-name>-title` to `<icon-name>-icon-title`

## [0.6.3] - 2017-07-27

### Fixed
- Added a note about finding the icon list to the `README`

## [0.6.2] - 2017-07-27

### Fixed
- Made the icon source more explicit in the `README`

## [0.6.1] - 2017-07-25

### Fixed
- Added the missing `CHANGELOG` entry for 0.6.0

## [0.6.0] - 2017-07-25

### Changed
- Changed from the
  [MaterialDesign](https://github.com/Templarian/MaterialDesign) repo to
  [MaterialDesign-SVG](https://github.com/Templarian/MaterialDesign-SVG) repo
  to take advantage of the smaller repo and compressed paths. Overall, this
  reduces the size of this repo and its distributed icons. Yay!

## [0.5.0] - 2017-07-25

### Changed
- Updated the `README` to make install steps clearer and added additional
  credits
- Small fixes to the `CHANGELOG` formatting

## [0.4.0] - 2017-07-25

### Changed
- The CSS is no longer included in each component by default. It can be
  optionally added by including `vue-material-design-icons/styles.css`
- `README` updated to include adding the CSS

## [0.3.1] - 2017-07-24

### Changed
- Updated the package.json keywords
- Small fixes to `README` and `CHANGELOG`

## [0.3.0] - 2017-07-24

### Added
- Added a `CHANGELOG` to better track updates
- Added `LICENSE` to distributed package

### Changed
- Split out CSS from the template file, to reduce the overall package size


================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2018 Rob Cresswell

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: README.md
================================================
# Vue Material Design Icon Components

This library is a collection of Vue single-file components to render Material
Design Icons, sourced from the
[MaterialDesign project](https://github.com/Templarian/MaterialDesign 'MaterialDesign Github page').
It also includes some CSS that helps make the scaling of the icons a little
easier.

## Getting started

1. Install the package

   ```console
   yarn add vue-material-design-icons
   ```

   **OR**

   ```console
   npm i vue-material-design-icons
   ```

2. Import the icon, and declare it as a local component:

   ```javascript
   import MenuIcon from 'vue-material-design-icons/Menu.vue';

   components: {
     MenuIcon;
   }
   ```

   **OR**

   Declare it as a global component:

   ```javascript
   import MenuIcon from 'vue-material-design-icons/Menu.vue';

   Vue.component('menu-icon', MenuIcon);
   ```

   > **Note** Icon files are pascal cased, e.g. `CheckboxMarkedCircle.vue`, and
   > their default name has `Icon` appended e.g. `CheckboxMarkedCircleIcon`.

3. Then use it in your template code!

   ```html
   <menu-icon />
   ```

4. **Optional** Add the included stylesheet. This few lines of CSS will cause
   the icons to scale with any surrounding text, which can be helpful when you
   primarily style with CSS. Note that if you intend to handle sizing with the
   `size` prop, you probably don't want to use this as it may conflict.

   ```javascript
   import 'vue-material-design-icons/styles.css';
   ```

## Props

- `title` - This changes the hover tooltip as well as the title shown to screen
  readers. For accessibility purposes, if a `title` is not provided, then the
  icon is hidden from screen readers. This is to force developers to use
  meaningful titles for their icon usage.

  Example:

  ```html
  <android-icon title="this is an icon!" />
  ```

- `fillColor` - This property allows you to set the fill colour of an icon via
  JS instead of requiring CSS changes. Note that any CSS values, such as
  `fill: currentColor;` provided by the optional CSS file, may override colours
  set with this prop.

  Example:

  ```html
  <android-icon fillColor="#FF0000" />
  ```

- `size` - This property overrides the `width` and `height` attributes on the
  SVG. The default is `24`.

  Example:

  ```html
  <android-icon :size="48" />
  ```

## Icons

A list of the icons can be found at the
[Material Design Icons website](https://materialdesignicons.com/ 'Material Design Icons website'). The icons packaged here are pascal cased
versions of the names displayed on the website, to match the
[Vue Style Guide](https://vuejs.org/v2/style-guide/). For example, the icon
named `ultra-high-definition` would be imported as
`"vue-material-design-icons/UltraHighDefinition.vue"`.

## Tips

- Use `resolve` in your Webpack config to clean up the imports:

  ```javascript
  resolve: {
    alias : {
      "icons": path.resolve(__dirname, "node_modules/vue-material-design-icons")
    },
    extensions: [
      ".vue"
    ]
  }
  ```

  This will give you much shorter and more readable imports, like
  `import Android from "icons/Android"`, rather than
  `import Android from "vue-material-design-icons/Android.vue"`. Much better!

- If you want custom sizing, add your own css to adjust the height and width of the icons

  ```css
  .material-design-icon.icon-2x {
    height: 2em;
    width: 2em;
  }

  .material-design-icon.icon-2x > .material-design-icon__svg {
    height: 2em;
    width: 2em;
  }
  ```

  Then add your size class

  ```html
  <fullscreen-icon class="icon-2x" />
  ```

  While I recommend using CSS for styling, you can also pass in a `size` prop,
  detailed in the `Props` section above.

## Credits

[Austin Andrews / Templarian](https://github.com/Templarian "Templarian's GitHub profile") for
the [MaterialDesign](https://github.com/Templarian/MaterialDesign 'MaterialDesign Github page')
project. This supplies the SVG icons for this project, which are packaged as
Vue single file components.

[Elliot Dahl](http://www.elliotdahl.com/ "Elliot Dahl's website") for
[this article on prototypr.io](https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4 'Align SVG Icons to Text and Say Goodbye to Font Icons'). This is where the
recommended CSS comes from.

[Attila Max Ruf / therufa](https://github.com/therufa "therufa's GitHub Profile")
for the [mdi-vue](https://github.com/therufa/mdi-vue 'mdi-vue') library which
inspired this one. It also produces single file components from material
design icons.


================================================
FILE: __tests__/__snapshots__/icon.js.snap
================================================
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Icon renders an icon 1`] = `<span aria-hidden="true" role="img" class="material-design-icon android-icon"><svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24" class="material-design-icon__svg"><path d="M16.61 15.15C16.15 15.15 15.77 14.78 15.77 14.32S16.15 13.5 16.61 13.5H16.61C17.07 13.5 17.45 13.86 17.45 14.32C17.45 14.78 17.07 15.15 16.61 15.15M7.41 15.15C6.95 15.15 6.57 14.78 6.57 14.32C6.57 13.86 6.95 13.5 7.41 13.5H7.41C7.87 13.5 8.24 13.86 8.24 14.32C8.24 14.78 7.87 15.15 7.41 15.15M16.91 10.14L18.58 7.26C18.67 7.09 18.61 6.88 18.45 6.79C18.28 6.69 18.07 6.75 18 6.92L16.29 9.83C14.95 9.22 13.5 8.9 12 8.91C10.47 8.91 9 9.24 7.73 9.82L6.04 6.91C5.95 6.74 5.74 6.68 5.57 6.78C5.4 6.87 5.35 7.08 5.44 7.25L7.1 10.13C4.25 11.69 2.29 14.58 2 18H22C21.72 14.59 19.77 11.7 16.91 10.14H16.91Z"><!----></path></svg></span>`;


================================================
FILE: __tests__/icon.js
================================================
import { mount } from '@vue/test-utils';
import AndroidIcon from '../dist/Android';

const WrappedIcon = {
  components: {
    AndroidIcon,
  },
  render(h) {
    return h(AndroidIcon, {
      attrs: this.$attrs,
      listeners: this.$listeners,
    });
  },
};

describe('Icon', () => {
  let icon;

  beforeEach(() => {
    icon = mount(WrappedIcon);
  });

  it('accepts a "title" property', async () => {
    expect(icon.attributes()['aria-label']).toBeUndefined();

    await icon.setProps({ title: 'foo' });

    expect(icon.attributes()['aria-label']).toEqual('foo');
  });

  it('accepts a "fillColor" property', async () => {
    const svg = icon.find('.material-design-icon__svg');

    expect(svg.attributes()['fill']).toEqual('currentColor');

    await icon.setProps({ fillColor: '#FF0000' });

    expect(svg.attributes()['fill']).toEqual('#FF0000');
  });

  it('renders an icon', () => {
    expect(icon).toMatchSnapshot();
  });

  it('listens to a click event', async () => {
    const clickListener = jest.fn();
    const iconWithEvent = mount({
      name: 'IconWithEvent',
      components: { AndroidIcon },
      template: `
        <AndroidIcon
          @click="clickListener"
        />
      `,
      methods: {
        clickListener,
      },
    });

    await iconWithEvent.trigger('click');
    expect(clickListener).toBeCalled();
  });
});


================================================
FILE: build.ts
================================================
#!/usr/bin/env -S node -r ts-node/register/transpile-only

// Imports
import { mkdir, writeFile } from 'fs/promises';
import path from 'path';
import pMap from 'p-map';
import * as icons from '@mdi/js/commonjs/mdi.js';
import { existsSync } from 'fs';

const dist = path.resolve(__dirname, 'dist');

function renderTemplate(title: string, svgPathData: string, name: string) {
  return `<template>
  <span v-bind="$attrs"
        :aria-hidden="title ? null : 'true'"
        :aria-label="title"
        class="material-design-icon ${title}-icon"
        role="img"
        @click="$emit('click', $event)">
    <svg :fill="fillColor"
         class="material-design-icon__svg"
         :width="size"
         :height="size"
         viewBox="0 0 24 24">
      <path d="${svgPathData}">
        <title v-if="title">{{ title }}</title>
      </path>
    </svg>
  </span>
</template>

<script>
export default {
  name: "${name}Icon",
  emits: ['click'],
  props: {
    title: {
      type: String,
    },
    fillColor: {
      type: String,
      default: "currentColor"
    },
    size: {
      type: Number,
      default: 24
    }
  }
}
</script>`;
}

function getTemplateData(id: string) {
  const splitID = id.split(/(?=[A-Z])/).slice(1);

  const name = splitID.join('');

  // This is a hacky way to remove the 'mdi' prefix, so "mdiAndroid" becomes
  // "android", for example
  const title = splitID.join('-').toLowerCase();

  return {
    name,
    title,
    svgPathData: icons[id],
  };
}

async function build() {
  const iconIDs = Object.keys(icons);

  if (!existsSync(dist)) {
    await mkdir(dist);
  }

  const templateData = iconIDs.map(getTemplateData);

  // Batch process promises to avoid overloading memory
  await pMap(
    templateData,
    async ({ name, title, svgPathData }) => {
      const component = renderTemplate(title, svgPathData, name);
      const filename = `${name}.vue`;

      return writeFile(path.resolve(dist, filename), component);
    },
    { concurrency: 20 },
  );
}

build().catch((err: unknown) => {
  console.log(err);
});


================================================
FILE: jest.config.js
================================================
module.exports = {
  verbose: true,
  testEnvironment: 'jsdom',
  moduleFileExtensions: ['js', 'vue'],
  transform: {
    '^.+\\.vue$': 'vue-jest',
    '^.+\\.js$': '<rootDir>/node_modules/babel-jest',
  },
  snapshotSerializers: ['<rootDir>/node_modules/jest-serializer-vue'],
};


================================================
FILE: package.json
================================================
{
  "name": "vue-material-design-icons",
  "version": "3.2.0",
  "author": "Rob Cresswell <robcresswell@pm.me>",
  "license": "MIT",
  "description": "A collection of material design icons as Vue single file components",
  "repository": "github:robcresswell/vue-material-design-icons",
  "keywords": [
    "vue",
    "material design icons",
    "mdi",
    "icons",
    "material",
    "icon",
    "svg",
    "vue.js",
    "material design"
  ],
  "devDependencies": {
    "@babel/core": "^7.20.12",
    "@babel/preset-env": "^7.20.2",
    "@mdi/js": "7.4.47",
    "@types/node": "^18.11.18",
    "@vue/test-utils": "1.2.2",
    "babel-core": "7.0.0-bridge.0",
    "babel-jest": "^29.4.1",
    "jest": "^29.4.1",
    "jest-environment-jsdom": "^29.4.1",
    "jest-serializer-vue": "2.0.2",
    "p-map": "^4.0.0",
    "prettier": "^2.8.3",
    "regenerator-runtime": "^0.13.11",
    "ts-node": "^10.9.1",
    "typescript": "^4.9.5",
    "vue": "^2.7.14",
    "vue-jest": "^3.0.7",
    "vue-template-compiler": "^2.7.14"
  },
  "homepage": "https://github.com/robcresswell/vue-material-design-icons",
  "bugs": {
    "url": "https://github.com/robcresswell/vue-material-design-icons/issues"
  },
  "scripts": {
    "prebuild": "rm -rf dist/",
    "build": "./build.ts",
    "postbuild": "cp styles.css package.json README.md dist/",
    "format": "prettier --write **/*.{js,vue}",
    "test": "jest"
  }
}


================================================
FILE: styles.css
================================================
.material-design-icon {
  display: inline-flex;
  align-self: center;
  position: relative;
  height: 1em;
  width: 1em;
}
.material-design-icon > .material-design-icon__svg {
  height: 1em;
  width: 1em;
  fill: currentColor;
  position: absolute;
  bottom: -0.125em;
}


================================================
FILE: tsconfig.json
================================================
{
  "compilerOptions": {
    "target": "ES2021",
    "module": "commonjs",
    "pretty": true,
    "strict": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noImplicitReturns": true,
    "noFallthroughCasesInSwitch": true,
    "noUncheckedIndexedAccess": true,
    "noImplicitOverride": true,
    "noPropertyAccessFromIndexSignature": true,
    "importsNotUsedAsValues": "error",
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "noEmit": true
  }
}
Download .txt
gitextract_5c8v8d18/

├── .babelrc
├── .circleci/
│   └── config.yml
├── .dependabot/
│   └── config.yml
├── .gitignore
├── .npmrc
├── .nvmrc
├── .prettierrc.json
├── .releaserc
├── CHANGELOG.md
├── LICENSE
├── README.md
├── __tests__/
│   ├── __snapshots__/
│   │   └── icon.js.snap
│   └── icon.js
├── build.ts
├── jest.config.js
├── package.json
├── styles.css
└── tsconfig.json
Download .txt
SYMBOL INDEX (4 symbols across 2 files)

FILE: __tests__/icon.js
  method render (line 8) | render(h) {

FILE: build.ts
  function renderTemplate (line 12) | function renderTemplate(title: string, svgPathData: string, name: string) {
  function getTemplateData (line 53) | function getTemplateData(id: string) {
  function build (line 69) | async function build() {
Condensed preview — 18 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (26K chars).
[
  {
    "path": ".babelrc",
    "chars": 77,
    "preview": "{\n  \"presets\": [[\"@babel/preset-env\", {\"targets\": { \"node\": \"current\" }}]]\n}\n"
  },
  {
    "path": ".circleci/config.yml",
    "chars": 675,
    "preview": "version: 2.1\ndefaults: &defaults\n  working_directory: ~/ci\n  resource_class: small\n  docker:\n    - image: cimg/node:lts\n"
  },
  {
    "path": ".dependabot/config.yml",
    "chars": 355,
    "preview": "version: 1\n\nupdate_configs:\n  - package_manager: \"javascript\"\n    directory: \"/\"\n    update_schedule: \"live\"\n    default"
  },
  {
    "path": ".gitignore",
    "chars": 67,
    "preview": "*.swp\n.DS_Store\nnode_modules/\n*.log\n*.tgz\ndist/\ncoverage/\nreports/\n"
  },
  {
    "path": ".npmrc",
    "chars": 23,
    "preview": "audit=false\nfund=false\n"
  },
  {
    "path": ".nvmrc",
    "chars": 3,
    "preview": "18\n"
  },
  {
    "path": ".prettierrc.json",
    "chars": 120,
    "preview": "{\n  \"arrowParens\": \"always\",\n  \"trailingComma\": \"all\",\n  \"singleQuote\": true,\n  \"htmlWhitespaceSensitivity\": \"ignore\"\n}\n"
  },
  {
    "path": ".releaserc",
    "chars": 308,
    "preview": "{\n  \"branches\": \"dev\",\n  \"tagFormat\": \"${version}\",\n  \"pkgRoot\": \"dist/\",\n  \"plugins\": [\n    \"@semantic-release/commit-a"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 10408,
    "preview": "# Change Log\n\nAll notable changes to this project will be documented in this file. See [standard-version](https://github"
  },
  {
    "path": "LICENSE",
    "chars": 1070,
    "preview": "MIT License\n\nCopyright (c) 2018 Rob Cresswell\n\nPermission is hereby granted, free of charge, to any person obtaining a c"
  },
  {
    "path": "README.md",
    "chars": 4553,
    "preview": "# Vue Material Design Icon Components\n\nThis library is a collection of Vue single-file components to render Material\nDes"
  },
  {
    "path": "__tests__/__snapshots__/icon.js.snap",
    "chars": 898,
    "preview": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`Icon renders an icon 1`] = `<span aria-hidden=\"true\" role=\"img\" cla"
  },
  {
    "path": "__tests__/icon.js",
    "chars": 1372,
    "preview": "import { mount } from '@vue/test-utils';\nimport AndroidIcon from '../dist/Android';\n\nconst WrappedIcon = {\n  components:"
  },
  {
    "path": "build.ts",
    "chars": 2073,
    "preview": "#!/usr/bin/env -S node -r ts-node/register/transpile-only\n\n// Imports\nimport { mkdir, writeFile } from 'fs/promises';\nim"
  },
  {
    "path": "jest.config.js",
    "chars": 281,
    "preview": "module.exports = {\n  verbose: true,\n  testEnvironment: 'jsdom',\n  moduleFileExtensions: ['js', 'vue'],\n  transform: {\n  "
  },
  {
    "path": "package.json",
    "chars": 1404,
    "preview": "{\n  \"name\": \"vue-material-design-icons\",\n  \"version\": \"3.2.0\",\n  \"author\": \"Rob Cresswell <robcresswell@pm.me>\",\n  \"lice"
  },
  {
    "path": "styles.css",
    "chars": 271,
    "preview": ".material-design-icon {\n  display: inline-flex;\n  align-self: center;\n  position: relative;\n  height: 1em;\n  width: 1em;"
  },
  {
    "path": "tsconfig.json",
    "chars": 503,
    "preview": "{\n  \"compilerOptions\": {\n    \"target\": \"ES2021\",\n    \"module\": \"commonjs\",\n    \"pretty\": true,\n    \"strict\": true,\n    \""
  }
]

About this extraction

This page contains the full source code of the robcresswell/vue-material-design-icons GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 18 files (23.9 KB), approximately 7.7k tokens, and a symbol index with 4 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!