Skip to content

Commit 4d8a094

Browse files
authored
Merge pull request #276 from alexgurrola/master
Fix Lint, Update Docs, & Iterate Version
2 parents e1e33d9 + 1e7ce03 commit 4d8a094

File tree

6 files changed

+139
-52
lines changed

6 files changed

+139
-52
lines changed

README.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
# Stratus - [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Sitetheory/stratus/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Sitetheory/stratus/?branch=master) [![Build Status](https://travis-ci.org/Sitetheory/stratus.svg?branch=master)](https://travis-ci.org/Sitetheory/stratus) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) [![Join the chat at https://gitter.im/Sitetheory/stratus](https://badges.gitter.im/Sitetheory/stratus.svg)](https://gitter.im/Sitetheory/stratus?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Greenkeeper badge](https://badges.greenkeeper.io/Sitetheory/stratus.svg)](https://greenkeeper.io/)
1+
# Stratus - Web Design Platform
2+
3+
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Sitetheory/stratus/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Sitetheory/stratus/?branch=master) [![Build Status](https://travis-ci.org/Sitetheory/stratus.svg?branch=master)](https://travis-ci.org/Sitetheory/stratus) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) [![Join the chat at https://gitter.im/Sitetheory/stratus](https://badges.gitter.im/Sitetheory/stratus.svg)](https://gitter.im/Sitetheory/stratus?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Greenkeeper badge](https://badges.greenkeeper.io/Sitetheory/stratus.svg)](https://greenkeeper.io/)
24

35
## Thesis
46

5-
The Designer always comes first in the Stratus Layer. [Read More...](docs/Thesis.md)
7+
This is a minimalistic framework that becomes progressively more complex on-demand. [Read More...](docs/Thesis.md)
68

79
## Goals
810

@@ -16,40 +18,35 @@ The Designer always comes first in the Stratus Layer. [Read More...](docs/Thesi
1618

1719
##### Dependent
1820

19-
* Underscore.js
21+
* Lodash
2022

2123
##### Recommended
2224

23-
* Require.js
25+
* AMD, CJS, System.js, or equivalent loader
2426

2527
##### Optional
2628

27-
* Angular.js
28-
* Backbone.js
29-
* React.js
29+
* Angular
30+
* AngularJS
31+
* React
3032

3133
## Usage
3234

3335
#### Deployment
3436

35-
Stratus is built to run within a Require.js Asynchronous Environment with Promises. For an independent implementation without Require.js, further functionality involving auto-loading dependencies will not be present, so these javascript dependencies and templates will need to be defined directly on the DOM.
36-
37-
```js
38-
// These examples will be expanded
39-
if (tbd) console.log('tbd');
40-
```
37+
Stratus is built to run within an AMD or equivalent environment with Async/Await or Promises. For an independent implementation without an asset loader, further functionality involving auto-loading dependencies will not be present, so any javascript dependencies and templates will need to be defined directly on the DOM.
4138

4239
#### Angular
4340

44-
[Read More...](docs/Angular.md)
41+
Angular is in heavy development. [Read More...](docs/Angular.md)
4542

46-
#### Backbone
43+
#### AngularJS
4744

48-
[Read More...](docs/Backbone.md)
45+
AngularJS is stable and takes additions with ease. [Read More...](docs/AngularJS.md)
4946

5047
#### React
5148

52-
We don't have any data bindings or Auto-Loading built for React, yet. [Read More...](docs/React.md)
49+
We don't have any data bindings or Auto-Loading built for React, yet. [Read More...](docs/React.md)
5350

5451
## Contributions
5552

docs/Angular.md

Lines changed: 68 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,88 @@
11
## Angular Usage
22

3-
##### Overview
3+
This is the TypeScript version of Angular, which utilizes the TypeScript version of Stratus.
44

5-
Core Types:
6-
7-
* Component
8-
* Directive
9-
* Filter
10-
* Service
5+
Note: This portion of the project is in heavy development and is subject to change.
116

127
##### Component
138

14-
More soon.
9+
A Component takes on a full HTML tag, as opposed to Directives which are accessible as a decorator inside another tag.
1510

16-
```js
17-
// These examples will be expanded
18-
if (tbd) console.log('tbd');
11+
```html
12+
<sa-component></sa-component>
1913
```
2014

2115
##### Directive
2216

23-
More soon.
17+
A Directive is only a decorator for an HTML tag, as opposed to Components which are the entire tag.
2418

25-
```js
26-
// These examples will be expanded
27-
if (tbd) console.log('tbd');
19+
```html
20+
<span saDirective></span>
2821
```
2922

30-
##### Filter
23+
##### XHRs
3124

32-
More soon.
25+
We currently handle XHRs with our Data Service, inside your respective Component or Directive.
3326

34-
```js
35-
// These examples will be expanded
36-
if (tbd) console.log('tbd');
37-
```
27+
```typescript
28+
import {FormBuilder, FormGroup} from '@angular/forms';
29+
import {BackendService} from '@stratus/angular/backend.service';
30+
import * as _ from 'lodash';
31+
32+
@Component({
33+
selector: 'sa-data-component',
34+
templateUrl: 'data.component.html',
35+
})
36+
export class DataComponent implements OnInit {
37+
38+
filteredOptions: any[];
39+
dialogForm: FormGroup;
40+
isLoading = false;
41+
lastSelectorQuery: string;
42+
43+
content: any;
44+
url: string;
3845

39-
##### Service
46+
constructor(
47+
private fb: FormBuilder,
48+
private backend: BackendService
49+
) {}
4050

41-
More soon.
51+
ngOnInit() {
52+
this.dialogForm = this.fb.group({
53+
selectorInput: this.content
54+
});
4255

43-
```js
44-
// These examples will be expanded
45-
if (tbd) console.log('tbd');
56+
this.dialogForm
57+
.get('selectorInput')
58+
.valueChanges
59+
.pipe(
60+
debounceTime(300),
61+
tap(() => this.isLoading = true),
62+
switchMap(value => {
63+
if (_.isString(value)) {
64+
this.lastSelectorQuery = `/Api/Content?q=${value}`;
65+
} else {
66+
this.content = value;
67+
this.url = null;
68+
}
69+
return this.backend.get(this.lastSelectorQuery)
70+
.pipe(
71+
finalize(() => this.isLoading = false),
72+
);
73+
}
74+
)
75+
)
76+
.subscribe(response => {
77+
if (!response.ok || response.status !== 200 || _.isEmpty(response.body)) {
78+
return this.filteredOptions = [];
79+
}
80+
const payload = _.get(response.body, 'payload') || response.body;
81+
if (_.isEmpty(payload) || !Array.isArray(payload)) {
82+
return this.filteredOptions = [];
83+
}
84+
return this.filteredOptions = payload;
85+
});
86+
}
87+
}
4688
```

docs/AngularJS.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
## Angular Usage
2+
3+
##### Overview
4+
5+
Core Types:
6+
7+
* Component
8+
* Directive
9+
* Filter
10+
* Service
11+
12+
##### Component
13+
14+
More soon.
15+
16+
```js
17+
// These examples will be expanded
18+
if (tbd) console.log('tbd');
19+
```
20+
21+
##### Directive
22+
23+
More soon.
24+
25+
```js
26+
// These examples will be expanded
27+
if (tbd) console.log('tbd');
28+
```
29+
30+
##### Filter
31+
32+
More soon.
33+
34+
```js
35+
// These examples will be expanded
36+
if (tbd) console.log('tbd');
37+
```
38+
39+
##### Service
40+
41+
More soon.
42+
43+
```js
44+
// These examples will be expanded
45+
if (tbd) console.log('tbd');
46+
```

docs/Thesis.md

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

33
##### Overview
44

5-
The Stratus Library is a designer-centric MVC framework.
5+
This is a minimalistic framework that becomes progressively more complex on-demand.
66

77
##### Implications
88

9-
* Anything that alters the DOM needs to be located in the HTML
9+
* We provide as many settings in the HTML as possible to ease app design.

package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "stratus.js",
3-
"version": "0.8.3",
3+
"version": "0.9.0",
44
"description": "This platform intends to bridge the gap between Web Design and Development in a fast, flexible environment.",
55
"main": "stratus.html",
66
"directories": {
77
"test": "test"
88
},
99
"scripts": {
10-
"test": "gulp dist && gulp compile && gulp compress && gulp lint",
10+
"test": "gulp dist && gulp compile && gulp compress && gulp lint && ng lint",
1111
"karma": "node_modules/karma/bin/karma start karma.conf.js --single-run",
1212
"mocha": "mocha --recursive --reporter mochawesome --reporter-options reportDir=reports"
1313
},
@@ -24,11 +24,13 @@
2424
"keywords": [
2525
"sitetheory",
2626
"stratus",
27-
"widgets",
2827
"angular",
29-
"backbone",
28+
"angularjs",
29+
"react",
3030
"underscore",
31-
"lodash"
31+
"lodash",
32+
"javascript",
33+
"typescript"
3234
],
3335
"engines": {
3436
"yarn": ">= 1.0.0"

tslint.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
"directive-selector": [
1313
true,
1414
"attribute",
15-
"s2",
15+
"sa",
1616
"camelCase"
1717
],
1818
"component-selector": [
1919
true,
2020
"element",
21-
"s2",
21+
"sa",
2222
"kebab-case"
2323
],
2424
"import-blacklist": [

0 commit comments

Comments
 (0)