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

rc.0 question: if i'm using systemjs for loading, which files i need to copy using gulp while publishing app ? #8412

Closed
virtualvoid opened this issue May 3, 2016 · 9 comments

Comments

@virtualvoid
Copy link

Until the angular2 rc.0 (yay!) there was files like angular2.dev.js http.dev.js router.dev.js etc.
I was copying these files using gulp task from node_modules/angular2/bundles intowwwroot/libs because it's just bad practice to deploy all the things from node_modules into the same folder on web server.

The quickstart's index.html is including stuff from node_modules. Now the question is, which files I need to copy from node_modules/@angular in order to get the app working outside ?

I think it would be nice if the quickstart contains information on how to deploy apps too.

@robwormald
Copy link
Contributor

we're not yet shipping bundles with the new RC (soon) - now would be a good time to look at setting up a proper build process rather than using the bundles, which will always give you more code than you need.

Assuming you have a functional app that runs by dynamically loading the individual files, its trivial to set up a system build step - https://github.com/robwormald/new-world-test/blob/system/system-js/bundle.js for example. You can wrap that in a gulp task and build your own bundle.

@damienbod
Copy link

This is a problem when trying to use angular2 with Visual Studio and the ASP.NET core template. The quick start does not work.

@virtualvoid
Copy link
Author

@robwormald that look promising, does it work with external templates (templateUrl) ?

@antonybudianto
Copy link

antonybudianto commented May 3, 2016

@virtualvoid please take a look at my starter setup
we can use systemjs-builder to bundle everything into one file.
also I didn't inline the templateUrl and it worked

@virtualvoid
Copy link
Author

So, I've tried the systemjs builder and i don't like the way it works (path mapping).

I'll stick with webpack for now. I hope it will work with rc.0.

@Kriskit
Copy link

Kriskit commented May 4, 2016

To clarify, is this to say that systemjs bundles will no longer be provided from now on?

@woppa684
Copy link

woppa684 commented May 4, 2016

@robwormald , it's me again ... (see, #5248 (comment)) After a lot of hard work we finally had our build chain going with MSBuild:

  • resolve dependencies (e.g. angular2, systemjs, es6-shim etc)
  • copy d.ts files of dependencies from our thirdparty folder to the correct node_modules folder in source
  • copy source html files (templates) and svg's to intermediate folder
  • compile source scss files to intermediate folder (using node-sass)
  • compile ts files to intermediate folder
  • tslint
  • inline svg's in html and css
  • inline html and css files in js files
  • run tests (using karma and phantomjs)
  • publish generated d.ts files
  • bundle (using webpack)
  • copy bundles of dependencies from thirdparty folder to output folder, after this step this folder contains a working application including its dependencies

So, as I see now I have to change my build system again. What steps need to change? Since there are no bundles anymore is it expected that I compile the source into my own applications? Can I still create my own bundles or will they be here soon again? I'm a bit puzzled at the moment...

I know this page is only for issues, but since we were already on the topic I thought I'd chip in ... :)

@vicb
Copy link
Contributor

vicb commented Sep 27, 2016

obsolete

@vicb vicb closed this as completed Sep 27, 2016
@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 9, 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

No branches or pull requests

7 participants