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

Add final step for building and testing in non-Dartium browsers #39

Open
sethladd opened this issue Jan 30, 2014 · 8 comments
Open

Add final step for building and testing in non-Dartium browsers #39

sethladd opened this issue Jan 30, 2014 · 8 comments

Comments

@sethladd
Copy link
Contributor

Can you add a final step for how to build the app and open in Firefox, safari, etc ?

Thanks!

@a14n
Copy link
Contributor

a14n commented Jan 30, 2014

I just read Chapter 7: Production Deployment. I can't imagine someone with only 1 or 2 hours of Dart practice to dive into this part. It's really for Dart masters !

For instance :

  • is it mandatory to use a generator ?
  • can the bin/generator.dart file be copy and paste safely without change ? It's not so obvious.

I can add a last part for the ShadowDom polyfill but I'll be happy to skip the generation section if possible.

@sethladd
Copy link
Contributor Author

I totally understand, chapter 7 is like voodoo. :) Developers shouldn't have to do half of those steps.

What about just telling developers about pub build for now?

I've also opened dart-archive/angular.dart#475 to ask that we don't need to manually add shadow_dom.

cc @kathyw for her thoughts.

@a14n
Copy link
Contributor

a14n commented Jan 30, 2014

Can we close this one ?

@sethladd
Copy link
Contributor Author

We can't close it yet. We need a Step 9: building and testing in browsers.

Topics:

  • running pub build
  • explaining what happened and what the build dir is for
  • starting a local HTTP server (cd build && python -m SimpleHTTPServer as an example)
  • opening the app in your favorite (non-Dartium) browser

As far as I could tell, the code lab doesn't show you how the app works in other browsers.

Thanks!

@mbreton
Copy link

mbreton commented Jan 31, 2014

Hi,
The idea of this step could be cool. But build a simple HTTP Dart server instead of a python server (may be not installed) should be a better idea ? The shell could look like (from the root of the project):
$: pub build && dart server.dart

@a14n
Copy link
Contributor

a14n commented Jan 31, 2014

About the last topic : since ShadowDom polyfill is here from step-1. At any step we can use Run as Javascript (in my case the browser used is FF ). You can also paste the url in an other browser.

I agree on pub build and to run a server we can simply add a bin/server.dart :

import 'dart:io';
import 'package:http_server/http_server.dart';
void main() {
  HttpServer.bind(InternetAddress.ANY_IP_V4, 8080).then((server) {
    new VirtualDirectory('../build/web').serve(server);
  });
}

@sethladd
Copy link
Contributor Author

I like it.

@sethladd
Copy link
Contributor Author

pub build should now work for steps 1 - 9

Can we add this as a final step?

Up to you if you want to involve the Dart HTTP server. That part is optional :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants