Socket
Book a DemoInstallSign in
Socket

jstransformer-myth

Package Overview
Dependencies
Maintainers
7
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jstransformer-myth

Myth support for JSTransformers.

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
7
Created
Source

jstransformer-myth

Myth support for JSTransformers.

Build Status Coverage Status Dependency Status NPM version

Installation

npm install jstransformer-myth

API

var myth = require('jstransformer')(require('jstransformer-myth'));
var opts = {};

myth.render('pre {\n  margin: calc(50px * 2);\n}', opts).body;
//=> 'pre {\n  margin: 100px;\n}'


var promise = myth.renderFileAsync('./path/to/hello.myth', opts);
promise.then(function(data) {
  console.log(data.body);
  //=> 'pre {\n  margin: 100px;\n}'
});

future.css

:root {
  --purple: #a6c776;
  --size: 1.2rem;
}

@custom-media --narrow-window screen and (max-width: 30em);

@media (--narrow-window) {
  html {
    font-size: var(--size);
  }
}

a {
  color: var(--purple);
}

will be transformed to

@media screen and (max-width: 30em) {
  html {
    font-size: 1.2rem;
  }
}

a {
  color: #a6c776;
}

License

MIT

Keywords

jstransformer

FAQs

Package last updated on 23 Dec 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