0.2.4 • Published 5 months ago

@rosmarinus/import-map-generator v0.2.4

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

@rosmarinus/import-map-generator

Generate an import map from your source code, which can be used to load modules in sub path.

Install

npm install @rosmarinus/import-map-generator -D

Usage

CLI

rosmarinus-import-map-generator gen-export-map --config map.config.js

API

import { genExportMap } from '@rosmarinus/import-map-generator';

await genExportMap({
  input: ['src/modules/*.ts'];
  outputFileName: 'dist/map.json';
  cwd: process.cwd();
});

Configuration

// map.config.js
module.exports = {
  // glob pattern to find all files that should be included in the export map
  input: ['src/modules/*.ts'],
  exclude: [],
  // output file name
  outputFileName: 'dist/map.json',
  // current working directory
  srcDir: 'src',
};
0.2.4

5 months ago

0.2.3

6 months ago

0.2.2

6 months ago

0.2.1

6 months ago

0.2.0

6 months ago