DEV Community

Cover image for The Cookbook: Fable
Montana Mendy for Travis CI

Posted on

The Cookbook: Fable

Fable produces readable JavaScript code compatible with ES2015 standards and popular tooling like Webpack, which you've probably heard of if you've ever used React. Let's start this Fable.

Build Fable with Travis CI

Hey builders let's get to building Fable with Travis CI! Let's start out with your .travis.yml file:

language: minimal

services:
  - docker

sudo: required

before_install:
  - docker pull vbfox/fable-build

jobs:
  include:
    - stage: "CI"
      script: docker run -v "${PWD}:/app" -w "/app" vbfox/fable-build bash -c "yarn && yarn postinstall && yarn build"
Enter fullscreen mode Exit fullscreen mode

There's sometimes issues with Fable for whatever reason with syntax errors, so you may want to take the time and lint your .travis.yml file, you can do this via running travis lint.

The package.json

The package.json contains something like the following:

    "scripts": {
    "start": "webpack-dev-server",
    "build": "webpack -p",
    "postinstall": "paket restore && paket generate-load-scripts -f netstandard2.0 -t fsx",
    "predeploy": "npm run build",
    "deploy": "gh-pages -d docs"
  },
Enter fullscreen mode Exit fullscreen mode

As you can see webpack is being triggered there as well. That's it - you've now built Fable in Travis CI! Phew, that was easier than we thought.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay