mirror of
https://github.com/iconify/iconify.git
synced 2025-01-22 14:48:24 +00:00
Use named export for Svelte component instead of default export
This commit is contained in:
parent
95ea0e59a6
commit
eb2420177d
@ -1,5 +1,5 @@
|
|||||||
<script>
|
<script>
|
||||||
import Icon from '@iconify/svelte';
|
import { Icon } from '@iconify/svelte';
|
||||||
import adminCustomizer from '@iconify-icons/dashicons/admin-customizer';
|
import adminCustomizer from '@iconify-icons/dashicons/admin-customizer';
|
||||||
import bxUser from '@iconify-icons/bx/bx-user';
|
import bxUser from '@iconify-icons/bx/bx-user';
|
||||||
import bxError from '@iconify-icons/bx/bx-error';
|
import bxError from '@iconify-icons/bx/bx-error';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script>
|
<script>
|
||||||
import Icon from '@iconify/svelte';
|
import { Icon } from '@iconify/svelte';
|
||||||
import paperclipIcon from '@iconify-icons/dashicons/paperclip';
|
import paperclipIcon from '@iconify-icons/dashicons/paperclip';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script>
|
<script>
|
||||||
import Icon from '@iconify/svelte';
|
import { Icon } from '@iconify/svelte';
|
||||||
import adminUsers from '@iconify-icons/dashicons/admin-users';
|
import adminUsers from '@iconify-icons/dashicons/admin-users';
|
||||||
|
|
||||||
let icon1Style = 'color: purple; vertical-align: 0; font-size: 2em;';
|
let icon1Style = 'color: purple; vertical-align: 0; font-size: 2em;';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script>
|
<script>
|
||||||
import Icon from '@iconify/svelte';
|
import { Icon } from '@iconify/svelte';
|
||||||
|
|
||||||
const demoIcon = {
|
const demoIcon = {
|
||||||
width: 16,
|
width: 16,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script>
|
<script>
|
||||||
import Icon from '@iconify/svelte';
|
import { Icon } from '@iconify/svelte';
|
||||||
import adminCustomizer from '@iconify-icons/dashicons/admin-customizer';
|
import adminCustomizer from '@iconify-icons/dashicons/admin-customizer';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script>
|
<script>
|
||||||
import Icon from '@iconify/svelte';
|
import { Icon } from '@iconify/svelte';
|
||||||
import paperclipIcon from '@iconify-icons/dashicons/paperclip';
|
import paperclipIcon from '@iconify-icons/dashicons/paperclip';
|
||||||
|
|
||||||
const redIcon = 'color: red;';
|
const redIcon = 'color: red;';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script>
|
<script>
|
||||||
import Icon from '@iconify/svelte';
|
import { Icon } from '@iconify/svelte';
|
||||||
import paperclipIcon from '@iconify-icons/dashicons/paperclip';
|
import paperclipIcon from '@iconify-icons/dashicons/paperclip';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
"url": "https://github.com/iconify/iconify.git",
|
"url": "https://github.com/iconify/iconify.git",
|
||||||
"directory": "packages/svelte"
|
"directory": "packages/svelte"
|
||||||
},
|
},
|
||||||
"svelte": "dist/Icon.svelte",
|
"svelte": "dist/component.mjs",
|
||||||
"module": "dist/index.mjs",
|
"module": "dist/index.mjs",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -15,6 +15,12 @@ try {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Create component.mjs
|
||||||
|
fs.writeFileSync(
|
||||||
|
__dirname + '/dist/component.mjs',
|
||||||
|
fs.readFileSync(__dirname + '/src/index.js')
|
||||||
|
);
|
||||||
|
|
||||||
// Create bundle
|
// Create bundle
|
||||||
const name = pkg.name
|
const name = pkg.name
|
||||||
.replace(/^(@\S+\/)?(svelte-)?(\S+)/, '$3')
|
.replace(/^(@\S+\/)?(svelte-)?(\S+)/, '$3')
|
||||||
|
@ -1 +1 @@
|
|||||||
export { default } from './Icon.svelte';
|
export { default as Icon } from './Icon.svelte';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user