Skip to content

Commit 27249f4

Browse files
authored
Merge pull request #1 from iChristwin/rollup
fixed , ready for release
2 parents b321940 + 0d8ef69 commit 27249f4

File tree

10 files changed

+35
-68
lines changed

10 files changed

+35
-68
lines changed

docs/img/M3ter-head.svg

Lines changed: 1 addition & 47 deletions
Loading

docs/m3ter-head.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
1-
21
## M3ter Head
3-
<p align="center"><img src='./img/M3ter-head.svg'/></p>
2+
43
Avatars to infuse a touch of whimsy and individuality into the M3tering Protocol. Generate one-of-a-kind SVG avatars that serve as distinctive visual representations for device DIDs and blockchain address strings commonly encountered in the M3tering Protocol.
54

65
### Usage:
76

87
1. Import the `M3terHead` component into your React code:
98

109
```javascript
11-
import * as React from 'react';
12-
import M3terHead from 'm3ters';
10+
import * as React from "react";
11+
import { M3terHead } from "m3ters";
1312
```
1413

1514
2. Render the avatar within your component, providing a unique seed string for generation:
1615

1716
```jsx
18-
export default class MyComponent extends React.Component {
19-
render() {
20-
return (
21-
<div>
22-
<M3terHead seed={"device_DID_string"} />
23-
</div>
24-
);
25-
}
17+
export default function Home() {
18+
return (
19+
<>
20+
<M3terHead seed={"device_DID_string"} />
21+
</>
22+
);
2623
}
2724
```
25+
26+
3. Your browser should render an SVG image like the one shown below
27+
<p align="center"><img src='./img/M3ter-head.svg'/></p>
28+
2829
## Credits
30+
2931
Inspired by the charming [Bottts](https://bottts.com/) designed by [Pablo Stanley](https://twitter.com/pablostanley) and adapted from Magnusson's [Bottts Maker 🤖](https://github.com/magnusson/bottts-maker).
3032

3133
## Licensing

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"rollup": "rollup -c"
4242
},
4343
"type": "module",
44+
"source": "src/index.js",
4445
"main": "dist/index.cjs",
4546
"module": "dist/index.js",
4647
"files": [

rollup.config.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import terser from "@rollup/plugin-terser";
66
export default [
77
{
88
input: "src/index.js",
9-
external: ["react", "react-dom", "seedrandom"],
9+
external: [/@babel\/core/, /@babel\/preset-react/, /react/, /react-dom/],
1010
output: [
1111
{
1212
file: "dist/index.cjs",
@@ -19,16 +19,16 @@ export default [
1919
},
2020
],
2121
plugins: [
22-
babel({
23-
exclude: "node_modules/**",
24-
presets: ["@babel/preset-react"],
25-
babelHelpers: "bundled",
26-
}),
2722
resolve({
2823
moduleDirectories: ["node_modules", "src"],
2924
extensions: [".js", ".jsx"],
3025
}),
3126
commonjs(),
27+
babel({
28+
exclude: "node_modules/**",
29+
presets: ["@babel/preset-react"],
30+
babelHelpers: "bundled",
31+
}),
3232
terser(),
3333
],
3434
},

src/components/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
import React from 'react';
2+
13
export * from "./M3terHead.jsx";

src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
import React from 'react';
2+
13
export * from "./components";

src/parts/Eyes/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import React from 'react';
2+
13
export { Arturito } from "./Arturito";
24
export { Bulging } from "./Bulging";
35
export { Dizzy } from "./Dizzy";

src/parts/Mouths/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import React from 'react';
2+
13
export { Arturito } from "./Arturito";
24
export { Bite } from "./Bite";
35
export { Diagram } from "./Diagram";

src/parts/Textures/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import React from 'react';
2+
13
export { Camo1 } from "./Camo1";
24
export { Camo2 } from "./Camo2";
35
export { Dirty1 } from "./Dirty1";

0 commit comments

Comments
 (0)