Git Product home page Git Product logo

marked-extension-template's Introduction

TODO:

  • Replace information in /README.md
  • Replace name in /rollup.config.js
  • Replace information in /package.json
  • Write extension in /src/index.js
  • Write tests in /spec/index.test.js
  • Uncomment release in /.github/workflows/main.yml

marked-|this-extension|

Usage

import {marked} from "marked";
import |thisExtension| from "marked-|this-extension|";

// or UMD script
// <script src="https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js"></script>
// <script src="https://cdn.jsdelivr.net/npm/marked-|this-extension|/lib/index.umd.js"></script>

const options = {
	// |default options|
};

marked.use(|thisExtension|(options));

marked.parse("|example markdown|");
// <p>|example html|</p>

options

marked-extension-template's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar uzitech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

marked-extension-template's Issues

ESM vs CommonJS Build confusion

I'm trying to build an extension using this template, but I don't fully understand all of the changes that came with the recent change to ESM. I'm assuming there's some similar small update that also needs to be carried over to this package, because when I try to build my package I get the following error :

An error occurred while running semantic-release: Error [ERR_REQUIRE_ESM]: require() of ES Module /home/runner/work/marked-> extended-tables/marked-extended-tables/release.config.js from /home/runner/work/marked-extended-tables/marked-extended-tables/node_modules/cosmiconfig/dist/loaders.js not supported.

release.config.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules.

Instead rename release.config.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in /home/runner/work/marked-extended-tables/marked-extended-tables/package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).

Can you recommend the preferred approach here to best follow the format that Marked.js uses?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.