Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Commit 368f2de

Browse files
authored
Merge pull request #145 from agile-ts/develop
New Release 🎉
2 parents a23a63f + 436a6ac commit 368f2de

Some content is hidden

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

41 files changed

+9728
-232
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ dist
44
package-lock.json
55
coverage
66
.tgz
7+
.changelog
78

89
# Differs on each engine
910
yalc.lock

CONTRIBUTING.md

Lines changed: 187 additions & 40 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ const MY_FIRST_STATE = App.createState("Hello Friend!");
5555
// And wolla, it's reactive. Everytime the State mutates the Component rerenders
5656
const myFirstState = useAgile(MY_FIRST_STATE); // Returns value of State ("Hello Friend!")
5757
```
58-
To learn out more, check out our [Quick Start Guides](https://agile-ts.org/docs/Installation.md).
58+
Want to learn more? Check out our [Quick Start Guides](https://agile-ts.org/docs/Installation.md).
5959

6060
### ⛳️ Sandbox
6161
Test AgileTs yourself in a [codesandbox](https://codesandbox.io/s/agilets-first-state-f12cz).
6262
It's only one click away. Just select your preferred Framework below.
6363

6464
- [React](https://codesandbox.io/s/agilets-first-state-f12cz)
6565
- [React-Native](https://snack.expo.io/@bennodev/agilets-first-state)
66-
- Vue (coming soon)
66+
- [Vue](https://codesandbox.io/s/agilets-first-state-i5xxs)
6767
- Angular (coming soon)
6868

6969
More examples can be found in the [Example Section](https://agile-ts.org/docs/examples).
@@ -76,22 +76,23 @@ More examples can be found in the [Example Section](https://agile-ts.org/docs/ex
7676
<img src="https://raw.githubusercontent.com/agile-ts/agile/master/static/why_should_i_use_agile.png" alt="Why should I use AgileTs?"/>
7777

7878
AgileTs is a global, simple, well-tested State Management Framework implemented in Typescript.
79-
It offers a reimagined API that focuses on **developer experience** and allows you to **quickly** and **easily** manage your States.
79+
It offers a reimagined API that focuses on **developer experience**
80+
and allows you to **easily** manage your States.
8081
Besides States, AgileTs offers some other powerful APIs that make your life easier.
8182
The philosophy behind AgileTs is simple:
8283

8384
### 🚅 Straightforward
8485
Write minimalistic, boilerplate-free code that captures your intent.
86+
```ts
87+
MY_STATE.set('jeff'); // Update State value
88+
MY_STATE.undo(); // Undo latest State value change
89+
MY_STATE.is({hello: "jeff"}); // Check if State has the value '{hello: "jeff"}'
90+
MY_STATE.watch((value) => {console.log(value);}); // Watch on State changes
91+
```
8592

86-
**Some straightforward syntax examples:**
93+
**Some more straightforward syntax examples:**
8794

88-
- Mutate and Check States with simple Functions
89-
```ts
90-
MY_STATE.undo(); // Undo latest change
91-
MY_STATE.is({hello: "jeff"}); // Check if State has the Value '{hello: "jeff"}'
92-
MY_STATE.watch((value) => {console.log(value);}); // Watch on State changes
93-
```
94-
- Store State in any Storage, like [Local Storage](https://www.w3schools.com/html/html5_webstorage.asp)
95+
- Store State in any Storage, like the [Local Storage](https://www.w3schools.com/html/html5_webstorage.asp)
9596
```ts
9697
MY_STATE.persist("storage-key");
9798
```
@@ -117,12 +118,12 @@ Write minimalistic, boilerplate-free code that captures your intent.
117118
### ⛳️ Centralize
118119

119120
AgileTs is designed to take all business logic out of UI-Components and put them in a central place, often called `core`.
120-
The benefit of keeping logic separate to UI-Components is to make your code more decoupled, portable, and above all, easily testable.
121+
The benefit of keeping logic separate to UI-Components is to make your code more decoupled, portable, scalable, and above all, easily testable.
121122

122123
### 🎯 Easy to Use
123124

124125
Learn the powerful tools of AgileTs in a short amount of time. An excellent place to start are
125-
our [Quick Start](https://agile-ts.org/docs/Installation) Guides, or if you don't like to follow any tutorials,
126+
our [Quick Start Guides](https://agile-ts.org/docs/Installation), or if you don't like to follow any tutorials,
126127
you can jump straight into our [Example](https://agile-ts.org/docs/examples/Introduction) Section.
127128

128129

@@ -132,14 +133,16 @@ you can jump straight into our [Example](https://agile-ts.org/docs/examples/Intr
132133
<br />
133134
<img src="https://raw.githubusercontent.com/agile-ts/agile/master/static/installation_header.png" alt="Installation"/>
134135

135-
To properly use AgileTs, in a UI-Framework, we need to install **two** packages.
136+
In order to properly use AgileTs, in a UI-Framework, we need to install **two** packages.
136137

137-
- The _Core Package_, which acts as the brain of AgileTs and manages all your States
138+
- The [`core`](https://agile-ts.org/docs/core) package, which contains the State Management Logic of AgileTs
139+
and therefore offers powerful classes such as the [`State Class`](https://agile-ts.org/docs/core/state).
138140
```
139141
npm install @agile-ts/core
140142
```
141143

142-
- and a _fitting Integration_ for your preferred UI-Framework. In my case, the [React Integration](https://www.npmjs.com/package/@agile-ts/react).
144+
- And on the other hand, a _fitting Integration_ for your preferred UI-Framework.
145+
In my case, the [React Integration](https://www.npmjs.com/package/@agile-ts/react).
143146
Check [here](https://agile-ts.org/docs/frameworks) if your desired Framework is supported, too.
144147
```
145148
npm install @agile-ts/react
@@ -155,7 +158,7 @@ To properly use AgileTs, in a UI-Framework, we need to install **two** packages.
155158
Sounds AgileTs interesting to you?
156159
Checkout our **[documentation](https://agile-ts.org/docs/introduction)**, to learn more.
157160
And I promise you. You will be able to use AgileTs in no time.
158-
In case you have any further questions, don't hesitate to join our [Community Discord](https://discord.gg/T9GzreAwPH).
161+
If you have any further questions, don't hesitate to join our [Community Discord](https://discord.gg/T9GzreAwPH).
159162

160163

161164
<br />
@@ -165,7 +168,7 @@ In case you have any further questions, don't hesitate to join our [Community Di
165168
<img src="https://raw.githubusercontent.com/agile-ts/agile/master/static/contribute_header.png" alt="Contribute"/>
166169

167170
Get a part of AgileTs and start contributing. We welcome any meaningful contribution. 😀
168-
To find out more, check out the [CONTRIBUTING.md](https://github.com/agile-ts/agile/blob/master/CONTRIBUTING.md).
171+
To find out more about contributing, check out the [CONTRIBUTING.md](https://github.com/agile-ts/agile/blob/master/CONTRIBUTING.md).
169172

170173
<a href="https://codeclimate.com/github/agile-ts/agile/coverage.svg">
171174
<img src="https://codeclimate.com/github/agile-ts/agile/badges/gpa.svg" alt="Maintainability"/>
@@ -182,6 +185,7 @@ To find out more, check out the [CONTRIBUTING.md](https://github.com/agile-ts/ag
182185
| ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
183186
| [@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) | State Manager |
184187
| [@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 |
188+
| [@agile-ts/vue](/packages/vue) | [![badge](https://img.shields.io/npm/v/@agile-ts/vue.svg?style=flat-square)](https://www.npmjs.com/package/@agile-ts/vue) | Vue Integration |
185189
| [@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 |
186190
| [@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 |
187191
| [@agile-ts/event](/packages/event) | [![badge](https://img.shields.io/npm/v/@agile-ts/event.svg?style=flat-square)](https://www.npmjs.com/package/@agile-ts/event) | Handy class for emitting UI Events |
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
6+
# local env files
7+
.env.local
8+
.env.*.local
9+
10+
# Log files
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
pnpm-debug.log*
15+
16+
# Editor directories and files
17+
.idea
18+
.vscode
19+
*.suo
20+
*.ntvs*
21+
*.njsproj
22+
*.sln
23+
*.sw?
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# my-project
2+
3+
## Project setup
4+
```
5+
yarn install
6+
```
7+
8+
### Compiles and hot-reloads for development
9+
```
10+
yarn serve
11+
```
12+
13+
### Compiles and minifies for production
14+
```
15+
yarn build
16+
```
17+
18+
### Lints and fixes files
19+
```
20+
yarn lint
21+
```
22+
23+
### Customize configuration
24+
See [Configuration Reference](https://cli.vuejs.org/config/).
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/cli-plugin-babel/preset'
4+
]
5+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "my-project",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"serve": "vue-cli-service serve",
7+
"build": "vue-cli-service build",
8+
"lint": "vue-cli-service lint",
9+
"install:agile": "yalc add @agile-ts/core @agile-ts/vue & yarn install"
10+
},
11+
"dependencies": {
12+
"@agile-ts/core": "file:.yalc/@agile-ts/core",
13+
"@agile-ts/vue": "file:.yalc/@agile-ts/vue",
14+
"core-js": "^3.6.5",
15+
"vue": "^2.6.11"
16+
},
17+
"devDependencies": {
18+
"@vue/cli-plugin-babel": "~4.5.0",
19+
"@vue/cli-plugin-eslint": "~4.5.0",
20+
"@vue/cli-service": "~4.5.0",
21+
"babel-eslint": "^10.1.0",
22+
"eslint": "^6.7.2",
23+
"eslint-plugin-vue": "^6.2.2",
24+
"vue-template-compiler": "^2.6.11"
25+
},
26+
"eslintConfig": {
27+
"root": true,
28+
"env": {
29+
"node": true
30+
},
31+
"extends": [
32+
"plugin:vue/essential",
33+
"eslint:recommended"
34+
],
35+
"parserOptions": {
36+
"parser": "babel-eslint"
37+
},
38+
"rules": {}
39+
},
40+
"browserslist": [
41+
"> 1%",
42+
"last 2 versions",
43+
"not dead"
44+
]
45+
}
4.19 KB
Binary file not shown.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8+
<title><%= htmlWebpackPlugin.options.title %></title>
9+
</head>
10+
<body>
11+
<noscript>
12+
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13+
</noscript>
14+
<div id="app"></div>
15+
<!-- built files will be auto injected -->
16+
</body>
17+
</html>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<template>
2+
<div id="app">
3+
<img alt="Vue logo" src="./assets/logo.png" />
4+
<p>myState: {{ sharedState.myState }}</p>
5+
<button v-on:click="changeMyState">Change State</button>
6+
<HelloWorld msg="Welcome to Your Vue.js App with AgileTs!" />
7+
</div>
8+
</template>
9+
10+
<script>
11+
import HelloWorld from './components/HelloWorld.vue';
12+
import { MY_STATE } from '@/core';
13+
import { generateId } from '@agile-ts/core';
14+
15+
export default {
16+
name: 'App',
17+
components: {
18+
HelloWorld,
19+
},
20+
data: function () {
21+
return {
22+
...this.bindAgileInstances({
23+
myState: MY_STATE,
24+
}),
25+
};
26+
},
27+
methods: {
28+
changeMyState: function () {
29+
MY_STATE.set(generateId());
30+
},
31+
},
32+
};
33+
</script>
34+
35+
<style>
36+
#app {
37+
font-family: Avenir, Helvetica, Arial, sans-serif;
38+
-webkit-font-smoothing: antialiased;
39+
-moz-osx-font-smoothing: grayscale;
40+
text-align: center;
41+
color: #2c3e50;
42+
margin-top: 60px;
43+
}
44+
</style>

0 commit comments

Comments
 (0)