Skip to content

Commit

Permalink
feat(icons-react): reintroduce entrypoint with new icon strategy (#3078)
Browse files Browse the repository at this point in the history
* feat(icons): update to include entrypoint

* fix(icons-react): update build to be side-effect free

* chore(project): sync yarn.lock

* chore(icons-react): remove create-react-app example

* chore(icons-react): update storybook example

* chore(project): sync files

* chore(e2e): update icons-react test

* chore: check-in work

* chore: check-in work

* feat(upgrade): add support for migrating icons-react

* fix(HeaderMenuButton): update icon import path

* fix(upgrade): support prefix paths

* fix(icons-react): make sure children prop is forwarded

* chore(react): update to use new icon imports

* Revert "chore(react): update to use new icon imports"

This reverts commit 2822e90.

* fix(upgrade): preserve leading comments

* chore(react): update to use new icon imports

* chore(icons-react,upgrade): add docs

* fix(icons-react): set aria-hidden for child nodes

* chore(icons-react): revert early change for aria-hidden
  • Loading branch information
joshblack authored Jun 20, 2019
1 parent 88cb13a commit 53385e7
Show file tree
Hide file tree
Showing 168 changed files with 5,141 additions and 15,209 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,8 @@ packages/components/node_modules
# Sketch
*.sketchplugin

# Upgrade
**/__testfixtures__/**

# React
**/storybook-static/**
Binary file added .yarn/offline-mirror/@babel-register-7.4.4.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/@types-node-12.0.8.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/core-js-3.1.4.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/estree-walker-0.3.1.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/extract-banner-0.1.2.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/flow-parser-0.101.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/jscodeshift-0.6.4.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/magic-string-0.19.1.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/rimraf-2.2.8.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/rollup-1.15.1.tgz
Binary file not shown.
Binary file not shown.
Binary file added .yarn/offline-mirror/rollup-pluginutils-2.0.1.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/strip-bom-string-0.1.2.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/strip-use-strict-0.1.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/temp-0.8.3.tgz
Binary file not shown.
Binary file not shown.
Binary file added .yarn/offline-mirror/terser-3.17.0.tgz~HEAD
Binary file not shown.
Binary file added .yarn/offline-mirror/vlq-0.2.3.tgz
Binary file not shown.
23 changes: 9 additions & 14 deletions e2e/icons-react/components-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,16 @@

'use strict';

const path = require('path');
const meta = require('../../packages/icons/meta.json');

describe('@carbon/icons-react', () => {
test.each(meta.map(icon => [icon.moduleName, icon]))(
'%s is require-able',
(name, icon) => {
const filepath = path.resolve(
__dirname,
'../../packages/icons-react',
icon.outputOptions.file.replace(/es/, 'lib')
);
expect(() => {
require(filepath);
}).not.toThrow();
}
);
test('entrypoint is require-able', () => {
expect(() => {
require('@carbon/icons-react');
}).not.toThrow();
});

test.each(meta.map(icon => [icon.moduleName]))('%s is require-able', name => {
expect(require('@carbon/icons-react')[name]).toBeDefined();
});
});
7 changes: 0 additions & 7 deletions packages/icons-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@ const Add24 = require('@carbon/icons-react/lib/Add/24');
_Note: if you would like to find the import path for an icon, you can reference
our [icon preview](https://carbon-elements.netlify.com/icons/examples/preview/)_

## 📚 Examples

If you're looking for more examples on how to use `@carbon/icons-react`, we have
some examples that you can check out:

- [create-react-app](./examples/create-react-app)

## 🙌 Contributing

We're always looking for contributors to help us fix bugs, build new features,
Expand Down
1 change: 0 additions & 1 deletion packages/icons-react/examples/create-react-app/.env

This file was deleted.

23 changes: 0 additions & 23 deletions packages/icons-react/examples/create-react-app/.gitignore

This file was deleted.

33 changes: 0 additions & 33 deletions packages/icons-react/examples/create-react-app/README.md

This file was deleted.

34 changes: 0 additions & 34 deletions packages/icons-react/examples/create-react-app/package.json

This file was deleted.

Binary file not shown.
41 changes: 0 additions & 41 deletions packages/icons-react/examples/create-react-app/public/index.html

This file was deleted.

This file was deleted.

45 changes: 0 additions & 45 deletions packages/icons-react/examples/create-react-app/src/App.css

This file was deleted.

32 changes: 0 additions & 32 deletions packages/icons-react/examples/create-react-app/src/App.js

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions packages/icons-react/examples/create-react-app/src/index.js

This file was deleted.

16 changes: 0 additions & 16 deletions packages/icons-react/examples/create-react-app/src/index.scss

This file was deleted.

7 changes: 0 additions & 7 deletions packages/icons-react/examples/create-react-app/src/logo.svg

This file was deleted.

Loading

0 comments on commit 53385e7

Please sign in to comment.