Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chimi

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chimi

Run JavaScript snippets from your markdown files

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20
increased by185.71%
Maintainers
1
Weekly downloads
 
Created
Source

chimi :gun:

Run JavaScript snippets from your markdown files.

TODO

V1

  • CLI
    • Configuration (.chimi.js(on)?|.chimirc).
    • Missing flags (?).
    • --help.
    • Log failures.
  • Snippet metadata. Using MD snippets flags (?)

Future

  • CLI
    • Improve current interface. Jest like interface when running/watching.
    • Watch mode.
    • Run multiple files.
  • Transpile with Babel. Check for project Babel config. (?)
  • Lint with Eslint. If project has Eslint configured.(?)
  • Environment. Use jsdom?

Docs

Snippet metadata

There are a couple of directives available to configure how snippets are run indivitually.

NOTE: directives must go in the same line as the snippet opening tag (```js) preceded by a hash #.

  • skip: use this directive if you want to skip the snippet from being run. It does not make sense to add any other directives alogside this one.
```js # (skip)
  • fail: use this directive when the snippet is expected to fail.
```js # (fail)
  • no-globals: use this directive to skip global dependencies injection to the current snippet.
```js # (no-globals)
  • deps: use this directive to list dependencies to be injected only to this snippet.
    • (name:path): Specify name and path.
    • (name): Shorthand when the name is the same as the path
```js # (deps (trae) (pkg:./package.json))
  • env & template: specify the environment to run the snippet on. For jsdom you can also specify a template, wheater it is a file or just markup. The template directive is omitted when running in node environment.
```js # (env:jsdom) (template:'<div id="app"></div>') 
```js # (env:jsdom) (template:./assets/snippet.html)
```js # (env:node)

FAQs

Package last updated on 15 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc