JSPM

  • Created
  • Published
  • Downloads 173
  • Score
    100M100P100Q83619F
  • License Apache-2.0

A programmatical command line interface used by projects and that calls on external transformers to make relevant code

Package Exports

  • @stackpress/idea-transformer
  • @stackpress/idea-transformer/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@stackpress/idea-transformer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Idea Transformer

A programmatical command line interface used by projects and that calls on external transformers to make relevant code.

Install

$ npm install @stackpress/idea-transformer

... or ...

$ yarn add @stackpress/idea-transformer

Custom Terminal

Create a bin file and paste this basic example.

#!/usr/bin/env node

const { Terminal } = require('@stackpress/idea-transformer');
new Terminal().run();

You can whitelabel idea like the following. This will prefix all outputs with [MY LIB] and schema files now need to have the extension .mylib.

#!/usr/bin/env node

const { Terminal } = require('@stackpress/idea-transformer');
Terminal.brand = '[MY LIB]';
Terminal.extension = 'mylib';
new Terminal().run();

Programmatically Transform

You can also call the transformer manually like the following example.

const { Loader, Transformer } = require('@stackpress/idea-transformer');

const cwd = __dirname;
const idea = Loader.absolute('./my.idea', cwd);

const transformer = new Transformer(idea, cwd);
//read raw schema data
const schema = transformer.schema;
//transform schema
transformer.transform();

See [https://github.com/stackpress/idea] for more info.