npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@icose/vite-plugin-fmwv

v1.1.0

Published

This is a Vite plugin that allows you to mock the FileMaker Web Viewer environment in your Vite project.

Downloads

124

Readme

⚡️ Vite — FileMaker Web Viewer

A Vite plugin that allows you to mock the FileMaker Web Viewer environment in your Vite project.

Installation

npm install @icose/vite-plugin-fmwv --save-dev

Usage

Add the plugin to your vite.config.js:


import { defineConfig } from 'vite'

import filemakerWebViewerPlugin from '@icose/vite-plugin-fmwv'
import { 
    mockFileMakerHandlerScript,
    mockFileMakerTriggerScript
} from './src/test/scripts'

export default defineConfig({
    plugins: [
        filemakerWebViewerPlugin({
            triggerScripts: [
                {
                    label: 'mockFileMakerTriggerScript',
                    function: mockFileMakerTriggerScript
                }
            ],
            handlerScripts: [
                {
                    name: 'mockFileMakerScript',
                    function: mockFileMakerScript
                }
            ]
        })
    ]
)}

You can then run the vite command as usual, and any trigger scripts or handler scripts will be available in the preview environment. There are even buttons in the preview environment that allow you to run the mock trigger scripts.

triggerScripts

This optional parameter is useful for mocking FileMaker scripts that are triggered by FileMaker and use the Perform JavaScript in Web Viewer script step to run JavaScript code in the Web Viewer.

An array of objects that will be available as mock scripts in the FileMaker Web Viewer environment. These functions should utilise globally available functions in the application environment (window.someCustomFunction()), as the actual Web Viewer does.

handlerScripts

This optional parameter is useful for mocking FileMaker scripts that are receiving data from the Web Viewer using the FileMaker.PerformScriptWithOption( script, parameter, option ), or FileMaker.PerformScript( script, parameter ) functions.

An array of objects that will be available as mock scripts in the FileMaker Web Viewer environment. The type of the function property should be:

function mockFileMakerScript(
    script: string, // The name of the script.
    parameter?: string, // The optional string parameter passed to the script.
    option?: number // A mock option parameter
): string

Note: The option parameter is optional and defaults to 0. It is related to how connected scripts behave, check out Options for handling the current script when starting new scripts - Claris for more information.

Example

Check out the tests directory for a simple example of how to use this plugin.

Contributing

Check out the Contributing Guidelines to get started on contributing to this repository.

License

This project is licensed under the MIT License. See the LICENSE file for details.