fulcrumapp / fulcrum-expressions

Fulcrum expressions engine
http://developer.fulcrumapp.com/expressions/intro/
5 stars 0 forks source link

Task/flcrm 7994 get expressions deployable #46

Closed jahndis closed 2 years ago

jahndis commented 2 years ago

This sets up expressions to be published as an npm library in artifactory @fulcrum/expressions.

It resurrects this repo as the place where expressions work is done. Right now everything pulls the expressions lib from https://assets.fulcrumapp.com/expv1/expressions.js, so for the immediate, we will likely copy the dist/expressions.js that this repo produces there, until we can move folks over to the published npm lib.

Note, we are doing a bit of a reset in that we are coming back to the coffeescript code. The reason for this is that this code produced the last deployed version of expressions (published by Craig on August 24, 2021 to s3 from the copy that is here at this commit, whose last change was December 13, 2019)

We needed a reproducible build, which this PR generates. (See testing notes)

Eventually, we would like to move to the typescript implementation (the most up-to-date version of that code is in fulcrum/lib/assets/fulcrum-components/src/expressions), but we need better test coverage of the existing expressions lib before we attempt that. Fortunately, the existing coffeescript tests can be run against the generated dist/expressions.js, which means those tests can be run against any new implementation that produces that file, we just need more tests that cover some of the important stuff.

We are not going to attempt to decaffeinate this code, as doing so does not move us towards the goal of using the typescript implementation.

For immediate features, we will be working with coffeescript. It would be prudent to port any additions we make to the coffeescript code to the typescript code, to make that transition easier later.

Testing: