Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@namics/blueprint

Package Overview
Dependencies
Maintainers
6
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@namics/blueprint

Create blueprints and use them in you project to create components, packages ...

  • 0.1.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
6
Weekly downloads
 
Created
Source

Blueprint npm

Create blueprints and use them in you project to create components, packages ...

Install

npm i -D @namics/blueprint

Usage

.blueprintrc.js

module.exports = {
  'react-app': {
    title: 'Create a new react app',
    src: './demo/test-package/example-app.zip',
  },
};
interface IBlueprintrc {
  [key: string]: {
    title: string;
    src: string;
    overrideDestination?: () => string,
    additionalQuestions?: (answers: { inquirer.Answers }) => Promise<inquirer.Questions>,
    collectResult?: (answers: inquirer.Answers) => inquirer.Answers,
    getCustomReplacements?: (answers: inquirer.Answers) => string[][],
  }
}

example

API

import blueprint from '@namics/blueprint';

blueprint('react-app', {
  srcFilePath: path.resolve(process.cwd(), 'blueprints', 'example-app.zip'),
  targetPath: path.resolve(process.cwd(), 'packages'),
  oldName: 'example-app',
  newName: 'awesome-app',
  customReplacements: [['BEM-placeholder', 'a']],
});
  • srcFilePath: path to zip file
  • targetPath: path in which the new app/component/* should be created
  • oldName: old name is usually the filename
  • newName: the name of the app/component/*
  • customReplacements: define custom replacements forEach file data replacement

CLI

$ blueprint --value awesome-app --blueprint react-app --config .blueprintrc.js --destination packages

Options

-i, --interactive Use interactive command line user interface

-b, --blueprint The blueprint which should be used

-v, --value Name of the app/component/* which should be created

-d, --destination Destination path

-c, --config Path to config js file

License

MIT License

FAQs

Package last updated on 17 May 2018

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