1.0.12 • Published 3 years ago

auto-import-module v1.0.12

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

auto-import-module

auto import module

About

Auto assemble files and directories by using es module. This tool will auto create default index as directory entry file. This tool supports .js .ts .scss .less .stylus and so on.

Install

Install with npm:

$ npm install --save auto-import-module

Examples

// js
autoImportModule({
  dir: path.join(process.cwd(), 'temp'),
  extension: '.js',
});
// ts
autoImportModule({
  dir: path.join(process.cwd(), 'temp'),
  extension: '.ts',
});
// less
autoImportModule({
  dir: path.join(process.cwd(), 'temp'),
  extension: '.less',
  importModuleOnly: true,
});
// scss
autoImportModule({
  dir: path.join(process.cwd(), 'temp'),
  extension: '.scss',
  importModuleOnly: true,
});
// stylus
autoImportModule({
  dir: path.join(process.cwd(), 'temp'),
  extension: '.styl',
  importModuleOnly: true,
});

options

optionintroduction
dirset watch root directory
extensionset file type, default .js
importModuleOnlyset no export, only import module, defaul false
1.0.2

3 years ago

1.0.1

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.12

3 years ago

1.0.0

3 years ago