Browse Source

jdenticon

identicon
master
yuriy0803 1 year ago
parent
commit
0f1c293a93
  1. 7
      www/ember-cli-build.js
  2. 61
      www/vendor/README.md
  3. 1397
      www/vendor/jdenticon-module.js
  4. 1
      www/vendor/jdenticon-module.js.map
  5. 1391
      www/vendor/jdenticon-module.mjs
  6. 1
      www/vendor/jdenticon-module.mjs.map
  7. 1266
      www/vendor/jdenticon-node.js
  8. 1
      www/vendor/jdenticon-node.js.map
  9. 1230
      www/vendor/jdenticon-node.mjs
  10. 1
      www/vendor/jdenticon-node.mjs.map
  11. 1462
      www/vendor/jdenticon.js
  12. 3
      www/vendor/jdenticon.min.js
  13. 1
      www/vendor/jdenticon.min.js.map

7
www/ember-cli-build.js

@ -2,7 +2,7 @@
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var Funnel = require('broccoli-funnel');
module.exports = function(defaults) {
module.exports = function (defaults) {
var app = new EmberApp(defaults, {
// Add options here
SRI: {
@ -25,6 +25,11 @@ module.exports = function(defaults) {
app.import('bower_components/bootstrap/dist/css/bootstrap.min.css')
app.import('bower_components/bootstrap/dist/js/bootstrap.min.js');
app.import('bower_components/font-awesome/css/font-awesome.min.css')
app.import('vendor/jdenticon.js', {
using: [
{ transformation: 'amd', as: 'jdenticon' }
]
});
var extraAssets = new Funnel('bower_components/font-awesome/fonts', {
srcDir: '/',

61
www/vendor/README.md vendored

@ -0,0 +1,61 @@
# What file should I use?
## Overview
| Platform | Bundle | File name |
|----------|------------------|----------------------|
| Browser | Standalone (UMD) | jdenticon.js |
| | | jdenticon.min.js |
| | ES module | jdenticon-module.mjs |
| | CommonJS module | jdenticon-module.js |
| Node.js | ES module | jdenticon-node.mjs |
| | CommonJS module | jdenticon-node.js |
## Node vs browser
There are separate bundles for Node.js and browsers. The Node.js bundles contain support for generating PNG icons, while the browser bundles have support for updating DOM elements. It is important that the right bundle is used, since a web application bundle will be significally larger if the Node bundle is imported instead of the browser bundle.
## Don't address `dist/*` directly
In first hand, don't import a specific file from the `dist` folder. Instead import the Jdenticon package and let the package decide what file to be imported.
Jdenticon has multiple public entry points:
### ES module
For browsers `jdenticon-module.mjs` is imported and in Node.js environments `jdenticon-node.mjs` is imported. This is the preferred way of using Jdenticon since your bundler will most likely be able to eliminiate code from Jdenticon not used in your application (a.k.a. tree-shaking).
**Example**
```js
import { toSvg } from "jdenticon";
console.log(toSvg("my value", 100));
```
### CommonJS module
If Jdenticon is imported on platforms not supporting ES modules, `jdenticon-module.js` is imported for browser environments and `jdenticon-node.js` in Node.js environments.
**Example**
```js
const { toSvg } = require("jdenticon");
console.log(toSvg("my value", 100));
// or
const jdenticon = require("jdenticon");
console.log(jdenticon.toSvg("my value", 100));
```
### Standalone browser package
This package will render icons automatically at startup and also provides a legacy jQuery plugin, if jQuery is loaded before Jdenticon.
**Example**
```js
import "jdenticon/standalone";
// or
import { toSvg } from "jdenticon/standalone";
console.log(toSvg("my value", 100));
```

1397
www/vendor/jdenticon-module.js vendored

File diff suppressed because it is too large Load Diff

1
www/vendor/jdenticon-module.js.map vendored

File diff suppressed because one or more lines are too long

1391
www/vendor/jdenticon-module.mjs vendored

File diff suppressed because it is too large Load Diff

1
www/vendor/jdenticon-module.mjs.map vendored

File diff suppressed because one or more lines are too long

1266
www/vendor/jdenticon-node.js vendored

File diff suppressed because it is too large Load Diff

1
www/vendor/jdenticon-node.js.map vendored

File diff suppressed because one or more lines are too long

1230
www/vendor/jdenticon-node.mjs vendored

File diff suppressed because it is too large Load Diff

1
www/vendor/jdenticon-node.mjs.map vendored

File diff suppressed because one or more lines are too long

1462
www/vendor/jdenticon.js vendored

File diff suppressed because it is too large Load Diff

3
www/vendor/jdenticon.min.js vendored

File diff suppressed because one or more lines are too long

1
www/vendor/jdenticon.min.js.map vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save