Skip to content

Commit

Permalink
fix: change package names to be user scoped
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianiy committed Sep 28, 2021
1 parent d95d90c commit c0c9d1d
Show file tree
Hide file tree
Showing 39 changed files with 504 additions and 443 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ We follow the [Conventional Commits](https://conventionalcommits.org/) guideline

## Canary Releases

This repo is setup to automatically release canary builds for every commit that is pushed to master. In order to access those builds, run `npm install ngredux-store@canary` (or whichever package you are looking to use)
This repo is setup to automatically release canary builds for every commit that is pushed to master. In order to access those builds, run `npm install @adrian.insua/ngredux-store@canary` (or whichever package you are looking to use)

## Stable Releases

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ Project forked from unmantained [angular-redux/platform](https://github.com/angu

## Packages

- [ngredux-store](packages/store) - Bindings between Redux and Angular
- [ngredux-form](packages/form) - Bindings between Angular Forms and your Redux state
- [ngredux-router](packages/router) - Bindings between Angular Router and your Redux state
- [@adrian.insua/ngredux-store](packages/store) - Bindings between Redux and Angular
- [@adrian.insua/ngredux-form](packages/form) - Bindings between Angular Forms and your Redux state
- [@adrian.insua/ngredux-router](packages/router) - Bindings between Angular Router and your Redux state
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

# Packages

- [ngredux-store](store/) - Bindings between Redux and Angular
- [ngredux-form](form/) - Bindings between Angular Forms and your Redux state
- [ngredux-router](router/) - Bindings between Angular Router and your Redux state
- [@adrian.insua/ngredux-store](store/) - Bindings between Redux and Angular
- [@adrian.insua/ngredux-form](form/) - Bindings between Angular Forms and your Redux state
- [@adrian.insua/ngredux-router](router/) - Bindings between Angular Router and your Redux state

# Examples

Expand Down
24 changes: 12 additions & 12 deletions docs/form/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![npm version](https://img.shields.io/npm/v/ngredux-form.svg)](https://www.npmjs.com/package/ngredux-form)
[![downloads per month](https://img.shields.io/npm/dm/ngredux-form.svg)](https://www.npmjs.com/package/ngredux-form)
[![npm version](https://img.shields.io/npm/v/@adrian.insua/ngredux-form.svg)](https://www.npmjs.com/package/@adrian.insua/ngredux-form)
[![downloads per month](https://img.shields.io/npm/dm/@adrian.insua/ngredux-form.svg)](https://www.npmjs.com/package/@adrian.insua/ngredux-form)

This library is a thin layer of connective tissue between Angular 2+ forms and
Redux. It provides unidirectional data binding between your Redux state and
Expand Down Expand Up @@ -49,12 +49,12 @@ the class that is responsible for connecting your forms to your Redux state.
There are two ways of doing this: either using an `Redux.Store<T>` object or
an `NgRedux<T>` object. There are no substantial differences between these
approaches, but if you are already using
[ngredux-store](https://github.com/angular-redux/platform/blob/master/packages/store) or you wish to integrate
[@adrian.insua/ngredux-store](https://github.com/angular-redux/platform/blob/master/packages/store) or you wish to integrate
it into your project, then you would do something like this:

```typescript
import { NgReduxModule } from 'ngredux-store';
import { NgReduxFormModule } from 'ngredux-form';
import { NgReduxModule } from '@adrian.insua/ngredux-store';
import { NgReduxFormModule } from '@adrian.insua/ngredux-form';

@NgModule({
imports: [BrowserModule, ReactiveFormsModule, FormsModule, NgReduxFormModule, NgReduxModule],
Expand All @@ -63,11 +63,11 @@ import { NgReduxFormModule } from 'ngredux-form';
export class ExampleModule {}
```

Or if you are using Redux without `ngredux-store`, then your bootstrap call would look
Or if you are using Redux without `@adrian.insua/ngredux-store`, then your bootstrap call would look
more like this (substitute your own store creation code):

```typescript
import { provideReduxForms } from 'ngredux-form';
import { provideReduxForms } from '@adrian.insua/ngredux-form';

const storeCreator = compose(applyMiddleware(logger))(createStore);
const store = create(reducers, <MyApplicationState>{});
Expand All @@ -81,7 +81,7 @@ export class ExampleModule {}
```

The essential bit of code in the above samples is the call to `provideReduxForms(...)`.
This configures `ngredux-form` and provides access to your Redux store or NgRedux
This configures `@adrian.insua/ngredux-form` and provides access to your Redux store or NgRedux
instance. The shape of the object that `provideReduxForms` expects is very
basic:

Expand Down Expand Up @@ -186,7 +186,7 @@ the `path` property on our first `<select>` element, it would look like this:
['form1', 'dependents', 0, 'type']
```

From there, `ngredux-form` is able to take that path and extract the value for
From there, `@adrian.insua/ngredux-form` is able to take that path and extract the value for
that element from the Redux state.

# Reactive Forms
Expand All @@ -212,14 +212,14 @@ the easy part and is unlikely to cause any problems for you. Slightly more diffi
is _updating your Redux state_ when the form values change. There are two approaches
that you can take in order to do this.

The first, and by far the simplest, is to use the reducer that comes with `ngredux-form`
The first, and by far the simplest, is to use the reducer that comes with `@adrian.insua/ngredux-form`
and uses the value supplied in `connect` and the form input names in order to update
your Redux state automatically. If you do not need to do any special processing on
your data when the user updates form inputs, then you should use this default reducer.
To use it, you need to combine it with your existing reducers like so:

```typescript
import { composeReducers, defaultFormReducer } from 'ngredux-form';
import { composeReducers, defaultFormReducer } from '@adrian.insua/ngredux-form';

const reducer = composeReducers(
defaultFormReducer(),
Expand Down Expand Up @@ -284,4 +284,4 @@ you have to use `composeReducers` distasteful, then this is another route availa
to you.

The unit tests in `*.test.ts` files also contain useful examples of how to build
forms using `ngredux-form`.
forms using `@adrian.insua/ngredux-form`.
16 changes: 8 additions & 8 deletions docs/router/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[![npm version](https://img.shields.io/npm/v/ngredux-router.svg)](https://www.npmjs.com/package/ngredux-router)
[![downloads per month](https://img.shields.io/npm/dm/ngredux-router.svg)](https://www.npmjs.com/package/ngredux-router)
[![npm version](https://img.shields.io/npm/v/@adrian.insua/ngredux-router.svg)](https://www.npmjs.com/package/@adrian.insua/ngredux-router)
[![downloads per month](https://img.shields.io/npm/dm/@adrian.insua/ngredux-router.svg)](https://www.npmjs.com/package/@adrian.insua/ngredux-router)

Bindings to connect @angular/router to ngredux-core
Bindings to connect @angular/router to @adrian.insua/ngredux-core

# Setup

1. Use npm to install the bindings:

```
npm install ngredux-router --save
npm install @adrian.insua/ngredux-router --save
```

2. Use the `routerReducer` when providing `Store`:

```ts
import { combineReducers } from 'redux';
import { routerReducer } from 'ngredux-router';
import { routerReducer } from '@adrian.insua/ngredux-router';

export default combineReducers<IAppState>({
// your reducers..
Expand All @@ -27,8 +27,8 @@ export default combineReducers<IAppState>({

```ts
import { NgModule } from '@angular/core';
import { NgReduxModule, NgRedux } from 'ngredux-core';
import { NgReduxRouterModule, NgReduxRouter } from 'ngredux-router';
import { NgReduxModule, NgRedux } from '@adrian.insua/ngredux-core';
import { NgReduxRouterModule, NgReduxRouter } from '@adrian.insua/ngredux-router';
import { RouterModule } from '@angular/router';
import { routes } from './routes';

Expand Down Expand Up @@ -68,4 +68,4 @@ getting the URL from there.

# Examples

- [Example-app: An example of using ngredux-router along with the other companion packages.](https://github.com/angular-redux/platform/tree/master/packages/example-app)
- [Example-app: An example of using @adrian.insua/ngredux-router along with the other companion packages.](https://github.com/angular-redux/platform/tree/master/packages/example-app)
28 changes: 14 additions & 14 deletions docs/store/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![npm version](https://img.shields.io/npm/v/ngredux-store.svg)](https://www.npmjs.com/package/ngredux-store)
[![downloads per month](https://img.shields.io/npm/dm/ngredux-store.svg)](https://www.npmjs.com/package/ngredux-store)
[![npm version](https://img.shields.io/npm/v/@adrian.insua/ngredux-store.svg)](https://www.npmjs.com/package/@adrian.insua/ngredux-store)
[![downloads per month](https://img.shields.io/npm/dm/@adrian.insua/ngredux-store.svg)](https://www.npmjs.com/package/@adrian.insua/ngredux-store)

# Getting Started

Expand All @@ -9,10 +9,10 @@

## Quickstart

`ngredux-store` has a peer dependency on redux, so we need to install it.
`@adrian.insua/ngredux-store` has a peer dependency on redux, so we need to install it.

```sh
npm install --save redux ngredux-store
npm install --save redux @adrian.insua/ngredux-store
```

```typescript
Expand All @@ -29,7 +29,7 @@ can configure your Redux store with reducers, initial state,
and optionally middlewares and enhancers as you would in Redux directly.

```typescript
import { NgReduxModule, NgRedux } from 'ngredux-store';
import { NgReduxModule, NgRedux } from '@adrian.insua/ngredux-store';
import { createLogger } from 'redux-logger';
import { rootReducer } from './reducers';

Expand All @@ -53,7 +53,7 @@ Or if you prefer to create the Redux store yourself you can do that and use the

```typescript
import { applyMiddleware, Store, combineReducers, compose, createStore } from 'redux';
import { NgReduxModule, NgRedux } from 'ngredux-store';
import { NgReduxModule, NgRedux } from '@adrian.insua/ngredux-store';
import { createLogger } from 'redux-logger';
import { rootReducer } from './reducers';

Expand All @@ -76,7 +76,7 @@ class AppModule {

> Note that we're also using a Redux middleware from the community here:
> [redux-logger](https://www.npmjs.com/package/redux-logger). This is just to show
> off that `ngredux-store` is indeed compatible with Redux middlewares as you
> off that `@adrian.insua/ngredux-store` is indeed compatible with Redux middlewares as you
> might expect.
>
> Note that to use it, you'll need to install it with `npm install --save redux-logger`
Expand All @@ -86,7 +86,7 @@ Now your Angular app has been reduxified! Use the `@select` decorator to
access your store state, and `.dispatch()` to dispatch actions:

```typescript
import { select } from 'ngredux-store';
import { select } from '@adrian.insua/ngredux-store';

@Component({
template: '<button (click)="onClick()">Clicked {{ count | async }} times</button>',
Expand All @@ -106,8 +106,8 @@ class App {

# Companion Packages

- [Reduxify your Routing with ngredux-router](https://github.com/angular-redux/platform/blob/master/packages/router)
- [Reduxify your Forms with ngredux-form](https://github.com/angular-redux/platform/blob/master/packages/form)
- [Reduxify your Routing with @adrian.insua/ngredux-router](https://github.com/angular-redux/platform/blob/master/packages/router)
- [Reduxify your Forms with @adrian.insua/ngredux-form](https://github.com/angular-redux/platform/blob/master/packages/form)

# Resources

Expand All @@ -117,7 +117,7 @@ class App {

# In-Depth Usage

`ngredux-store` uses an approach to redux based on RxJS Observables to `select` and transform
`@adrian.insua/ngredux-store` uses an approach to redux based on RxJS Observables to `select` and transform
data on its way out of the store and into your UI or side-effect handlers. Observables
are an efficient analogue to `reselect` for the RxJS-heavy Angular world.

Expand Down Expand Up @@ -150,7 +150,7 @@ parameter at all.
```typescript
import { Component } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { select } from 'ngredux-store';
import { select } from '@adrian.insua/ngredux-store';

@Component({
selector: 'counter-value-printed-many-times',
Expand Down Expand Up @@ -198,7 +198,7 @@ import { Component } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { Counter } from '../components/Counter';
import * as CounterActions from '../actions/CounterActions';
import { NgRedux } from 'ngredux-store';
import { NgRedux } from '@adrian.insua/ngredux-store';

interface IAppState {
counter: number;
Expand Down Expand Up @@ -251,5 +251,5 @@ class Foo {
- [Using Angular's Dependency Injector with Middlewares](store/articles/cookbooks#using-angular-2-services-in-your-middleware)
- [Managing Side-Effects with redux-observable Epics](store/articles/cookbooks#side-effect-management-using-epics)
- [Using the Redux DevTools Chrome Extension](store/articles/cookbooks#using-devtools)
- [ngredux-store and ImmutableJS](store/articles/cookbooks#using-immutablejs)
- [@adrian.insua/ngredux-store and ImmutableJS](store/articles/cookbooks#using-immutablejs)
- [Strongly Typed Reducers](store/articles/cookbooks#strongly-typed-reducers)
18 changes: 9 additions & 9 deletions docs/store/articles/cookbooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ and a simple `RandomNumberService` to show a side effect.

```typescript
import { Injectable } from '@angular/core';
import { NgRedux } from 'ngredux-store';
import { NgRedux } from '@adrian.insua/ngredux-store';
import * as Redux from 'redux';
import { RootState } from '../store';
import { RandomNumberService } from '../services/random-number';
Expand Down Expand Up @@ -68,7 +68,7 @@ them into our component:

```typescript
import { Component } from '@angular/core';
import { NgRedux, select } from 'ngredux-store';
import { NgRedux, select } from '@adrian.insua/ngredux-store';
import { CounterActions } from '../actions/counter-actions';
import { RandomNumberService } from '../services/random-number';

Expand Down Expand Up @@ -132,7 +132,7 @@ properly-bound function context.

```typescript
import { NgModule } from '@angular/core';
import { NgReduxModule, NgRedux } from 'ngredux-store';
import { NgReduxModule, NgRedux } from '@adrian.insua/ngredux-store';
import reduxLogger from 'redux-logger';
import { LogRemoteName } from './middleware/log-remote-name';

Expand All @@ -154,7 +154,7 @@ export class AppModule {

## Side-Effect Management Using Epics

`ngredux-store` also works well with the `Epic` feature of
`@adrian.insua/ngredux-store` also works well with the `Epic` feature of
[redux-observable](https://github.com/redux-observable). For
example, a common use case for a side-effect is making an API call; while
we can use asynchronous actions for this, epics provide a much cleaner
Expand All @@ -167,7 +167,7 @@ create some trivial actions:

```typescript
import { Injectable } from '@angular/core';
import { NgRedux } from 'ngredux-store';
import { NgRedux } from '@adrian.insua/ngredux-store';
import { IAppState } from '../reducers';

@Injectable()
Expand Down Expand Up @@ -241,7 +241,7 @@ This allows us to configure our Redux store with the new epic as follows:

```typescript
import { NgModule } from '@angular/core';
import { NgReduxModule, NgRedux } from 'ngredux-store';
import { NgReduxModule, NgRedux } from '@adrian.insua/ngredux-store';
import { createEpicMiddleware } from 'redux-observable';
import rootReducer from './reducers';
import { SessionEpics } from './epics';
Expand Down Expand Up @@ -269,7 +269,7 @@ side effects as a set of simple RxJS epics.

## Using DevTools

`ngredux-store` is fully compatible with the Chrome extension version of the Redux dev
`@adrian.insua/ngredux-store` is fully compatible with the Chrome extension version of the Redux dev
tools:

https://github.com/zalmoxisus/redux-devtools-extension
Expand All @@ -284,7 +284,7 @@ tools that handles this for you.
Here's how to hook the extension up to your app:

```typescript
import { NgReduxModule, NgRedux, DevToolsExtension } from 'ngredux-store';
import { NgReduxModule, NgRedux, DevToolsExtension } from '@adrian.insua/ngredux-store';

// Add the dev tools enhancer your ngRedux.configureStore called
// when you initialize your root component:
Expand Down Expand Up @@ -435,7 +435,7 @@ constructor() {
### Post 3.3.0:
In `ngredux-store` 3.3.0 we've allowed you to have your cake and eat it too: the
In `@adrian.insua/ngredux-store` 3.3.0 we've allowed you to have your cake and eat it too: the
`@select` decorator can now detect if the selected state is an ImmutableJS
construct and call `.get` or `.getIn` for you.
Expand Down
Loading

0 comments on commit c0c9d1d

Please sign in to comment.