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