Skip to content

Instantly share code, notes, and snippets.

@thekiba
Last active April 25, 2018 15:33
Show Gist options
  • Save thekiba/82dc5c287accb19dedc9664a250c4177 to your computer and use it in GitHub Desktop.
Save thekiba/82dc5c287accb19dedc9664a250c4177 to your computer and use it in GitHub Desktop.

Обновляем angular и зависимости.

npm install --save-dev @angular/{cli,compiler-cli}@6.0.0-rc.5
npm install --save-dev typescript@2.7.2
npm install --save @angular/{animations,common,compiler,core,forms,http,platform-browser,platform-browser-dynamic,router,service-worker}@6.0.0-rc.5

ng update @angular/cli --migrate-only --from=1.7.3

# DELETE .angular-cli.json
# CREATE angular.json (5377 bytes)
# UPDATE karma.conf.js (1134 bytes)
# UPDATE src/tsconfig.spec.json (323 bytes)
# UPDATE package.json (5677 bytes)

npm install --save {rxjs,rxjs-compat}@6.0.0-terrific-rc.3
npm install --save-dev rxjs-tslint

cat > migrate-rxjs.tslint.json << EOF
{
  "rulesDirectory": ["node_modules/rxjs-tslint"],
  "rules": {
    "update-rxjs-imports": true,
    "migrate-to-pipeable-operators": true,
    "collapse-rxjs-imports": true
  }
}
EOF

Внимание! После этого необходимо запускать tslint до тех пор, пока он перестанет исправлять.

./node_modules/.bin/tslint -c migrate-rxjs.tslint.json --project src/tsconfig.app.json --fix

Удаляем лишнее

npm uninstall --save-dev rxjs-tslint rxjs-compat
rm -rf migrate-rxjs.tslint.json

Дальше необходимо проверить все изменения, и возможно будут ошибки, которые надо поправить.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment