Socket
Book a DemoInstallSign in
Socket

codemo

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codemo

Embeds console output to the code

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
45
-35.71%
Maintainers
1
Weekly downloads
 
Created
Source

codemo

Embeds console output to the code

NPM version Build status Test coverage

Installation

This module is installed via npm:

npm install codemo --save

Usage

const codemo = require('codemo')

codemo
  .process("console.log('Hello world!')")
  .then(result => consle.log(result))

The result will be

console.log('Hello world!')
//> Hello world!

API

codemo.process(code, [opts])

Return a promise with the resulting file combined with output.

  • opts.cwd - the directory in which the code should be executed
  • opts.es6 - whether the code is written using ES6

codemo.processFile(filePath, [opts])

Return a promise with the resulting file combined with output.

  • opts.es6 - whether the code is written using ES6

License

MIT © Zoltan Kochan

Dependencies Dependency status

  • acorn: ECMAScript parser
  • callsites: Get callsites from the V8 stack trace API
  • cross-spawn-async: Cross platform child_process#spawn
  • file-position: Given a row/column number, return the index of that character within the whole string
  • normalize-newline: Normalize the newline characters in a string to \n
  • normalize-path: Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes.
  • rollup: Next-generation ES6 module bundler
  • rollup-plugin-babel: Seamless integration between Rollup and Babel.
  • rollup-plugin-includepaths: Rollup plugin to use relative paths in your project files
  • source-map: Generates and consumes source maps

Dev Dependencies devDependency status

  • chai: BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
  • cz-conventional-changelog: Commitizen adapter following the conventional-changelog format.
  • eslint: An AST-based pattern checker for JavaScript.
  • eslint-config-standard: JavaScript Standard Style - ESLint Shareable Config
  • eslint-plugin-promise: Enforce best practices for JavaScript promises
  • eslint-plugin-standard: ESlint Plugin for the Standard Linter
  • ghooks: Simple git hooks
  • istanbul: Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests
  • mocha: simple, flexible, fun test framework
  • mos: A pluggable module that injects content into your markdown files via hidden JavaScript snippets
  • semantic-release: automated semver compliant package publishing
  • validate-commit-msg: Script to validate a commit message follows the conventional changelog standard

Keywords

example

FAQs

Package last updated on 17 Apr 2016

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