Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
2a47100
fixed some typos
bennobuilder Dec 30, 2020
1a465db
added simple example
bennobuilder Dec 30, 2020
13162ae
updated example
bennobuilder Dec 30, 2020
94eeb29
fixed typos
bennobuilder Dec 30, 2020
ee42d73
fixed codesandbox link
bennobuilder Dec 30, 2020
b43b9b6
add image banner
bennobuilder Dec 30, 2020
a72e5d0
added space
bennobuilder Dec 30, 2020
8285ed8
x
bennobuilder Dec 30, 2020
dbd699c
removed space
bennobuilder Dec 30, 2020
36b2b85
x
bennobuilder Dec 30, 2020
2fce587
fixed typo
bennobuilder Dec 30, 2020
7c6526d
Update ReadMe.md
bennobuilder Dec 30, 2020
4f55b37
x
bennobuilder Dec 30, 2020
af4b895
changed structure
bennobuilder Dec 31, 2020
a5338d0
fixed typo
bennobuilder Dec 31, 2020
8013b4e
fixed some typos
bennobuilder Dec 31, 2020
ab7e0eb
fixed some typos
bennobuilder Dec 31, 2020
c466bf7
Merge remote-tracking branch 'origin/master' into create-proper-readme
bennobuilder Dec 31, 2020
ffc0f4d
added readme to each package
bennobuilder Dec 31, 2020
37add30
added basic readme titles
bennobuilder Dec 31, 2020
6357cd2
update react integration readme
bennobuilder Dec 31, 2020
d546f6f
updated main readme
bennobuilder Dec 31, 2020
764351f
optimized some readmes
bennobuilder Jan 1, 2021
e2dcfc9
Merge remote-tracking branch 'origin/develop' into create-proper-readme
bennobuilder Jan 1, 2021
4840e0d
x
bennobuilder Jan 2, 2021
033776c
optimized readmes
bennobuilder Jan 2, 2021
91d2fad
updated header in core readme
bennobuilder Jan 2, 2021
1304eb3
switched to non svg in headerbackground because of weird font
bennobuilder Jan 2, 2021
0aa7586
optimized example of multimedia readme
bennobuilder Jan 2, 2021
2048127
optimized readme's
bennobuilder Jan 2, 2021
9da92b9
optimized readmes
bennobuilder Jan 2, 2021
66f14b2
updated tags
bennobuilder Jan 2, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added HeaderBackground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
121 changes: 121 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
<img src="./HeaderBackground.png" alt="Banner">

> **Spacy**, **Simple**, **Scalable** State Management Framework

<br />

<a href="https://github.com/agile-ts/agile">
<img src="https://img.shields.io/github/license/agile-ts/agile.svg" alt="GitHub License"></a>
<a href="https://npm.im/@agile-ts/core">
<img src="https://img.shields.io/npm/dm/@agile-ts/core.svg" alt="npm monthly downloads"></a>
<a href="https://npm.im/@agile-ts/core">
<img src="https://img.shields.io/npm/dt/@agile-ts/core.svg" alt="npm total downloads"></a>
<a href="https://npm.im/@agile-ts/core">
<img src="https://img.shields.io/bundlephobia/min/@agile-ts/core.svg" alt="npm minified size"></a>
<a href="https://github.com/agile-ts/agile">
<img src="https://img.shields.io/github/languages/code-size/agile-ts/agile.svg" alt="GitHub Code Size"></a>
<a href="https://github.com/agile-ts/agile">
<img src="https://img.shields.io/github/repo-size/agile-ts/agile.svg" alt="GitHub Repo Size"></a>


## 🚀 Look how easy it is
Below example is based on React
```tsx
// At first we have to create an Instance of Agile
const App = new Agile();

// Now we can create a State which has an initial Value of "Hello Stranger!"
const MY_FIRST_STATE = App.State("Hello Stranger!");

// Our cool React Component
const RandomComponent = () => {
// With the Hook 'useAgile' we bind the State to our 'RandomComponent'
const myFirstState = useAgile(MY_FIRST_STATE); // Returns "Hello Stranger!"
// ^
return ( // |
<div> // | Through the 'set' action the State Value
<p>{myFirstState}</p> // | gets changed to "Hello Friend!"
<button // | and causes a rerender on this Component.
onClick={() => { // | -> myFirstState has the Value "Hello Friend!"
// Lets's update the State Value // |
MY_FIRST_STATE.set("Hello Friend!") // -------------
}}
>
Update State
</button>
</div>
);
}
```
_You can't believe the simplicity?! Convince yourself [here](https://codesandbox.io/s/agilets-first-state-f12cz)._


## ❓ Why AgileTs

#### 🚅 Straightforward
Write minimalistic, boilerplate free code that captures your intent. <br />
**For instance**
- Store State in Local Storage
```ts
MY_STATE.persist("storage-key")
```
- Reactive Collection of States
```ts
const MY_COLLECTION = App.Collection();
MY_COLLECTION.collect({id: 1, name: "Frank"});
MY_COLLECTION.collect({id: 2, name: "Dieter"});
```
- Cool State checks and mutations
```ts
MY_STATE.undo(); // Undo last change
MY_STATE.is({hello: "jeff"}); // Check if State has the Value {hello: "jeff"}
```

#### 🤸‍ Flexible
Agile can be used in nearly every UI-Framework
and surly works with the workflow that suits you best,
since Agile isn't bound to _dispatches_, _reducers_, ..

#### 🎯 Easy to Use
Learn the powerful and simple tools of Agile in a short amount of time.

#### ⛳️ Centralize
Manage your Application Logic outside of any UI-Framework in a central place.
This makes your code more decoupled, portable, and above all, easily testable.

#### 🍃 Lightweight
Agile has an unpacked size of [52.7kB](https://bundlephobia.com/result?p=@agile-ts/core@0.0.6)
and [0 dependencies](https://www.npmjs.com/package/@agile-ts/core).


## ⬇️ Installation
```
npm install @agile-ts/core
```
To use Agile we have to install the _core_ package, it's the brain and handles your States, Collections, ..
<br />
```
npm install @agile-ts/react
```
In addition, we need to install a _fitting integration_ for the Framework we are using.. in my case [React](https://www.npmjs.com/package/@agile-ts/react).


## 📄 Documentation
The Agile Docs are located [here](https://agile-ts.org/docs/)


## 🗂 Packages of Agile
| Name | Latest Version | Description |
| ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
| [@agile-ts/core](/packages/core) | [![badge](https://img.shields.io/npm/v/@agile-ts/core.svg?style=flat-square)](https://www.npmjs.com/package/@agile-ts/core) | Brain of Agile |
| [@agile-ts/react](/packages/react) | [![badge](https://img.shields.io/npm/v/@agile-ts/react.svg?style=flat-square)](https://www.npmjs.com/package/@agile-ts/react) | React Integration |
| [@agile-ts/api](/packages/api) | [![badge](https://img.shields.io/npm/v/@agile-ts/api.svg?style=flat-square)](https://www.npmjs.com/package/@agile-ts/api) | Promise based Api |
| [@agile-ts/multieditor](/packages/multieditor) | [![badge](https://img.shields.io/npm/v/@agile-ts/multieditor.svg?style=flat-square)](https://www.npmjs.com/package/@agile-ts/multieditor) | Simple Form Manager |


## 👨‍💻 Contribute
Feel free to contribute


## 🌠 Credits
AgileTs is inspired by [PulseJs](https://github.com/pulse-framework/pulse)
40 changes: 0 additions & 40 deletions ReadMe.md

This file was deleted.

15 changes: 12 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
{
"private": true,
"description": "Global state and logic framework for reactive Javascript & Typescript applications.",
"author": "BennoDev",
"license": "ISC",
"license": "MIT",
"homepage": "https://agile-ts.org/",
"description": "Spacy, Simple, Scalable State Management Framework",
"keywords": [
"agile",
"agile-ts",
"react-component",
"react",
"reactjs",
"reactive",
"simple"
],
"syncDir": "dist",
"scripts": {
"build": "lerna run build",
Expand All @@ -13,7 +22,7 @@
"dev-push": "lerna run build && lerna run dev-push",
"package-install": "lerna exec npm install",
"version-bump": "changeset",
"release": "lerna run build && changeset publish"
"release": "lerna run prepublish && changeset publish"
},
"repository": {
"type": "git",
Expand Down
File renamed without changes.
71 changes: 71 additions & 0 deletions packages/api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# [WIP] API

> Promise based HTTP request API for Node.js

<a href="https://npm.im/@agile-ts/api">
<img src="https://img.shields.io/npm/v/@agile-ts/api.svg" alt="npm version"></a>
<a href="https://github.com/agile-ts/agile">
<img src="https://img.shields.io/github/license/agile-ts/agile.svg" alt="GitHub License"></a>
<a href="https://npm.im/@agile-ts/api">
<img src="https://img.shields.io/npm/dm/@agile-ts/api.svg" alt="npm monthly downloads"></a>
<a href="https://npm.im/@agile-ts/api">
<img src="https://img.shields.io/npm/dt/@agile-ts/api.svg" alt="npm total downloads"></a>
<a href="https://npm.im/@agile-ts/api">
<img src="https://img.shields.io/bundlephobia/min/@agile-ts/api.svg" alt="npm minified size"></a>

## ⏰ Short Example
```ts
// Let't create our API
const api = new API({
baseURL: 'https://myapp.com', // Base Route to the Host
timeout: 10000, // After which amount of time a request times out
options: { credentials: 'include' } // Http/s Request Options from type RequestInit
});

// Now we can create our first Request to 'https://myapp.com/hello'
const response = await api.get('/hello');
console.log(response);
/*
{
data: {hello: "Jeff"}; // Response Data
timedout: false; // If Request has timedout
status: 200; // Response Status Code
raw: Response; // Raw Response from type Response
type: "application/json"; // Response Type
}
*/
```

## ❓ Why Agile Api

#### 🚅 Straightforward
Write minimalistic, boilerplate free code that captures your intent. <br />
**For instance**
- Automatic transform for JSON data
- Configurable Timeout

#### 🎯 Easy to Use
Learn the powerful and simple tools of Agile Api in a short amount of time.

#### 🍃 Lightweight
Agile Api has an unpacked size of [2kB](https://bundlephobia.com/result?p=@agile-ts/api@0.0.6)
and [0 external dependencies](https://www.npmjs.com/package/@agile-ts/api).

## ⬇️ Installation
```
npm install @agile-ts/api
```
_Be aware that this is no standalone package!_ <br />
To use the Agile Api you have to install the [Agile Core](https://www.npmjs.com/package/@agile-ts/core). <br />
To find out more take a look into the [docs](https://www.agile-ts.org/docs).


## 🔑 Fitting Versions
| @agile-ts/api | @agile-ts/core | NPM Version |
| --------------- | ----------------------- | ------------------------ |
| v0.0.7 | v0.0.1+ | v6+ |
| v0.0.6 | v0.0.1+ | v6+ |
_Other Versions aren't supported anymore_

## 📄 Documentation
The Agile Api Docs are located [here](https://agile-ts.org/docs/)
21 changes: 15 additions & 6 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,30 @@
"name": "@agile-ts/api",
"version": "0.0.6",
"author": "BennoDev",
"license": "ISC",
"license": "MIT",
"homepage": "https://agile-ts.org/",
"description": "API extension for AgileTs",
"keywords": [],
"description": "Promise based HTTP request API for Node.js",
"keywords": [
"agile",
"agile-ts",
"api",
"promise-api",
"http-request"
],
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc",
"dev-publish": "yalc publish",
"dev-push": "yalc push",
"watch": "tsc-watch --onSuccess \"npm run dev-push\""
"watch": "tsc-watch --onSuccess \"npm run dev-push\"",
"prepublish": "yarn run build"
},
"devDependencies": {
"@agile-ts/core": "file:../core"
},
"peerDependencies": {
"@agile-ts/core": "^0.0.6"
"@agile-ts/core": "^0.0.5"
},
"publishConfig": {
"access": "public"
Expand All @@ -28,6 +35,8 @@
"url": "https://github.com/agile-ts/agile.git"
},
"files": [
"dist/**/*"
"dist",
"LICENSE",
"README.md"
]
}
20 changes: 15 additions & 5 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,25 @@
"name": "@agile-ts/core",
"version": "0.0.6",
"author": "BennoDev",
"license": "ISC",
"license": "MIT",
"homepage": "https://agile-ts.org/",
"description": "Global state and logic framework for reactive JavaScript & TypeScript applications.",
"keywords": [],
"description": "Spacy, Simple, Scalable State Management Framework",
"keywords": [
"agile",
"agile-ts",
"state-management",
"state",
"typescript",
"reactive"
],
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc",
"dev-publish": "yalc publish",
"dev-push": "yalc push",
"watch": "tsc-watch --onSuccess \"npm run dev-push\""
"watch": "tsc-watch --onSuccess \"npm run dev-push\"",
"prepublish": "node ./scripts/prepublish.js && yarn run build"
},
"publishConfig": {
"access": "public"
Expand All @@ -22,6 +30,8 @@
"url": "https://github.com/agile-ts/agile.git"
},
"files": [
"dist/**/*"
"dist",
"LICENSE",
"README.md"
]
}
10 changes: 10 additions & 0 deletions packages/core/scripts/prepublish.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const fs = require("fs-extra");
const path = require("path");
const execa = require("execa");

const run = () => {
fs.copySync("../../README.md", "./README.md");
fs.copySync("../../LICENSE", "./LICENSE");
};

run();
File renamed without changes.
Loading