Coder Social home page Coder Social logo

dsi-hug / ngx-schematics-utilities Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 0.0 6.36 MB

🚀 Useful utilities for Angular Schematics

License: GNU General Public License v3.0

JavaScript 7.09% TypeScript 89.51% CSS 3.18% MDX 0.21%
schematics utilities utils tools helpers devkit angular angular-cli angular-devkit sdk

ngx-schematics-utilities's Introduction

@hug/ngx-schematics-utilities


hug-logo

Useful utilities for Angular Schematics

npm version npm donwloads license GPLv3 docs-site

build status PRs welcome


Schematics

Schematics are generators that transform an existing filesystem.
They can create files, refactor existing files, or move files around.

More info

Getting started

This library provide a large set of utilities that can be used while developing a schematic for Angular.

👉 Learn about it on the docs site.

Example

export default (options: MySchematicOptions): Rule =>
  schematic('my-schematic', [
    modifyJsonFile('tsconfig.json', ['compilerOptions', 'strict'], true),

    workspace()
      .spawn('ng', ['add', '@angular/material', '--skip-confirmation'])
      .addPackageJsonDevDependencies(['eslint'])
      .packageInstallTask()
      .isAngularVersion('<= 11', () => {
        ...
      })
      .toRule(),

    application(options.project)
      .deployFiles(options)
      .addImportToFile('__SRC__/main.ts', 'environment', './environments/environment')
      .deleteFiles(['karma.conf.js'])
      .rule(({ project }: ChainableApplicationContext) => {
        return createOrUpdateFile(project.pathFromRoot('README.md'), project.name);
      })
      .toRule()

  ], options);

Development

See the developer docs.

Contributing

> Want to Help?

Want to file a bug, contribute some code or improve documentation? Excellent!

But please read up first on the guidelines for contributing, and learn about submission process, coding rules and more.

> Code of Conduct

Please read and follow the Code of Conduct, and help us keep this project open and inclusive.

Credits

Copyright (C) 2021 HUG - Hôpitaux Universitaires Genève

love@hug

ngx-schematics-utilities's People

Contributors

badisi avatar dependabot[bot] avatar pythoncoderas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  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.