Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): add webpack update instructions #1456

Merged

Conversation

filipesilva
Copy link
Contributor

@filipesilva filipesilva commented Jul 26, 2016

Blocked by #1455 and angular-cli@webpack release. This PR should not be merged before we do a release, as there are more changes that can happen meanwhile.

Things that need to be incorporated into the guide:

  • mention that existing sass/etc files need to be renamed in styleUrls to include their real suffix, in beta.10 we were always using .css suffix in the array.
  • mobile app upgrade instructions

@filipesilva filipesilva force-pushed the webpack-update-instructions branch 2 times, most recently from c7e8ffd to 519d8e3 Compare July 26, 2016 23:29
@hansl
Copy link
Contributor

hansl commented Jul 27, 2016

LGTM.

* `./config/karma-test-shim.js`
* `./src/app/system-config.ts`
* `./angular-cli-build.js`
* `./typings.json`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 37 says ./typings.json is updated, here (Line 50) it can be deleted. Typo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo indeed, fixed now!

@intellix
Copy link
Contributor

intellix commented Jul 27, 2016

Also another note. Even if I do this for a new project, ng serve gives me:

No angular-cli-build.js found. Please see the transition guide: https://github.com/angular-cli/angular-cli/blob/master/TRANSITION.md#user-content-brocfile-transition.

I believe this is because addon/ng2/blueprints/ng2/files/package.json ends up referencing angular-cli@1.0.0-beta.10. (I did the install using an npm linked angular-cli on webpack branch as well)

@filipesilva
Copy link
Contributor Author

@intellix at the moment we haven't yet done the webpack release mentioned in the instructions so you're basically just running with master, so the following instructions apply:

https://github.com/angular/angular-cli#development-hints-for-hacking-on-angular-cli

There's a shortcut you can use as well, ng new --link-cli, which will do the linking for you.

@filipesilva filipesilva deleted the webpack-update-instructions branch July 27, 2016 13:48
@filipesilva filipesilva restored the webpack-update-instructions branch July 27, 2016 16:02
@filipesilva filipesilva reopened this Jul 27, 2016
@filipesilva
Copy link
Contributor Author

(closed by accident)

## Local project package:
```
rm -rf node_modules dist tmp typings
npm install --save-dev angular-cli@webpack
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the release to npm w/ webpack the @webpack is not needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hans said that the release would not be made as 1.0.0-beta.11 but rather as webpack, so we need to install that particular version for now.

@elvirdolic
Copy link

If you use sass. You have also to rename your css files to .scss or .sass in templateUrl otherwise It won't be picked up and an error message is shown.

@filipesilva
Copy link
Contributor Author

@elvirdolic good point. I'll add that to a list on the first comment so that it's updated before the release.

1. Updated files:
* `./config/karma.conf.js` - `frameworks`/`plugins`/`files`/`exclude`/`preprocessors` entries changed, added `angularCliConfig` entry.
* `./e2e/tsconfig.json` - property cleanup, changed `outdir`, added `typeRoots`
* `./package.json` - removed typings postinstall script, removed `ember-cli-inject-live-reload`/`es6-shim`/`systemjs` dependencies, added `core-js`/`ts-helpers` dependencies, updated `angular-cli`/`codelyzer`/`ts-node`/`ts-lint`/`typescript` devDependencies, added `@types/jasmine`/`@types/protractor`/`karma-coverage` devDependencies.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should #1468 be merged in before the @webpack release, karma-remap-istanbul will be added to the devDependencies list.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aiming to get his merged in asap, so will update it later with this change for an upcoming release.

@filipesilva filipesilva force-pushed the webpack-update-instructions branch 2 times, most recently from 17de707 to 79f1a00 Compare August 3, 2016 15:07
@@ -0,0 +1,59 @@
# Upgrading from angular-cli@1.0.0-beta.10 to the angular-cli@1.0.0-beta.11-webpack

To update `angular-cli` to the webpack preview, you must update both the global package, project's local package and your project files.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically the global package shouldn't care about it. Only the local package needs to be installed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the official update procedure for ember-cli itself actually. I don't think it's a good idea to have de-synced versions of global and local... plus without the global version your ng new will generate old projects.


## Project files

You will need to run `ng init` to check for changes in all the auto-generated files created by `ng new` and allow you to update yours. You are offered four choices for each changed file: `y` (overwrite), `n` (don't overwrite), `d` (show diff between your file and the updated file) and `h` (help).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove ng init. It's dangerous that people are relying on it; it will not touch files that have been deleted, or files added by the user. We need to list a higher level list of things to take care when updating the application.

@hansl
Copy link
Contributor

hansl commented Aug 3, 2016

I still have pretty strong comments about the structure of this document, but if you insist on getting this in first and then working on incremental updates I'm fine with its state right now.

@filipesilva filipesilva merged commit 5ea4b03 into angular:master Aug 3, 2016
@filipesilva filipesilva deleted the webpack-update-instructions branch August 3, 2016 17:33
@wouterkirstein
Copy link

Hi there, I am trying a lot of approaches to migrate from my current project running on systemJS based on the quick-start to the format of the angular-cli. Do you maybe have some advice?

@filipesilva
Copy link
Contributor Author

@wouterkirstein I'd say this:

  • make a new project using ng new
  • copy over the whole app into ./src/
  • configure your main.ts in angular-cli.json (and anything else you see is different)
  • remove any module.id you have in components (not needed)
  • make all html/css paths in components relative

If you still have problems then stack overflow is the best place to ask.

@wouterkirstein
Copy link

wouterkirstein commented Dec 23, 2016 via email

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants