Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/pretty-pots-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@svecosystem/strip-types": patch
---

chore: initial release
60 changes: 0 additions & 60 deletions CHANGELOG.md

This file was deleted.

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# sv-strip
# @svecosystem/strip-types

A type stripper for Svelte.

```sh
pnpm install sv-strip
pnpm install @svecosystem/strip-types
```

```ts
import { strip } from 'sv-strip';
import { strip } from '@svecosystem/strip-types';

const ts = `<script lang="ts">
let value = $state<string>('');
Expand Down Expand Up @@ -40,7 +40,7 @@ const js = strip(ts);

## Formatting

By default `sv-strip` will remove leading and trailing whitespace when removing nodes. This will result in an output that is correctly formatted (with a small performance penalty).
By default `@svecosystem/strip-types` will remove leading and trailing whitespace when removing nodes. This will result in an output that is correctly formatted (with a small performance penalty).

If you are doing your own formatting you can disable this behavior with the `format` option like so:
```ts
Expand All @@ -60,7 +60,7 @@ const js = strip(ts, { removeEmptyScripts: false });

### Formatting

While `sv-strip` includes a `format` option it is not a formatter. It will do it's best to maintain the formatting of the original code when stripping types but it is still recommended to use your own formatter if possible.
While `@svecosystem/strip-types` includes a `format` option it is not a formatter. It will do it's best to maintain the formatting of the original code when stripping types but it is still recommended to use your own formatter if possible.

### Unsupported Syntax

Expand Down
20 changes: 6 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
{
"name": "sv-strip",
"name": "@svecosystem/strip-types",
"description": "A type stripper for Svelte.",
"version": "0.2.1",
"version": "0.0.0",
"license": "MIT",
"author": {
"name": "Aidan Bleser",
"url": "https://github.com/ieedan"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ieedan/sv-strip.git"
"url": "git+https://github.com/svecosystem/strip-types.git"
},
"bugs": {
"url": "https://github.com/ieedan/sv-strip/issues"
"url": "https://github.com/svecosystem/strip-types/issues"
},
"keywords": [
"svelte",
"strip",
"types",
"typescript",
"javascript"
],
"keywords": ["svelte", "strip", "types", "typescript", "javascript"],
"packageManager": "pnpm@10.4.1",
"type": "module",
"scripts": {
Expand All @@ -32,9 +26,7 @@
"changeset": "changeset",
"ci:release": "unbuild && changeset publish"
},
"files": [
"dist"
],
"files": ["dist"],
"exports": {
".": {
"import": "./dist/index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export type Options = {
* ## Usage
* ```ts
* import assert from 'node:assert';
* import { strip } from 'sv-strip';
* import { strip } from '@svecosystem/strip-types';
*
* const source = `<script lang="ts">
* let value = $state<string>('');
Expand Down