New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

grow-files

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grow-files

Node.js CLI convert and generate tool for template file 🥂

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
1
Created
Source

Node.js CLI convert and generate tool for template file 🥂

grow-files

Node.js CLI convert and generate tool for template file

Usage

Set up

npm install -g grow-files
grow-files <path>

# Create if not
# ✨  Created TemplatesDir!! Let's create a template in the created directory. - <HomeDir>/.grow-files/templates

Create template HomeDir/.grow-files/templates

<HomeDir>
┗ .grow-files
  ┗ templates
    ┗ module
      ┗ $FILE_NAME.spec.ts
      ┗ $FILE_NAME.ts
// HomeDir/.grow-files/templates/module/$FILE_NAME.spec.ts

import { $FILE_NAME } from './$FILE_NAME';

describe('Test the $FILE_NAME.', () => {
  test('Test the example method response to undefined.', () => {
    const resp = $FILE_NAME.example();
    expect(resp).toBe(undefined);
  });
});
// HomeDir/.grow-files/templates/module/$FILE_NAME.ts

/**
 * class methods name: $FILE_NAME
 *
 * @export
 * @class $FILE_NAME
 */
export class $FILE_NAME {
  /**
   * example class method
   *
   * @static
   * @memberof $FILE_NAME
   */
  public static example() {}
}

Execute

grow-files ./src/modules/StringModule
# grow-files <path>

# templates/ 配下に配置したディレクトリの名前一覧が表示されます。
# そのうちの一つを選択します。
? Choose a template.
// src/modules/StringModule.spec.ts

import { StringModule } from './StringModule';

describe('Test the StringModule.', () => {
  test('Test the example method response to undefined.', () => {
    const resp = StringModule.example();
    expect(resp).toBe(undefined);
  });
});
// src/modules/StringModule.ts

/**
 * class methods name: StringModule
 *
 * @export
 * @class StringModule
 */
export class StringModule {
  /**
   * example class method
   *
   * @static
   * @memberof StringModule
   */
  public static example() {}
}

License

MIT License © 2021 hanetsuki

Keywords

file

FAQs

Package last updated on 06 Jul 2021

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