Giter Club home page Giter Club logo

ngx-reduxor's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ngx-reduxor's Issues

Service API needs prettier structure

Improvement needed for Service Layer

In Service layer, something like return this.http.post('https://api.com', { body: param }):

  • first of all we might want to refer https://api.com to some const from environment.ts such as URL_REST_API.
  • for each service CRUD method, the template could possibly provide a default path after the 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 });
}
  • can we avoid the 'too general' parameter type (param: any) and use the actual target type XXX?
  • anyways, I feel the services still have room to improve. I will try to find a time to contribute on coding rather than talking.

Thanks,
John

Discussion about the structure

Issue Type

Suggestion

version + node environment

Actual behavior

The service is included in the store

Expected behavior

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.

example (repo, code,...)

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?

Feature Request `enviroment variables`

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';

Yeoman Generator request

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!

V1.1.0

  • Config file
  • more structured app
  • storeDev-Tool

Used for Zenhub

Config file

Issue Type

Feature request

Actual behavior

We need to provide a basic configuration by updating the package.

Expected behavior

Create a special file to put all the configuration in one place. The developer can set an option directly or via the generator

Options

  • BASE_PATH: (String) the path to put all the generated files
  • SEPARATE_FOLDERS: (Boolean)
    • true: a folder for actions, a folder for reducers,...
    • false: a folder containing all the files.

Basic generation of store object is broken

Issue Type

Bug

version + node environment

ngx-reduxor 2.0.2 / node 8.9.3 / npm 5.6.0

Actual behavior

"Basic" generation of store object is broken
Nothing is genereted an several lines of errors are visible in terminal

Expected behavior

Get a well formed store

example (repo, code,...)

? 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

@ngrx/store-devTool

Actual behavior

Debugger provided by using the metareducer

Expected behavior

Use the @ngrx/store-devTool to provide a better experience to the developer

example (repo, code,...)

Link to the @ngrx/store-devTool

  • provide the StoreDevtoolModule + options
  • Link to the documentation to use this new module

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.