Skip to content

Commit 62f57b3

Browse files
committed
ci(repo): move the repo under @RisingStack on npm
1 parent 266ea65 commit 62f57b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+4115
-14558
lines changed

.all-contributorsrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
}
2626
],
2727
"contributorsPerLine": 7,
28-
"projectName": "react-easy-state",
28+
"projectName": "@risingstack/react-easy-state",
2929
"projectOwner": "RisingStack",
3030
"repoType": "github",
3131
"repoHost": "https://github.com",

README.md

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Simple React state management. Made with :heart: and ES6 Proxies.
44

5-
[![Build](https://img.shields.io/circleci/project/github/RisingStack/react-easy-state/master.svg)](https://circleci.com/gh/RisingStack/react-easy-state/tree/master) [![dependencies Status](https://david-dm.org/RisingStack/react-easy-state/status.svg)](https://david-dm.org/RisingStack/react-easy-state) [![Coverage Status](https://coveralls.io/repos/github/RisingStack/react-easy-state/badge.svg?branch=master&service=github)](https://coveralls.io/github/RisingStack/react-easy-state?branch=master) [![Package size](https://img.shields.io/bundlephobia/minzip/react-easy-state.svg)](https://bundlephobia.com/result?p=react-easy-state) [![Version](https://img.shields.io/npm/v/react-easy-state.svg)](https://www.npmjs.com/package/react-easy-state) [![License](https://img.shields.io/npm/l/react-easy-state.svg)](https://www.npmjs.com/package/react-easy-state) <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)<!-- ALL-CONTRIBUTORS-BADGE:END -->
5+
[![Build](https://img.shields.io/circleci/project/github/RisingStack/react-easy-state/master.svg)](https://circleci.com/gh/RisingStack/react-easy-state/tree/master) [![dependencies Status](https://david-dm.org/RisingStack/react-easy-state/status.svg)](https://david-dm.org/RisingStack/react-easy-state) [![Coverage Status](https://coveralls.io/repos/github/RisingStack/react-easy-state/badge.svg?branch=master&service=github)](https://coveralls.io/github/RisingStack/react-easy-state?branch=master) [![Package size](https://img.shields.io/bundlephobia/minzip/@risingstack/react-easy-state.svg)](https://bundlephobia.com/result?p=@risingstack/react-easy-state) [![Version](https://img.shields.io/npm/v/@risingstack/react-easy-state.svg)](https://www.npmjs.com/package/@risingstack/react-easy-state) [![License](https://img.shields.io/npm/l/@risingstack/react-easy-state.svg)](https://www.npmjs.com/package/@risingstack/react-easy-state) <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)<!-- ALL-CONTRIBUTORS-BADGE:END -->
66

77
<a href="#platform-support"><img src="images/browser_support.png" alt="Browser support" width="450px" /></a>
88

@@ -42,7 +42,7 @@ React Easy State is a practical state management library with two functions and
4242

4343
```jsx
4444
import React from 'react';
45-
import { store, view } from 'react-easy-state';
45+
import { store, view } from '@risingstack/react-easy-state';
4646

4747
const counter = store({ num: 0 });
4848
const increment = () => counter.num++;
@@ -58,7 +58,7 @@ Check this [TodoMVC codesandbox](https://codesandbox.io/s/github/RisingStack/rea
5858

5959
## Installation
6060

61-
`npm install react-easy-state`
61+
`npm install @risingstack/react-easy-state`
6262

6363
<details>
6464
<summary><strong>Setting up a quick project</strong></summary>
@@ -69,7 +69,7 @@ Easy State supports <a href="https://github.com/facebookincubator/create-react-a
6969
```sh
7070
npx create-react-app my-app
7171
cd my-app
72-
npm install react-easy-state
72+
npm install @risingstack/react-easy-state
7373
npm start
7474
```
7575

@@ -84,7 +84,7 @@ _You need npm 5.2+ to use npx._
8484
`store` creates a state store from the passed object and returns it. A state store behaves just like the passed object. (To be precise, it is a transparent reactive proxy of the original object.)
8585

8686
```js
87-
import { store } from 'react-easy-state';
87+
import { store } from '@risingstack/react-easy-state';
8888

8989
const user = store({ name: 'Rick' });
9090
// stores behave like normal JS objects
@@ -96,7 +96,7 @@ user.name = 'Bob';
9696
<p></p>
9797

9898
```js
99-
import { store } from 'react-easy-state';
99+
import { store } from '@risingstack/react-easy-state';
100100

101101
// stores can include any valid JS structure
102102
// including nested data, arrays, Maps, Sets, getters, setters, inheritance, ...
@@ -127,7 +127,7 @@ user.friends.set('id', otherUser);
127127
<p></p>
128128

129129
```js
130-
import { store } from 'react-easy-state';
130+
import { store } from '@risingstack/react-easy-state';
131131

132132
const userStore = store({
133133
user: {},
@@ -149,7 +149,7 @@ export default userStore;
149149
_userStore.js_
150150

151151
```js
152-
import { store } from 'react-easy-state';
152+
import { store } from '@risingstack/react-easy-state';
153153

154154
const userStore = store({
155155
user: {},
@@ -164,7 +164,7 @@ export default userStore;
164164
_recipesStore.js_
165165

166166
```js
167-
import { store } from 'react-easy-state';
167+
import { store } from '@risingstack/react-easy-state';
168168
import userStore from './userStore';
169169

170170
const recipesStore = store({
@@ -212,7 +212,7 @@ The first example wouldn't trigger re-renders on the `person.name = 'Ann'` mutat
212212
<p></p>
213213

214214
```jsx
215-
import { store, view } from 'react-easy-state';
215+
import { store, view } from '@risingstack/react-easy-state';
216216

217217
const counter = store({
218218
num: 0,
@@ -239,7 +239,7 @@ Wrapping your components with `view` turns them into reactive views. A reactive
239239

240240
```jsx
241241
import React from 'react';
242-
import { view, store } from 'react-easy-state';
242+
import { view, store } from '@risingstack/react-easy-state';
243243

244244
// this is a global state store
245245
const user = store({ name: 'Bob' });
@@ -261,7 +261,7 @@ export default view(() => (
261261
<p></p>
262262

263263
```jsx
264-
import { view, store } from 'react-easy-state';
264+
import { view, store } from '@risingstack/react-easy-state';
265265

266266
const appStore = store({
267267
user: { name: 'Ann' },
@@ -291,7 +291,7 @@ const Profile = ({ user }) => <p>Name: {user.name}</p>;
291291

292292
```jsx
293293
import React from 'react';
294-
import { view, store } from 'react-easy-state';
294+
import { view, store } from '@risingstack/react-easy-state';
295295

296296
const user = store({ name: 'Bob' });
297297
const timeline = store({ posts: ['react-easy-state'] });
@@ -325,7 +325,7 @@ export default view(() => (
325325

326326
```jsx
327327
import React from 'react';
328-
import { view, store, batch } from 'react-easy-state';
328+
import { view, store, batch } from '@risingstack/react-easy-state';
329329

330330
const user = store({ name: 'Bob', age: 30 });
331331

@@ -347,7 +347,7 @@ If you mutate your stores multiple times synchronously from **exotic task source
347347

348348
```jsx
349349
import React from 'react';
350-
import { view, store, batch } from 'react-easy-state';
350+
import { view, store, batch } from '@risingstack/react-easy-state';
351351

352352
const user = store({ name: 'Bob', age: 30 });
353353

@@ -377,7 +377,7 @@ export default view(() => (
377377
<p></p>
378378

379379
```jsx
380-
import { view } from 'react-easy-state';
380+
import { view } from '@risingstack/react-easy-state';
381381
import { withRouter } from 'react-router-dom';
382382
import { withTheme } from 'styled-components';
383383

@@ -416,7 +416,7 @@ If you want React Developer Tools to recognize your reactive view components' na
416416

417417
```jsx
418418
import React from 'react';
419-
import { view, store } from 'react-easy-state';
419+
import { view, store } from '@risingstack/react-easy-state';
420420

421421
const user = store({
422422
name: 'Rick',
@@ -440,7 +440,7 @@ Third party helpers - like data grids - may consist of many internal components
440440

441441
```jsx
442442
import React from 'react';
443-
import { view, store } from 'react-easy-state';
443+
import { view, store } from '@risingstack/react-easy-state';
444444
import Table from 'rc-table';
445445
import cloneDeep from 'lodash/cloneDeep';
446446

@@ -468,7 +468,7 @@ A singleton global store is perfect for something like the current user, but som
468468

469469
```jsx
470470
import React from 'react'
471-
import { view, store } from 'react-easy-state'
471+
import { view, store } from '@risingstack/react-easy-state'
472472

473473
export default view(() => {
474474
const counter = store({ num: 0 })
@@ -485,7 +485,7 @@ export default view(() => {
485485

486486
```jsx
487487
import React from 'react';
488-
import { view, store } from 'react-easy-state';
488+
import { view, store } from '@risingstack/react-easy-state';
489489

490490
export default view(() => {
491491
const [name, setName] = useState('Ann');
@@ -510,7 +510,7 @@ export default view(() => {
510510
<p></p>
511511

512512
```jsx
513-
import { store, view } from 'react-easy-state';
513+
import { store, view } from '@risingstack/react-easy-state';
514514

515515
const localStore = () => ({ name: 'Bob' });
516516

@@ -528,7 +528,7 @@ This is useful for large local stores to avoid large object creation on every re
528528

529529
```jsx
530530
import React, { Component } from 'react';
531-
import { view, store } from 'react-easy-state';
531+
import { view, store } from '@risingstack/react-easy-state';
532532

533533
class Counter extends Component {
534534
counter = store({ num: 0 });
@@ -550,7 +550,7 @@ export default view(Counter);
550550

551551
```jsx
552552
import React, { Component } from 'react';
553-
import { view, store } from 'react-easy-state';
553+
import { view, store } from '@risingstack/react-easy-state';
554554

555555
class Profile extends Component {
556556
state = { name: 'Ann' };
@@ -581,7 +581,7 @@ export default view(Profile);
581581

582582
```jsx
583583
import React, { Component } from 'react';
584-
import { view, store } from 'react-easy-state';
584+
import { view, store } from '@risingstack/react-easy-state';
585585

586586
class Profile extends Component {
587587
// DON'T DO THIS
@@ -603,7 +603,7 @@ Class components wrapped with `view` have an extra static `deriveStoresFromProps
603603

604604
```jsx
605605
import React, { Component } from 'react';
606-
import { view, store } from 'react-easy-state';
606+
import { view, store } from '@risingstack/react-easy-state';
607607

608608
class NameCard extends Component {
609609
userStore = store({ name: 'Bob' });
@@ -633,7 +633,7 @@ Use `autoEffect` to react with automatic side effect to your store changes. Auto
633633
<p></p>
634634

635635
```jsx
636-
import { store, autoEffect } from 'react-easy-state';
636+
import { store, autoEffect } from '@risingstack/react-easy-state';
637637

638638
// DON'T DO THIS
639639
const store1 = store({ name: 'Store 1' })
@@ -653,7 +653,7 @@ const store2 = store({ get name () { return store1.name } })
653653
Global auto effects can be created with `autoEffect` and cleared up with `clearEffect`.
654654

655655
```jsx
656-
import { store, autoEffect, clearEffect } from 'react-easy-state';
656+
import { store, autoEffect, clearEffect } from '@risingstack/react-easy-state';
657657

658658
const app = store({ name: 'My App' })
659659
const effect = autoEffect(() => document.title = app.name)
@@ -672,7 +672,7 @@ Use local auto effects in function components instead of the `useEffect` hook wh
672672

673673
```jsx
674674
import React from 'react'
675-
import { store, view, autoEffect } from 'react-easy-state';
675+
import { store, view, autoEffect } from '@risingstack/react-easy-state';
676676

677677
export default view(() => {
678678
const app = store({ name: 'My App' })
@@ -689,7 +689,7 @@ Because of the design of React hooks you have to explicitly pass all none reacti
689689

690690
```jsx
691691
import React from 'react'
692-
import { store, view, autoEffect } from 'react-easy-state';
692+
import { store, view, autoEffect } from '@risingstack/react-easy-state';
693693

694694
export default view(({ greeting }) => {
695695
const app = store({ name: 'My App' })
@@ -707,7 +707,7 @@ Local effects in class components must be cleared when the component unmounts.
707707

708708
```jsx
709709
import React, { Component } from 'react'
710-
import { store, view, autoEffect } from 'react-easy-state';
710+
import { store, view, autoEffect } from '@risingstack/react-easy-state';
711711

712712
class App extends Component {
713713
app = store({ name: 'My App' })
@@ -768,12 +768,12 @@ _This library is based on non polyfillable ES6 Proxies. Because of this, it will
768768

769769
This library detects if you use ES6 or commonJS modules and serve the right format to you. The default bundles use ES6 features, which may not yet be supported by some minifier tools. If you experience issues during the build process, you can switch to one of the ES5 builds from below.
770770

771-
- `react-easy-state/dist/es.es6.js` exposes an ES6 build with ES6 modules.
772-
- `react-easy-state/dist/es.es5.js` exposes an ES5 build with ES6 modules.
773-
- `react-easy-state/dist/cjs.es6.js` exposes an ES6 build with commonJS modules.
774-
- `react-easy-state/dist/cjs.es5.js` exposes an ES5 build with commonJS modules.
771+
- `@risingstack/react-easy-state/dist/es.es6.js` exposes an ES6 build with ES6 modules.
772+
- `@risingstack/react-easy-state/dist/es.es5.js` exposes an ES5 build with ES6 modules.
773+
- `@risingstack/react-easy-state/dist/cjs.es6.js` exposes an ES6 build with commonJS modules.
774+
- `@risingstack/react-easy-state/dist/cjs.es5.js` exposes an ES5 build with commonJS modules.
775775

776-
If you use a bundler, set up an alias for `react-easy-state` to point to your desired build. You can learn how to do it with webpack [here](https://webpack.js.org/configuration/resolve/#resolve-alias) and with rollup [here](https://github.com/rollup/rollup-plugin-alias#usage).
776+
If you use a bundler, set up an alias for `@risingstack/react-easy-state` to point to your desired build. You can learn how to do it with webpack [here](https://webpack.js.org/configuration/resolve/#resolve-alias) and with rollup [here](https://github.com/rollup/rollup-plugin-alias#usage).
777777

778778
## Contributing
779779

File renamed without changes.

__tests__/autoEffect.no-hook.test.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import React, { Component } from 'react';
22
import { render, cleanup } from '@testing-library/react/pure';
3-
// eslint-disable-next-line import/no-unresolved
4-
import { view, store, autoEffect } from 'react-easy-state';
3+
import {
4+
view,
5+
store,
6+
autoEffect,
7+
// eslint-disable-next-line import/no-unresolved
8+
} from '@risingstack/react-easy-state';
59

610
describe('AutoEffect edge cases and errors', () => {
711
afterEach(cleanup);

__tests__/autoEffect.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
autoEffect,
77
clearEffect,
88
// eslint-disable-next-line import/no-unresolved
9-
} from 'react-easy-state';
9+
} from '@risingstack/react-easy-state';
1010

1111
describe('autoEffect', () => {
1212
afterEach(cleanup);

__tests__/batching.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
clearEffect,
88
batch,
99
// eslint-disable-next-line import/no-unresolved
10-
} from 'react-easy-state';
10+
} from '@risingstack/react-easy-state';
1111

1212
describe('batching', () => {
1313
afterEach(cleanup);

__tests__/edgeCases.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
act,
77
} from '@testing-library/react/pure';
88
// eslint-disable-next-line import/no-unresolved
9-
import { view, store, batch } from 'react-easy-state';
9+
import { view, store, batch } from '@risingstack/react-easy-state';
1010

1111
describe('edge cases', () => {
1212
afterEach(cleanup);

__tests__/router.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
act,
77
} from '@testing-library/react/pure';
88
// eslint-disable-next-line import/no-unresolved
9-
import { view, store } from 'react-easy-state';
9+
import { view, store } from '@risingstack/react-easy-state';
1010
import {
1111
BrowserRouter as Router,
1212
Route,

__tests__/staticProps.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import React, { Component } from 'react';
44
import { render, cleanup } from '@testing-library/react/pure';
55
// eslint-disable-next-line import/no-unresolved
6-
import { view } from 'react-easy-state';
6+
import { view } from '@risingstack/react-easy-state';
77
import PropTypes from 'prop-types';
88

99
describe('static props', () => {

__tests__/store.no-hook.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { Component } from 'react';
22
import { render, cleanup } from '@testing-library/react/pure';
33
// eslint-disable-next-line import/no-unresolved
4-
import { view, store } from 'react-easy-state';
4+
import { view, store } from '@risingstack/react-easy-state';
55

66
describe('Store edge cases and errors', () => {
77
afterEach(cleanup);

0 commit comments

Comments
 (0)