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

fulcrum-expressions

v2.1.0

Published

Expression runtime for Fulcrum

Downloads

34

Readme

Fulcrum Expressions

This implements the runtime for javascript expressions in Fulcrum.

The current implementation uses coffeescript.

There is a typescript implementation (latest version is likely in fulcrum-components/src/expressions, but there is also a typescript branch on this repo) that is currently being used in fulcrum-components to provide types to the monaco editor used to edit data events, calculations, etc. Eventually, this repo should contain that implementation, and ideally move off the coffeescript implementation once we are confident the typescript implementation works. Right now, we haven't determined the best way to distribute those types from this package. Until then, any type updates that need to be made (new public facing functions or otherwise) will need to be made in the typescript implementation.

Setup

Install dependencies

yarn

Build

Build expressions.js and sandbox (expressions-proxy.js and expressions.html)

yarn build

Build debug versions

yarn build:debug

Generate Documentation

Make changes to docs.js and event_docs.js.

yarn build:docs

Distribute

Builds everything for distribution

yarn build:dist

Tests

yarn test

Console

Starts an interactive node terminal with the functions available to call

yarn console

Deploy

Currently all projects pull the expression.js lib produced by this repo from https://assets.fulcrumapp.com/expv1/expressions.js. Until we are able to move projects over to using the published npm library, we will need to manually deploy by copying the dist/expressions.js file to that S3 bucket for others to see changes.

To deploy to your user's preview environment:

aws sso login (or however you login to the chaos aws account)
yarn deploy

(Remember to update fulcrum's config to point at your S3 bucket's files)

To deploy to production (requires fulcrum production access):

aws sso login (or however you login to the readonly fulcrum aws account)
yarn deploy production

Please be careful while doing this, as there aren't many guardrails in place at the moment. If unsure, ask.

Documentation

Documentation is handled using jsdoc, with functions documented in the source file here.

Deprecated Info (NOT USED, AND PROBABLY DOESN'T WORK, BUT LEFT FOR REFERENCE)

Copy files to other repositories

Copies the build output and docs to the other repositories (each are optional, but at least one is needed).

You can define the paths to the Fulcrum repos using environment variables in your shell config:

export FULCRUM_ANDROID=/path/to/android/app
export FULCRUM_IOS=/path/to/ios/app
export FULCRUM_WEB=/path/to/web/app
export FULCRUM_DEV_SITE=/path/to/website

Or you can assign them in the yarn command:

FULCRUM_DEV_SITE=$HOME/dev/fulcrumapp.com yarn build:dist && yarn copy

Once you have the environment variables set, you can run:

yarn copy

or

yarn build:dist && yarn copy # clean, build and deploy everything