Skip to content

Switch from codemirror to prism #386

@Wolfr

Description

@Wolfr

I implemented a version of Bedrock where codemirror is out and prism is in: https://github.com/usebedrock/bedrock/tree/feature/prism-code-blocks

This necessitated some changes to the Browserify/Babel setup, which is more modern now 🙌 . Don't you love how one problem solves another?

In https://github.com/usebedrock/bedrock/tree/feature/browserify-direct I set up Bedrock to load a .babel.config.js (defined in the root of the project), with content similar to this:

  "presets": [
    ["@babel/preset-env"]
  ],
  "plugins": [
    ["prismjs", {
        "languages": ["markup", "pug"],
        "theme": "ghcolors"
    }]
  ]
}

I guess we could split up the config to compile the front-end JS and the prototype JS with 2 different configs, but rolling with this for now to test-drive it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions