Giter Site home page Giter Site logo

acn-masatadakurihara / schematics-utilities Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nitayneeman/schematics-utilities

0.0 0.0 0.0 730 KB

๐Ÿ› ๏ธ Useful exported utilities for working with Schematics

Home Page: https://nitayneeman.github.io/schematics-utilities

License: MIT License

Shell 0.89% TypeScript 99.11%

schematics-utilities's Introduction

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!

schematics-utilities's People

Contributors

nitayneeman avatar dependabot[bot] avatar acn-masatadakurihara avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.