{"_id":"@danielschischkin/publish-svelte","_rev":"3-7a529c38cff7145121868d4ae1930e44","name":"@danielschischkin/publish-svelte","dist-tags":{"latest":"0.8.1"},"versions":{"0.8.0":{"name":"@danielschischkin/publish-svelte","version":"0.8.0","description":"A command-line tool for publishing svelte components to npm","prepublishOnly":"tsc","main":"dist/pelte.js","scripts":{"test":"mocha -r ts-node/register test/**.ts","tsc":"tsc"},"bin":{"pelte":"dist/index.js"},"keywords":["svelte","cli","publish","share","npm","components"],"repository":{"type":"git","url":"git+https://github.com/fourhundredfour/publish-svelte.git"},"author":{"name":"Philip Christiansen"},"license":"ISC","dependencies":{"@babel/core":"^7.12.3","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"^11.0.0","@rollup/plugin-typescript":"^8.2.1","@tsconfig/svelte":"^1.0.0","commander":"^4.0.1","postcss":"^8.1.4","prompts":"^2.3.0","rollup":"^2.3.4","rollup-plugin-svelte":"^7.0.0","svelte":"^3.12.1","svelte-check":"^1.0.0","svelte-preprocess":"^4.0.0","tslib":"^2.0.0","typescript":"^4.0.0"},"devDependencies":{"@types/mocha":"^8.2.2","@types/node":"^15.6.1","lodash":"^4.17.21","mocha":"^8.4.0","ts-node":"^10.0.0","tslint":"^6.1.3","locate-character":"^2.0.5"},"bugs":{"url":"https://github.com/fourhundredfour/publish-svelte/issues"},"homepage":"https://github.com/fourhundredfour/publish-svelte#readme","directories":{"test":"test"},"gitHead":"a02ed302daf87f312f3d703d28d0c236e9ec9ff2","_id":"@danielschischkin/publish-svelte@0.8.0","_nodeVersion":"14.17.1","_npmVersion":"7.22.0","dist":{"integrity":"sha512-jHfornQ60Np97rLghibC1P6ofjq3HOYwMW0IBwpG1sNZOKXLFeWC6VTud4mmTph/+6nnQbNF+XMyppcp+M3Ikg==","shasum":"832973ebeb6eb05971f007d4301515618e69d9f0","tarball":"https://registry.npmjs.org/@danielschischkin/publish-svelte/-/publish-svelte-0.8.0.tgz","fileCount":2,"unpackedSize":5079,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNJ7yBm+RXseVS5sKVUUA3QCk5OVH8l5SOouElLybA4QIgX4tcH2gj7OATR2chWOgpHmdzXOrmJwVdY9lZNN6sn48="}]},"_npmUser":{"name":"danielschischkin","email":"daniel@schischkin.info"},"maintainers":[{"name":"danielschischkin","email":"daniel@schischkin.info"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/publish-svelte_0.8.0_1631880588468_0.12213044059261002"},"_hasShrinkwrap":false},"0.8.1":{"name":"@danielschischkin/publish-svelte","version":"0.8.1","description":"A command-line tool for publishing svelte components to npm","prepublishOnly":"tsc","main":"dist/pelte.js","scripts":{"test":"mocha -r ts-node/register test/**.ts","tsc":"tsc"},"bin":{"pelte":"dist/index.js"},"keywords":["svelte","cli","publish","share","npm","components"],"repository":{"type":"git","url":"git+https://github.com/fourhundredfour/publish-svelte.git"},"author":{"name":"Philip Christiansen"},"license":"ISC","dependencies":{"@babel/core":"^7.12.3","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"^11.0.0","@rollup/plugin-typescript":"^8.2.1","@tsconfig/svelte":"^1.0.0","commander":"^4.0.1","postcss":"^8.1.4","prompts":"^2.3.0","rollup":"^2.3.4","rollup-plugin-svelte":"^7.0.0","svelte":"^3.12.1","svelte-check":"^1.0.0","svelte-preprocess":"^4.0.0","tslib":"^2.0.0","typescript":"^4.0.0"},"devDependencies":{"@types/mocha":"^8.2.2","@types/node":"^15.6.1","lodash":"^4.17.21","mocha":"^8.4.0","ts-node":"^10.0.0","tslint":"^6.1.3","locate-character":"^2.0.5"},"bugs":{"url":"https://github.com/fourhundredfour/publish-svelte/issues"},"homepage":"https://github.com/fourhundredfour/publish-svelte#readme","directories":{"test":"test"},"gitHead":"a02ed302daf87f312f3d703d28d0c236e9ec9ff2","_id":"@danielschischkin/publish-svelte@0.8.1","_nodeVersion":"14.17.1","_npmVersion":"7.22.0","dist":{"integrity":"sha512-qyco1gEwQ2Z/PtUO0REuf5xOzHr39ZCN4RiKLqykI4D6t4IWS3qMtEUZGMYNBqW9F/Fk/bqv/WaHQeiTi/ie6g==","shasum":"86eaacb2cf62234ba68e6a249b75c8905e3261cc","tarball":"https://registry.npmjs.org/@danielschischkin/publish-svelte/-/publish-svelte-0.8.1.tgz","fileCount":34,"unpackedSize":55339,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhyInNCRA9TVsSAnZWagAAqBwP/R7E/gPIWivFvquLQqOO\n6pJEWNoHCJGSVQbqBhh+Hqh5eAkZf9x7DUZCUY5fjpyeO9WgndQdM2XwguFo\nB0EdANrOysVDAD3j+t2p4u9IvEvshk9G83KLjYeVBBms67Ezy546r/G70wP8\nlWWD1fkPoYRu6bP5wGrG993DmvQkembtF2UTtBxber/beywx1y5lBT3sV/wJ\nBwNhntO4XDkzUDYowmqcXSkpJGGz9q2fV5IcezIPSaq9R07zJ+reVmHgRysi\naBd5l7ZhRAXYDH47EOTHg7gf9MOEFeqDSb8yVpPE44daCet5V/4LEnfI8OWa\nePlEFT1FnmJnMTVtq9tciXlfPOyG7xPmCmh/++R668PR1FKFq2tl/vtEVznS\nbX4N4HaELarN136gdoRxIDKdjDDUqv9XgmmX+aWCPNn0OSYwNmR30Wez3yA6\nkwfD1eLYynCEr2QIfwk9z+qnFY9kPKfbRJAoh2bdN9Jr0XUIIRHLu45tgoVK\nIxf0I2jezJRBfl9XdS5kz8ptU7Q1wHK0Ji9cOxPZvXOOFkhvqd97nB/uxmI9\nI3pR/e1nLxXTo7450v4tJviGLEzsmkktjB5Ar4juHTFM064n5ys0BWycqSQW\nQxztK+mSr4b/qOjLZ4r7SYilAS3bz2tHYikgcweVSzWdF07CgwpVUrgcnCkZ\ntItv\r\n=JR3y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFYQvYGohZsAH63f+s6U7DSqNQLNEOGseK/DJJKx1W9GAiBXazjPCYeQZf1HxNo2rPXZQennGZ26xOyyqid6d/lj+g=="}]},"_npmUser":{"name":"danielschischkin","email":"daniel@schischkin.info"},"maintainers":[{"name":"danielschischkin","email":"daniel@schischkin.info"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/publish-svelte_0.8.1_1631881175019_0.969114927297585"},"_hasShrinkwrap":false}},"time":{"created":"2021-09-17T12:09:48.418Z","0.8.0":"2021-09-17T12:09:48.599Z","modified":"2022-04-05T02:41:22.238Z","0.8.1":"2021-09-17T12:19:35.260Z"},"maintainers":[{"name":"danielschischkin","email":"daniel@schischkin.info"}],"description":"A command-line tool for publishing svelte components to npm","homepage":"https://github.com/fourhundredfour/publish-svelte#readme","keywords":["svelte","cli","publish","share","npm","components"],"repository":{"type":"git","url":"git+https://github.com/fourhundredfour/publish-svelte.git"},"author":{"name":"Philip Christiansen"},"bugs":{"url":"https://github.com/fourhundredfour/publish-svelte/issues"},"license":"ISC","readme":"# publish-svelte\npublish-svelte or \"pelte\" is a cli tool to easily compile, bundle and publish svelte components to npm. \nThe bundle will contain both svelte files and vanilla js files, so the components can run \"everywhere\" no matter the framework. \nA readme file will also be published to npm, which will describe how to use the component. \n\n\"pelte\" is optimal if you have an existing svelte project and you quickly want to share one of your components with the world. \nYou don't need to extract the component from your project and fiddle with npm link and import statements.\n\n#### Installation \n```text\nnpm install -g publish-svelte\n``` \n\n#### Usage\nPublish your svelte component to npm:\n\n```text\npelte ./MySvelteComponent.svelte\n```\nThis will automatically compile, bundle and publish to npm. The first time you publish a component, \"pelte\" will be ask for a name and a version. You can just press enter if you like the suggestions. \n\n\"pelte\" will create two files MySvelteComponent.md and MySvelteComponent.json. In the md-file you can describe your component and in the json-file you can change the name, version and more.\n\nYou can also increment the package version with patch, minor or major. Here the component is published with a patched version:\n```text\npelte ./MySvelteComponent.svelte --patch\n```\n\n#### Where is the bundle?\nThe bundle is removed after publish. You can examine the bundle without publishing to npm with:\n```text\npelte ./MySvelteComponent.svelte --skip-publish --keep-bundle\n```\n\"--skip-publish\" to skip publishing to npm and \"--keep-bundle\" will keep the bundle files which are otherwise cleaned.\n\nFor instance, you can open the index-example-umd.html and see your component in action.\n\n#### Custom Elements (aka web components) \nPelte will automatically create a web component if your svelte component contains this line: \n\n```html\n<svelte:options tag=\"my-svelte-component\"/>\n```\nThen you can use the web component like this: \n```html\n<body>\n    <my-svelte-component></my-svelte-component>\n</body>\n```\n\nYou can read more on the official svelte page [svelte page](https://svelte.dev/docs#Custom_element_API)  \n\n#### Programmatic Usage\n\nIn rare cases, you might want to run `pelte` programmatically.\n\n```js\nconst { pelte } = require('publish-svelte');\n\nconst options = {\n  srcFile: __dirname + '/Simple.svelte',\n  keepBundle: true,\n  skipPublish: true\n}\n\npelte(options)\n```\n\nPelte also exports a `generate` function that will generate bundles in-memory, but not write them to a file. This can be used if you want fine-grained control of the output bundle.\n\n_Note: The `keepBundle` and `skipPublish` options are ignored by `generate`_\n\n```js\nconst { generate } = require('publish-svelte');\n\nconst options = {\n  srcFile: __dirname + '/Simple.svelte',\n}\n\ngenerate(options).then(bundles => {\n  const umd = bundles.find(bundle => bundle.options.format === 'umd')\n  console.log('this is the umd bundle', umd)\n})\n```\n\n#### Help?\n\nSee other available arguments with:\n```text\npelte ./MySvelteComponent.svelte --help\n```\n#### FEATURES COMING SOON: \nSoon I will add some other features:\n* Better typescript support. There is some support but I have not tested more complex svelte components. \n* A react adapter should be included. Likely by using [svelte adapter](https://github.com/pngwn/svelte-adapter)\n* Autogenerated typescript\n* Angular adapter. If possible? \n* Third party dependencies are added as optional dependencies. This is required for when a svelte project imports a pelte package.\n","readmeFilename":"README.md"}