@tririga/tri-fix-import
Convert Node-style named import specifiers to relative import paths that can be used in the UX framework.
Last updated 2 years ago by tasoares .
MIT · Original npm · Tarball · package.json
$ cnpm install @tririga/tri-fix-import 
SYNC missed versions from official npm registry.

tri-fix-import

Convert Node-style named import specifiers to relative import paths that can be used in the UX framework. Example 1: A component file (component-sample1.js) located inside the folder component-sample1 and that has an import like: import { Base } from '@polymer/polymer/polymer-legacy.js';

The import will be converted to:
import { Base } from '../@polymer/polymer/polymer-legacy.js';

Example 2: A component file (component-sample2.js) located inside the folder @tririga/component-sample2 and that has an import like: import { Base } from '@polymer/polymer/polymer-legacy.js';

The import will be converted to:
import { Base } from '../../@polymer/polymer/polymer-legacy.js';

Installation

$ npm install @tririga/tri-fix-import -g

Synopsis

$ tri-fix-import -d <list of directories>

Options

  • -d, --dirs directory_path The directory path(s) that contains the javascript files. Defaults to the current directory path.
  • --version print tri-deploy version.
  • --help print this message.

Usage

Convert the javascript files located in the current directory:

$ tri-fix-import

Convert the javascript files located in the node_modules and triplat directories:

$ tri-fix-import -d ./node_modules ./triplat

Current Tags

  • 0.1.1                                ...           latest (2 years ago)

2 Versions

  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |