DorianGrey / ng-webpack-template

A template for angular development using webpack with customized development and production workflow
MIT License
7 stars 1 forks source link

Usability optimization #7

Closed DorianGrey closed 7 years ago

DorianGrey commented 7 years ago

This template started as a companion of https://github.com/flaviait/ng2-jspm-template, and initially was more like a quick shot to get a proper comparison between webpack- and systemjs/jspm-based setups for development of angular applications. Even though that comparison is already completed, I've decided to keep up this template for potential migration purposes, and for anyone searching for a setup with frequently used features and libraries included by default (ngrx is a good example here). Though the angular-cli project has evolved much since I've started with this, I'm not yet that comfortable with it. Esp. when it comes to extensibility and ejection, it's still far behind the capabilities of projects with similar intention, e.g. create-react-app for react. The setups it generates might be suitable for a lot a people - esp. beginners - but as long as advanced features and build-steps (as you know, webpack offers a lot of possible steps - suppose the only thing it can't do is serving a cup of coffee to my desk :smirk:) are literally impossible without ejection, I think there will always be a huge place for template projects like this - and that's why I'm still maintaining it.

However, since it started, I've also worked with other frameworks like react and vuejs, including potential setups: https://github.com/DorianGrey/react-ts-playground https://github.com/DorianGrey/vue-ts-playground Not all of the evaluated setups and build steps have proven their worth, but quite a lot have illustrated that the esp. the output of this template is a bit noisy, sometimes confusing and might lack useful information, thus drifting away from the focus of easy development. As a result of these evaluation steps, I've decided to adopt some of these dev and prod mode improvements to this template. An overview of what will definitely come and what is still under consideration can be found below. Since quite a lot of these changes are breaking ones, they will be added in a major release. The impact on your particular project depends on your level of customization, but in most cases, it will only require to adopt some of the new configs and the usage of the scripts.

Development will take place in this branch: https://github.com/DorianGrey/ng-webpack-template/tree/usability-rework Always open for suggestions!

Changes that will definitely come

General

Production mode

Changes still to be considered/discussed

Change test runner

You might have recognized that there are two branches in this repo, evaluating different test runners, namely:

While the latter still has some issues (e.g. this), Jest has shown that it works quite well and is a lot faster than the Karma-based approach, even though it requires a bit more of setup and mocks due to jsdom. I'm still not sure if these observations still hold true for larger or more complex projects. This is still in evaluation, input is welcome.

DorianGrey commented 7 years ago

The first part - usability rework - has been merged into master and release in V13.0.0.

The PWA abilities (e.g. service worker) are still work in progress.

DorianGrey commented 7 years ago

Service worker development takes place on this branch: https://github.com/DorianGrey/ng-webpack-template/tree/workbox-service-worker.

DorianGrey commented 7 years ago

Service worker has been merged as well: https://github.com/DorianGrey/ng-webpack-template/commit/957637b4fd17de49382e13d926fad882fa28f0fe

Thus - we're done for this step.