2
0
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:
Vjacheslav Trushkin 2021-04-29 19:02:28 +03:00
parent 95ea0e59a6
commit eb2420177d
10 changed files with 15 additions and 9 deletions

View File

@ -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';

View File

@ -1,5 +1,5 @@
<script>
import Icon from '@iconify/svelte';
import { Icon } from '@iconify/svelte';
import paperclipIcon from '@iconify-icons/dashicons/paperclip';
</script>

View File

@ -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;';

View File

@ -1,5 +1,5 @@
<script>
import Icon from '@iconify/svelte';
import { Icon } from '@iconify/svelte';
const demoIcon = {
width: 16,

View File

@ -1,5 +1,5 @@
<script>
import Icon from '@iconify/svelte';
import { Icon } from '@iconify/svelte';
import adminCustomizer from '@iconify-icons/dashicons/admin-customizer';
</script>

View File

@ -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;';

View File

@ -1,5 +1,5 @@
<script>
import Icon from '@iconify/svelte';
import { Icon } from '@iconify/svelte';
import paperclipIcon from '@iconify-icons/dashicons/paperclip';
</script>

View File

@ -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": {

View File

@ -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')

View File

@ -1 +1 @@
export { default } from './Icon.svelte';
export { default as Icon } from './Icon.svelte';