kmathy / ngx-reduxor Goto Github PK
View Code? Open in Web Editor NEWThis project forked from netanelbasal/ngrx-generator
ngx-reduxor: save time by generating ngrx architecture with no effort!
License: MIT License
This project forked from netanelbasal/ngrx-generator
ngx-reduxor: save time by generating ngrx architecture with no effort!
License: MIT License
In Service layer, something like return this.http.post('https://api.com', { body: param })
:
https://api.com
to some const from environment.ts
such as URL_REST_API
.URL_REST_API
such as GET, CREATE, UPDATE, DELETE; then an example of addXXX
might look like this:addXXX(param: any): Observable<any> {
return this.http.post(`${environment.URL_REST_API}/ADD`, { body: param });
}
(param: any)
and use the actual target type XXX
?Thanks,
John
Suggestion
The service is included in the store
It is a great practice to always have the services into the core folder/module. For the future use of the other modules of components. And So all of the NgRx
boilerplate remains inside of their own folder.
app/
core/
services/
auth/
auth.service.ts
auth.service.spec.ts
store/
auth/
auth.<effects,reducers,actions>.ts
all-effects.ts
app.store.ts
store-reduxor.module.ts
What do you think about this?
I think it is good to automatically import the environment variable without using the relative path. I suggest configuring the ts-config.json
file to add a config something like this.
"compilerOptions": {
...
],
"lib": [
...
],
"baseUrl": "src",
"paths": {
"@app/*": ["app/*"],
"@env/*": ["environments/*"],
"@core/*": ["app/core/*"],
"@shared/*": ["app/shared/*"]
}
}
and then use the import as import { environment as env } from '@env/environment';
It will be nice to be able to specify the arguments in configuration file
This is a wonderful generator and I love it!
However, I, as a Java and Typescript developer who has no feelings on pure Javascript, really am not an expert on plopjs and plopjs doesn't support typescript at all and it won't. And there is no better straight tutorial on the web for now.
So is there any possibility to create a new generator like Yeoman which might support Typescript and easier to learn?
Thanks so much!
Used for Zenhub
It would be great, if you could build a release from the commit with merged RxJS 6 support.
Thanx
Stefan
We need to provide a basic configuration by updating the package.
Create a special file to put all the configuration in one place. The developer can set an option directly or via the generator
It would be great if this will have an auto generated @ngrx/entity
the new package of ngrx. :)
ngx-reduxor 2.0.2 / node 8.9.3 / npm 5.6.0
"Basic" generation of store object is broken
Nothing is genereted an several lines of errors are visible in terminal
Get a well formed store
? Name for the new store object? block
? What kind of store do you want to generate? Basic
[FAILED] add ENOENT: no such file or directory, open '/mnt/DATA/pro/adneom/projets/botchain/front/node_modules/ngx-reduxor/templates/basic/_actions.ts'
[FAILED] add {{ basePath }}/{{ folder name "reducers" }}/{{kebabCase name}}.reducer.ts Aborted due to previous action failure
...
[FAILED] update store-reduxor {{ basePath }}/store-reduxor.module.ts Aborted due to previous action failure
import { HttpClientModule } from '@angular/common/http';
missing upon generating store. :)
Debugger provided by using the metareducer
Use the @ngrx/store-devTool to provide a better experience to the developer
Link to the @ngrx/store-devTool
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.