New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

kopy

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kopy

The backbone of a scaffolding tool.

  • 9.4.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3K
decreased by-12.81%
Maintainers
2
Weekly downloads
 
Created
Source








kopy 1








NPM version NPM downloads CircleCI package size donate chat


The backbone of a scaffolding tool.

Features

  • Zero-dependency, very light-weight (940KB) compared to Yeoman (12MB)
  • Ultra-simple, this module exists because writing Yeoman generator is hard and time-consuming

Install

yarn add kopy

Usage

const kopy = require('kopy')

const config = {
  prompts() {
    return [
      {
        type: 'input',
        name: 'name',
        message: 'what is your name'
      }
    ]
  },
  actions() {
    return [
      {
        type: 'copy',
        files: '**',
        cwd: '/path/to/templates',
        // When specified, transform the files with `ejs`
        data: this.answers
      }
    ]
  },
  completed() {
    console.log('Done!')
  }
}

const generator = kopy(config)

generator
  .run({
    outDir: './out'
  })
  .catch(kopy.handleError)

Testing:

const kopy = require('kopy')

test('it works', async () => {
  const generator = kopy(config)
  await generator.emulate()
  expect(generator.answers).toEqual({ name: '' })
})

Read more docs on our website.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

kopy © EGOIST, Released under the MIT License.
Authored and maintained by EGOIST with help from contributors (list).

Website · GitHub @EGOIST · Twitter @_egoistlily

FAQs

Package last updated on 09 Jan 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc