ngx-rocket / generator-ngx-rocket Goto Github PK
View Code? Open in Web Editor NEW:rocket: Extensible Angular 14+ enterprise-grade project generator
Home Page: https://ngx-rocket.github.io/
License: MIT License
:rocket: Extensible Angular 14+ enterprise-grade project generator
Home Page: https://ngx-rocket.github.io/
License: MIT License
With the release of VS2017 comes a new update for .Net Core. This update will bring a better experience for the dotnet new
command to scaffold new projects, including support for custom templates.
Do you think that would be useful to have a template for the starter-kit?
Hi,
I wanted to look a bit at the generator... and maybe help... But I can't find how to start with it.
How is your environment?
How do you test the generator itself?
In the README.md of this repo, we can learn how to use the generator. But not how to develop/contribut.
Could you write somehting about it please?
Thank you
Should we force typing in all/some cases?
What could be improved over default rules? What would benefit from being enforced?
...and tag the "old" generator-ngx-app
as moved
under npm.
Add authentication templates and make authentication/guard working with Ionic
Related to #5
Use angular-cli as a start for the tooling,
Then port the web template using:
Add the Ionic/mobile specific app configuration (onReady...) and base templates (no authentication, will be done in another task)
Related to #5
Because we have awesome upcoming features for this project (like #33) and to allow us to associate the forthcoming family of tools (cli, addon generators, etc...) with a unique, distinct name we created a new home: 🚀 ngX-Rocket
As part of this effort, we also renamed the generator name and NPM package to generator-ngx-rocket
. Why? The ngx
prefix alone, along with the starter kit were too generic to distinguish ourself and what we are doing from the crowded space of Angular project starters, so we went for a new naming to give our effort a distinct identity.
We aim to be more open than ever, build a community around the project and hope to gather development effort around customized starter kits in reusable addons generators instead.
Once angular-cli
reach 1.0, one of its upcoming features is addon support.
With this we should be able to add HTML minification by adding html-minify-loader to the webpack build process.
In a separate branch, port SK mobile template to Angular 2, using Ionic v2 instead of Bootstrap v4/Font Awesome.
Warning: the build system should still be using angular-cli, not the ionic-cli. The project template/structure should be compatible with the web template (as it should be interchangeable later).
Here are the list of tasks I have in mind, feel free to suggest changes:
cordova-plugin-globalization
angular-cli
), prepare
, build
, run
... with Android + iOS supportcordova-plugin-splashscreen
, cordova-plugin-device
, cordova-plugin-whitelist
etcIn light of #23, Add doc to explain HTML5 routing and explain potential server issues with some hints on how to resolve it (url rewriting).
If possible, also provide typical common server configs (express...)
Since most of the apps we'll create will use an authentication method method with eventually a login/logout screen, it could be interesting to provide the ground for this in this SK.
I imagine it would take the form of an additional auth
component, with a dedicated overridable service with a mock implementation to start with, ability to save credentials for returning users and an auth guard redirecting to the login screen if the user is not authenticated.
Seems pretty "standard" to me, but do not hesitate to complete or discuss this approach if needed.
Hi,
I'm carefully watching this repo because good practices are there & sharded ;)
I would like to give my thought about the embedded libraries... (hope I can :p)
I feel that a pro starter kit should have:
For example, you are using Font Awesome just to add few icons in menu / header... maybe we should be able to set these icons from outside of these components. And provide a guide on how to embed Font Awesome.
You are also selecting Bootstrap, I feel that it's a too "strong" choice :). So it can be an example... but not part of the starter kit.
I would like to see more something like: angular/flex-layout
//let's speak// :)
translations:extract
cannot extract translated strings from variables
(#10).
From the discussion there, the solution would be to fork the repo and make the correction ourselves, then propose a PR.
Once #6 is done, a welcome suggestion (thanks @R0muald) was to provide a way to compose the base SK generator with any other "addon" generators.
One way could be to investigate yeoman's composability features or maybe create a custom CLI to simply wraps the generators setup/install/running.
The basic idea is to gather in a simple way for the user the ability to mix the SK with addon generator, something like:
$ ngx new myAwesomeProject --addons="myCompanyUiLibrary someBackendGenerator"
or even maybe
# performs `npm install` + register addons with ngx cli
$ ngx addon install myCompanyUiLibrary someBackendGenerator
# registered addons will be used by default
$ ngx new myAwesomeProject
Yeoman also support generating a project from multiple generators, so we should also consider this.
This should come after the yeoman generator is done, but we could provide opt-in IDE/code editors configuration, like:
As far a the target IDE supports it, we could add code-style/formatting settings as well as tool/run configuration pre-bound to the npm tasks.
What do you think?
To simplify update process for existing generated project, if a previous config is found it should be used to replay automatically the generator and allow updating from a newer generator version.
A warning should also be issued to warn the user of uncommited changes, to prevent issues.
Seems that the new 2.5.46
version of @types/jasmine
is broken due to this commit DefinitelyTyped/DefinitelyTyped@ba29010.
In the meantime for the fix, the version will be fixed to the previous working one.
As the issue on the website was lost, I'll recap here the remaining task for the website:
Tasks:
Old issue description:
For the design, use these for inspiration: http://fountainjs.io, https://github.com/CloudCannon/cause-jekyll-template, https://github.com/CloudCannon/hydra-jekyll-template
The idea would be to have a nice 1-page website with scroll hooks and links to github/npm etc.
Keep the same doc format as for SK v1
There is currently this warning on build, due to a change in the angular-cli
webpack config:
WARNING in ./~/encoding/lib/iconv-loader.js
9:12-34 Critical dependency: the request of a dependency is an expression
This is due to the @biesbjerg/ng2-translate-po-loader
package, and we have no means of correction as for now.
The only way would be to move from .po
translations files to plan .json
files, and would probably be related to #3
Fix inclusion of whole package.json
file in bundle, create script/plugin to extract it on build time
j'a l'erreur suivante quand je lance la commande npm install
:
ERROR in ./src/app/core/i18n.service.ts Module build failed: Error: C:/Users/Thales/Documents/GitHub/ngx-starter-kit/src /app/core/i18n.service.ts (3,10): Module '"C:/Users/Thales/Documents/GitHub/ngx- starter-kit/node_modules/@types/lodash/index"' has no exported member 'includes' .) at _checkDiagnostics (C:\Users\Thales\Documents\GitHub\ngx-starter-kit\node_ modules\@ngtools\webpack\src\loader.js:145:15) at C:\Users\Thales\Documents\GitHub\ngx-starter-kit\node_modules\@ngtools\we bpack\src\loader.js:172:17 @ ./src/app/app.component.ts 22:0-50 @ ./src/app/app.module.ts @ ./src/main.ts @ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts
j'ai l'impression que la dernière version de lodash fout le bordel. Quand je force la version en virant le "^" sur @types/lodash dans le package.json (ligne 43) ça marche.
Seems like ngx-app is using the old <template>
tag which was deprecated recently in favour of ng-template
Reproducing:
npm install -g yo generator-ngx-app && yo ngx-app
localhost:4200
[App] init
from the logger.service.ts
Should we add a window
service wrapper into Angular DI system (to allow mocking in unit tests)?
I tried a quick implementation using a custom provider with injecting directly the window
value into the core module, but it did not work, need to investigate...
So: This is a raw angular2.4 plunkr I found laying about: https://plnkr.co/edit/TTsy3IsY8t0hmo8Z0LaA?p=preview
The same cannot be done using this application (I failed to create a plunkr with the generator-ngx-app);
let search: URLSearchParams = new URLSearchParams();
Object.keys(data).forEach((key: string) => {
search.set(key, data[key]);
});
console.log(search)
let options: RequestOptions = new RequestOptions({search});
this.http.get(<string>_endpoint, options)
This will make the HTTP call but ignore all the URLSearchParams that are inside options
The base project seed should include:
I think the current documentation currently lacks explaining the value proposition of the starter-kit compared to going straight with the anguar-cli. In the README, we currently have:
Web project starter kit including modern tools and workflow based on angular-cli, best practices from the community, a scalable base template and a good learning base.
Benefits
- Quickstart a project in seconds and focus on features, not on frameworks or tools
- Industrial-grade tools, ready for usage in a continuous integration environment and DevOps
- Scalable architecture with base app template including example components, services and tests
I think it would be a nice addition to clearly explain the advantages of bootstraping a new projet from the starter-kit instead of the angular-cli. Back to the Angular 1.x world, because there was no cli so everyone was looking for a starter-kit to speed up their development. Now that the angular-cli is out, I think we should explain why using a starter-kit still makes a lot of sense.
Ideas?
After the project renaming, we are looking for a new and nice logo to illustrate the ngX-Rocket ecosystem!
Here is a (bad) draft I thought up quickly:
Another shot based on some of @gaetanmaisse ideas:
A few more tries, adding a ionic-like electron and with material blue or angular red + black like @gaetanmaisse:
I you have better ideas and design skills, feel free to propose 🎨 !
Once angular-cli
reach 1.0, one of its upcoming features is addon support.
With this we should be able to support images assets optimization by adding imagemin loader to the webpack build process.
An alternative solution based on imagemin-cli can also be investigated.
https://github.com/ocombe/ng2-translate can be used in the meantime, while a complete solution based on .po files is available.
If already working, https://angular.io/docs/ts/latest/cookbook/i18n.html should be used instead (with .po or json files).
Dummy issue to host assets for GH presentation 😄
yarn is an alternative to NPM, with (almost) only benefits:
yarn test:ci
instead of npm run test:ci
with no silly noiseIt would be nice to add a generator option to use yarn
instead of npm
, while keeping npm
as the default as it needs to extra package to install.
Tasks:
@ngx-rocket/core
to add --packageManager
option@ngx-rocket/core
core docsNGX_PACKAGE_MANAGER
env variablegenerator-ngx-rocket
to use specified package manager
package.json
scripts and other templates if applicableupdating
, proxy
and cordova
guides in consequence@ngx-rocket/scripts
to use specified package manager, either through the .yo-rc
file or NGX_PACKAGE_MANAGER
env var.yo-rc
file or NGX_PACKAGE_MANAGER
env vargenerator-ngx-rocket-addon
The latest angular-cli update introduced some breaking changes, causing regressions for the extended lint system. We have to take care of that, in the meanwhile I created and issue: angular/angular-cli#4344
Use the "official" tools as explained here: https://angular.io/docs/ts/latest/cookbook/i18n.html
Note that it was planned at some point that .po format should be supported, which does not seems to be the case at the moment.
Provide support for server configuration depending of the environment, default headers and user-configurable cache policy.
Should go in core
module.
As of stylelint/stylelint#2123, the no-unsupported-browser-features
rule of stylelint
is deprecated and will be removed in the upcoming 8.x
version. This triggers a deprecation warning during the lint
command as for now.
As per their recommendation, if no one took the job in the meantime, we should extract the current code for this rule into a separate stylelint plugin to fill the hole and remove the warning.
Looking into the app structure, I'm wondering how the app will scale on large apps. Mostly around the organization and creation of new components.
As I like to see apps in general, some components are state-full (home page, about page for example) and some other are state-less (a nav bar component).
Looking at the way the app is made, all pages components are at the /app
root folder, where the header component is in the /app/shared
folder.
would that make more sense if we could have a better separation between components? like:
|- app/ app components
| |- container/ container components
| | |- home/
| | |- home/
| |- shared/ shared module (common components, directives and pipes)
| | |- header/
| | |- nav/
| |- app.component.* app root component (shell)
| |- app.module.ts app root module definition
| |- app-routing.module.ts app routes
In that case, let say I want to add some redux state manager in my app, I will be able to add a redux
folder aside with container
and shared
(maybe core
as well, not sure I get why it's separated from the shared
folder..). This way, I get a clear view of area of code I'm dealing with without having to find my /shared
or /redux
folder with the rest of the app...
It's definitively more an open discussion than anything else but I wanted to get a bit of your input and understand if you had some issue when scaling the app regarding to the app structure.
trying to use generated HttpService but getting error
Uncaught (in promise): Error: No provider for ConnectionBackend!
Provides support for various cache policies (in-memory, local storage...) for the Http service.
Use hints from SK1 and adapt it to angular 2.
Hi,
as far as I can see AOT support is not included by default? Any chance to see it in next release?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.