Socket
Socket
Sign inDemoInstall

schematics-utilities

Package Overview
Dependencies
6
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    schematics-utilities

🛠ī¸ Useful exported utilities for working with Schematics


Version published
Weekly downloads
23K
increased by14.37%
Maintainers
1
Install size
76.7 MB
Created
Weekly downloads
 

Changelog

Source

[1.1.3] - 2019-08-02

Docs

  • Deploy docs after improving README file

Readme

Source

Puppeteer Logo

Schematics Utilities

npm Docs Downloads License

Installation ¡ Usage ¡ Disclaimer

ℹī¸ī¸ Description

At the moment, none of the utilities from the Angular Schematics package are exported.

This project was created from that purpose - providing a collection of general and useful utilities for Schematics, based on non-exported existing utilities and further.

You might use this project as a polyfill until these utilities will be exported officially by the relevant teams (and then just replace the path you import). However, consider sticking with this project for additional and unique utilities which are planned for the future.


🔧 How to Install

To Install using npm, simply do:

npm install schematics-utilities

👨đŸģ‍đŸĢ How to Use

import { Rule, Tree } from '@angular-devkit/schematics';
// 1. Import the needed utilities
import { addPackageJsonDependency, NodeDependency, NodeDependencyType } from 'schematics-utilities';

function addDependencies(host: Tree): Tree {
  const dependencies: NodeDependency[] = [{ type: NodeDependencyType.Default, version: '4.17.10', name: 'lodash-es' }];

  // 2. Just use it whenever you need :)
  dependencies.forEach(dependency => addPackageJsonDependency(host, dependency));

  return host;
}

export default function(): Rule {
  return (tree: Tree) => {
    addDependencies(tree);

    return tree;
  };
}

Check out the API docs for the available utilities.


⚠ī¸ī¸ Disclaimer

This repository contains code which is directly taken from:

All credits go to the respective developers! 👏


💁đŸģ Contributing

This is an open source project. Any contribution would be greatly appreciated!

Keywords

FAQs

Last updated on 02 Aug 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡ī¸ by Socket Inc