Socket
Book a DemoInstallSign in
Socket

material-schematics

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

material-schematics

Material Schematics for Angular CLI

latest
npmnpm
Version
1.0.23
Version published
Maintainers
1
Created
Source

Getting Started With Schematics

This repository is a basic Schematic implementation that serves as a starting point to create and publish Schematics to NPM.

Running

  • npm i material-schematics --D
  • ng generate materialShell --collection=material-schematics
  • ng generate materialNav --collection=material-schematics
  • ng generate materialTable --collection=material-schematics
  • ng generate materialDashboard --collection=material-schematics

Testing

To test locally, install @angular-devkit/schematics globally and use the schematics command line tool. That tool acts the same as the generate command of the Angular CLI, but also has a debug mode.

Unit Testing

npm run test will run the unit tests, using Jasmine as a runner and test framework.

Notes

  • npm i -g @angular-devkit/schematics
  • npm i -g @schematics/schematics
  • schematics @schematics/schematics:schematic --name material-schematics
  • cd material-schematics
  • npm i
  • ng generate init --collection material-schematics

Future: ng add material --> update pkg, run schematics, etc

Examples

  • https://github.com/angular/devkit/tree/master/packages/schematics/angular
  • https://github.com/nrwl/nx/blob/master/packages/schematics/src/collection/ngrx/ngrx.spec.ts

Recommendations

  • Expose addDeclarationToNgModule from @schematics/angular/component
  • Expose function to add npm packages to package.json
  • Add function to easily get a base app for testing
  • Add function to easily get the root app module
  • Easier way to scaffold a component

Keywords

schematics

FAQs

Package last updated on 09 Jan 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