Skip to content

feat(gen:app): remove bower, initial webpack support #1892

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

Closed
wants to merge 12 commits into from
Closed

Conversation

Awk34
Copy link
Member

@Awk34 Awk34 commented May 16, 2016

  • Gulp
    • Babel
      • serve
      • test
      • test:e2e
    • TS
      • serve
      • test (seems like typings issues)
      • test:e2e
  • Grunt

@Koslun
Copy link
Member

Koslun commented May 20, 2016

Awesome job so far! Truly a tremendous amount of changes!

Wanted to see if I could help some but couldn't get gulp serve or gulp test:client to work (gulp test:server works. Tried to run gulp-ts, with two different configurations (ngRoute +jasmine & ui-router + mocha), and gulp-babel-mocha-ui-router locally using this PR.

Biggest issue was webpack not rendering an index.html file when I tried running gulp serve. Tried changing HtmlWebpackPlugin options but didn't seem to fix anything.

Snapshot of console output for gulp-ts-ui-router-mocha:

Version: webpack 1.13.1
Time: 5642ms
                  Asset     Size  Chunks             Chunk Names
          app.bundle.js   398 kB       0  [emitted]  app
    polyfills.bundle.js   210 kB       1  [emitted]  polyfills
       vendor.bundle.js  2.38 MB       2  [emitted]  vendor
      app.bundle.js.map   488 kB       0  [emitted]  app
polyfills.bundle.js.map   274 kB       1  [emitted]  polyfills
   vendor.bundle.js.map  2.78 MB       2  [emitted]  vendor
      client/index.html  1.39 kB          [emitted]  
Child html-webpack-plugin for "client/index.html":
                Asset     Size  Chunks       Chunk Names
    client/index.html  2.69 kB       0       
webpack: bundle is now VALID.
webpack: bundle is now INVALID.
webpack: wait until bundle finished: /
webpack: wait until bundle finished: /
webpack: wait until bundle finished: /
webpack: wait until bundle finished: /
webpack: wait until bundle finished: /
webpack: wait until bundle finished: /
webpack: wait until bundle finished: /
webpack: wait until bundle finished: /
webpack: wait until bundle finished: /
webpack: wait until bundle finished: /
webpack: wait until bundle finished: /
webpack: wait until bundle finished: /
webpack: wait until bundle finished: /
webpack: wait until bundle finished: /
webpack: wait until bundle finished: /
[23:12:30] Finished 'start:client' after 7.43 s
[23:12:30] Starting 'watch'...
Error: ENOENT: no such file or directory, stat '/home/adam/apps/gen-gulp-ts-webpack/client/index.html'
    at Error (native)     

With TypeScript there were additionally a lot of complaints about Cannot find name 'xxxx' such as require and angular. Tried changing to import but just changed to Cannot find module 'angular'., etc.

So thinking the module loading is either broken or not implemented yet, then failing to render is either a side-effect of that or another bug or incomplete feature.

Is this working at your end, or did you just mark the check boxes to show that you've begun working on fixing those particular aspects? And are you iterating too fast for it to be worthwhile for me to debug/help out or should I hold off until it's more ready?

@Awk34
Copy link
Member Author

Awk34 commented May 21, 2016

So I added code to the gen to replace all angular ES6 imports with regular requires when using TS. It has to do with the angular packages not having default exports.

The checkboxes are more for me. Those are the one's I've gotten a minimal working version of locally. (I've been ignoring TS type errors for now) Feel free to help out, though.

I'm probably going to end up taking out he Grunt file and only supporting Gulp..

@Koslun Koslun mentioned this pull request May 22, 2016
3 tasks
@Koslun
Copy link
Member

Koslun commented May 22, 2016

So I added code to the gen to replace all angular ES6 imports with regular requires when using TS. It has to do with the angular packages not having default exports.

Weird because prior to moving to typings I think I got the TS compiler to recognize the Angular modules used through tsd, i.e. on definitely typed. Had to copy the tsconfig.client.jsonfile to renamed tsconfig.json for visual studio code to understand it but the ts compiler understood it fine using import. I did however import a lot more angular modules using the latest hash, might be that they added that default exports in a later commit? Probably however worth mentioning that since I only lied to the TS compiler that SystemJS or Commonjs was loaded it didn't actually run once compiled since it could not find the System or require objects respectively.

The checkboxes are more for me. Those are the one's I've gotten a minimal working version of locally. (I've been ignoring TS type errors for now) Feel free to help out, though.

So is the index.htmlfile being rendered on your local version? And are the require's being resolved so that the modules are loaded with you actually being able to see and use the app?

If it's working, could you maybe just send over the rendered version of index.html file you have for reference, along with a list of the packages you have installed globally? I.e. npm list -g --depth=0.

Can look at it later today or tomorrow then I think.

I'm probably going to end up taking out he Grunt file and only supporting Gulp..

Sounds good, agree with the points raised in #1869.

@Awk34 Awk34 force-pushed the webpack branch 3 times, most recently from 28737b8 to 3f95625 Compare June 6, 2016 12:11
@Awk34
Copy link
Member Author

Awk34 commented Jun 11, 2016

Oops, this PR should be against canary

@Awk34 Awk34 closed this Jun 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants