https://github.com/nodegui/svelte-nodegui-preprocessor
https://github.com/nodegui/svelte-nodegui-preprocessor
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nodegui/svelte-nodegui-preprocessor
- Owner: nodegui
- License: other
- Created: 2021-01-29T18:39:54.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-03T22:19:06.000Z (over 4 years ago)
- Last Synced: 2025-02-18T03:56:06.762Z (4 months ago)
- Language: TypeScript
- Size: 822 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Svelte NodeGUI Preprocessor
A preprocessor for [Svelte NodeGUI](https://github.com/nodegui/svelte-nodegui); forked from [halfnelson](https://github.com/halfnelson)'s [svelte-native-preprocessor](https://github.com/halfnelson/svelte-native-preprocessor) for [Svelte Native](https://github.com/halfnelson/svelte-native).
It performs the following transforms to provide a better developer experience when using Svelte NodeGUI:
- [x] Adds `` to the component, ensuring the generated code is compatible with Svelte NodeGUI
## Installation
Using `svelte-loader`, in `webpack.config.js`:
```js
const SvelteNodeGUIPreprocessor = require("@nodegui/svelte-nodegui-preprocessor");
```Where the `svelte-loader` is registered, add the preprocessor to `options.preprocess`:
```js
{
test: /\.svelte$/,
exclude: /node_modules/,
use: [
{
loader: 'svelte-loader',
options: {
preprocess: SvelteNodeGUIPreprocessor()
}
}
]
},
```There is a similar process for `rollup-plugin-svelte`, but users of that library are usually skilled enough to work it out ;)
## License
[MIT](LICENSE).