Norvell, Please Merge

    @nodegui/svelte-nodegui-preprocessor
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.0 • Public • Published

    Svelte NodeGUI Preprocessor

    A preprocessor for Svelte NodeGUI; forked from halfnelson's svelte-native-preprocessor for Svelte Native.

    It performs the following transforms to provide a better developer experience when using Svelte NodeGUI:

    • [x] Adds <svelte:options namespace="foreign" /> to the component, ensuring the generated code is compatible with Svelte NodeGUI

    Installation

    Using svelte-loader, in webpack.config.js:

    const SvelteNodeGUIPreprocessor = require("@nodegui/svelte-nodegui-preprocessor");

    Where the svelte-loader is registered, add the preprocessor to options.preprocess:

     {
        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.

    Install

    npm i @nodegui/svelte-nodegui-preprocessor

    DownloadsWeekly Downloads

    15

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    917 kB

    Total Files

    6

    Last publish

    Collaborators

    • shirakaba
    • atulanand94
    • rahulgaba
    • kakulgupta
    • shubhamzanwar