Code Monkey home page Code Monkey logo

material-update-tool's Introduction

Angular Material 5.x to 6.0 updater tool

Outdated: This repository won't be updated anymore. Future major releases for Angular Material will also have an upgrade tool that can be used in Angular CLI projects by running ng update @angular/material


Installation

npm i -g angular-material-updater

Note: Running this tool with Angular Material versions higher than 5.2.4 will not work. The updater tool requires type information from the outdated 5.x API. The upgrade to the latest version of Angular Material should happen after running the tool.

Usage

Run the mat-updater command to update your project. The updater tool will attempt to automatically fix issues that it can and report issues that can't be automatically fixed. The tool may not catch 100% of the issues, but it should help get most of the way there. The fixes applied by the tool also may not be perfect. For example it may rename a symbol resulting in an invalid import. If you want to run the tool and just detect issues without trying to fix them, you can do so by specifying --fix=false.

# Show the help for the tool
mat-updater --help

# Run the tool to update prefixes
mat-updater -p path/to/project/tsconfig.json

# Run the tool to update prefixes with additional style
# files not referenced by an Angular component, where --extra-css
# accepts a glob pointing to the style files
mat-updater -p path/to/project/tsconfig.json --extra-css 'custom/**/*.css' 

# Run the tool to but don't automatically change anything
mat-updater -p path/to/project/tsconfig.json --fix=false

After running the tool

  1. Update the packages below if you are using them:
    npm i @angular/cdk@latest
    npm i @angular/material@latest
    npm i @angular/material-moment-adapter@latest
  2. Address any issues that were reported by mat-updater but unable to be automatically fixed.
  3. Try to build your app and fix any issues that show up (e.g. bad imports).

material-update-tool's People

Contributors

devversion avatar jelbourn avatar mmalerba avatar

Watchers

James Cloos 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.