Skip to content

Commit 45a988b

Browse files
committed
progress on mix package
1 parent 3821e59 commit 45a988b

File tree

130 files changed

+15555
-343131
lines changed

Some content is hidden

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

130 files changed

+15555
-343131
lines changed

.tmp/laravel-mix

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 4b712195ccd76cdc9099b94f95759a1f083e4523

.yarnrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
install.ignore-engines true
2+
workspaces-experimental true

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,10 @@ PyroCMS is an easy to use, powerful, and modular CMS and development platform bu
77
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
88

99

10-
## Install
10+
## Install
11+
12+
```
13+
composer install
14+
npm install
15+
16+
``

config/streams/addons.php

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Addon Customization
8+
|--------------------------------------------------------------------------
9+
|
10+
| Here you can customize and
11+
| extend the addon loader.
12+
|
13+
*/
14+
15+
/**
16+
* An array of disabled
17+
* addons by handle.
18+
*/
19+
'disabled' => [
20+
//'anomaly.module.users',
21+
],
22+
];

config/streams/images.php

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Image Path Hints
8+
|--------------------------------------------------------------------------
9+
|
10+
| Usage: Images::make('unsplash::random');
11+
|
12+
*/
13+
'paths' => [
14+
'unsplash' => 'https://source.unsplash.com/',
15+
],
16+
17+
/*
18+
|--------------------------------------------------------------------------
19+
| Automatically Interlace JPGs
20+
|--------------------------------------------------------------------------
21+
|
22+
| You can set this on the image too:
23+
|
24+
| Images::make('img/foo.jpg')->interlace(false);
25+
|
26+
*/
27+
'interlace' => env('IMAGES_INTERLACE', true),
28+
29+
/*
30+
|--------------------------------------------------------------------------
31+
| Automatic Alt Tags
32+
|--------------------------------------------------------------------------
33+
|
34+
| Enabling this feature automatically
35+
| generages alt tags when not specified.
36+
|
37+
*/
38+
'auto_alt' => env('IMAGES_AUTO_ALT', true),
39+
];

config/streams/sources.php

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Source Configuration
8+
|--------------------------------------------------------------------------
9+
|
10+
| Configure Stream sources.
11+
|
12+
*/
13+
14+
'default' => env('STREAMS_SOURCE', 'filebase'),
15+
16+
'types' => [
17+
18+
'filebase' => [
19+
20+
'format' => env('STREAMS_SOURCE_FORMAT', 'md'),
21+
//'path' => env('STREAMS_SOURCE_PATH', 'streams/data'),
22+
23+
'formats' => [
24+
'json' => \Streams\Core\Criteria\Format\Json::class,
25+
'yaml' => \Streams\Core\Criteria\Format\Yaml::class,
26+
'md' => \Streams\Core\Criteria\Format\Markdown::class,
27+
'template' => \Streams\Core\Criteria\Format\Template::class,
28+
],
29+
],
30+
],
31+
];

config/streams/system.php

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| System Configuration
8+
|--------------------------------------------------------------------------
9+
|
10+
| Configure core behavior.
11+
|
12+
*/
13+
14+
/**
15+
* Force the application
16+
* to run over HTTPS.
17+
*/
18+
'force_ssl' => false,
19+
20+
];

docs/core/addons.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: Addons
3+
category: advanced
4+
intro: This is the addons intro.
5+
stage: outlining
6+
enabled: true
7+
---
8+
9+
- Introduction
10+
- [Available Addons](/addons)
11+
- Developing Addons

docs/core/applications.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: Applications
3+
category: core_concepts
4+
intro:
5+
sort:
6+
---
7+
8+
- Introduction
9+
- Defining Apps
10+
- App Switching

docs/core/assets.md

+166
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
---
2+
title: Assets
3+
category: frontend
4+
status: drafting
5+
enabled: true
6+
sort: 2
7+
intro:
8+
---
9+
10+
## Introduction
11+
12+
The Streams platform comes with a fluid and highly extensible asset management tool for organizing, registering, customizing, and including your frontend assets.
13+
14+
### Asset Collections
15+
16+
Assets are organized into **collections** which can be accessed and output later. You can access or create an asset collection using the `Assets` facade or alias.
17+
18+
```php
19+
use Streams\Core\Support\Facades\Assets;
20+
21+
$collection = Assets::collection('footer');
22+
```
23+
24+
```blade
25+
@verbatim{!! Assets::collection('footer') !!} // Outputs asset tags"@endverbatim
26+
```
27+
28+
## Adding Assets
29+
30+
Use the `add()` method to add an asset to a **collection**.
31+
32+
```php
33+
Assets::collection('footer')->add('resources/js/start.js');
34+
```
35+
36+
```blade
37+
@verbatim{!! Assets::collection('footer')->add('resources/js/start.js') !!}@endverbatim
38+
```
39+
40+
### Asset Sources
41+
42+
The first and only argument should be the source of the asset. The following asset sources are supported out of the box.
43+
44+
#### Paths in the Filesystem
45+
46+
Any non-executable asset path relative to the application's **8*public root** may be used.
47+
48+
```blade
49+
@verbatim{!! Assets::collection('footer')->add('js/example.js') !!} // /public/js/example.js@endverbatim
50+
```
51+
52+
<!-- #### Configured Storage Disks
53+
54+
You may use any configured storage location as an asset source.
55+
56+
```blade
57+
@verbatim{!! Assets::collection('footer')->add('s3::js/example.js') !!}@endverbatim
58+
``` -->
59+
60+
#### Remote URLs
61+
62+
The URL of a remote asset may also be used. The `allow_url_fopen` PHP directive must be enabled to output `inline` or `content` methods for remote files.
63+
64+
```blade
65+
@verbatim{!! Assets::collection('footer')->add('https://cdn.com/js/example.js') !!}@endverbatim
66+
```
67+
68+
#### Hinted Assets
69+
70+
Hinted assets are prefixed with a `namespace::` that is replaced with a [registered path](#registering-paths).
71+
72+
```blade
73+
// /public/vendor/anomaly/streams/ui/js/example.js@endverbatim
74+
@verbatim{!! Assets::collection('footer')->add('ui::js/example.js') !!}
75+
76+
// https://cdn.domain.com/js/example.js@endverbatim
77+
@verbatim{!! Assets::collection('footer')->add('cdn::js/example.js') !!}
78+
```
79+
80+
81+
### Named Assets
82+
@todo finish "Named Assets"
83+
84+
## Outputting Assets
85+
86+
Use output methods to include assets from a **collection**.
87+
88+
### Generating URLs
89+
90+
Use the `url()` method to return a single asset URL.
91+
92+
```blade
93+
@verbatim{!! Assets::url('ui::js/example.js') !!}@endverbatim
94+
```
95+
96+
You can also use the `urls()` method on a **collection** to return all URLs.
97+
98+
```blade
99+
@verbatim{!! Assets::collection('urls')->urls() !!}@endverbatim
100+
```
101+
102+
### Including Assets
103+
104+
Use the `tag()` method to return a single asset URL. An **attributes** array can be passed as a second parameter.
105+
106+
```blade
107+
@verbatim{!! Assets::tag('ui::js/example.js', [
108+
'async' => true
109+
]) !!}@endverbatim
110+
```
111+
112+
You can also use the `tags()` method on a **collection** to return all tags.
113+
114+
```blade
115+
@verbatim{!! Assets::collection('footer')->tags() !!}@endverbatim
116+
```
117+
118+
## Registering Paths
119+
120+
Use the `addPath()` method to register a **namespace** and **path**. The path parameter can be any path in the filesystem relative to the application's public root or a remote URL prefix.
121+
122+
```php
123+
use Streams\Core\Support\Facades\Assets;
124+
125+
Assets::addPath('ui', 'vendor/anomaly/streams/ui');
126+
Assets::addPath('cdn', 'https://cdn.domain.com');
127+
```
128+
129+
You can now use the above path hints to resolve assets.
130+
131+
```blade
132+
@verbatim{!! Assets::collection('footer')->add('ui::js/example.js') !!} // /public/vendor/anomaly/streams/ui/js/example.js@endverbatim
133+
@verbatim{!! Assets::collection('footer')->add('cdn::js/example.js') !!} // https://cdn.domain.com/js/example.js@endverbatim
134+
135+
@verbatim{!! Assets::url('ui::js/example.js') !!}@endverbatim
136+
@verbatim{!! Assets::url('cdn::js/example.js') !!}@endverbatim
137+
```
138+
139+
## Named Assets
140+
141+
Use the `register()` method to **name** one or more **assets**. The assets parameter can be any valid source or array of sources.
142+
143+
```php
144+
use Streams\Core\Support\Facades\Assets;
145+
146+
Assets::register('ui/tables', [
147+
'ui::js/tables.js',
148+
'ui::css/tables.css',
149+
]);
150+
```
151+
152+
You can now use the collection's `load()` method to load the assets by **name**.
153+
154+
```blade
155+
@verbatim{!! Assets::collection('footer')->load('ui/tables') !!}@endverbatim
156+
```
157+
158+
```php
159+
Assets::collection('footer')->load('ui/tables');
160+
```
161+
162+
You can also render the output of the named single assets.
163+
164+
```php
165+
Assets::tags('ui/tables');
166+
```

docs/core/authentication.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: Authentication
3+
category: security
4+
intro:
5+
references:
6+
- https://laravel.com/docs/7.x/authentication
7+
---
8+
9+
- **Intro:** Introduce the idea in one sentence.
10+
- **Explanation:** An elevator pitch that signals the reader to continue or not (keep looking for relevant page).
11+
- **Sections/Features:** Separate sections/sub-sections (h2s/h3s) consistently. This will build the ToC.
12+
- **Next Steps:** Next actions to take that are intentional versus simply additional reading.
13+
- **Code Examples:** Code examples and snippets.
14+
- **Insights:** Tips, post scriptum, creative links.
15+
- **Additional Reading:** Link to related ideas/topics/guides/recipes.

docs/core/authorization.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: Authorization
3+
category: security
4+
intro:
5+
references:
6+
- https://laravel.com/docs/7.x/authentication
7+
---
8+
9+
- **Intro:** Introduce the idea in one sentence.
10+
- **Explanation:** An elevator pitch that signals the reader to continue or not (keep looking for relevant page).
11+
- **Sections/Features:** Separate sections/sub-sections (h2s/h3s) consistently. This will build the ToC.
12+
- Policies
13+
- **Next Steps:** Next actions to take that are intentional versus simply additional reading.
14+
- **Code Examples:** Code examples and snippets.
15+
- **Insights:** Tips, post scriptum, creative links.
16+
- **Additional Reading:** Link to related ideas/topics/guides/recipes.

docs/core/changelog.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
test: Foo
3+
title: 'Change Log'
4+
intro: 'All notable changes to this project will be documented in this file.'
5+
sort: '10'
6+
category: null
7+
stage: null
8+
---
9+
- `Added` for new features.
10+
- `Changed` for changes in existing functionality.
11+
- `Deprecated` for soon-to-be removed features.
12+
- `Removed` for now removed features.
13+
- `Fixed` for any bug fixes.
14+
- `Security` in case of vulnerabilities.
15+
16+
### Versioning
17+
18+
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
19+
20+
### Deprecated Features
21+
22+
Deprecated features will generally be removed in the next `minor` update unless noted otherwise.
23+
24+
## Releases
25+
26+
### Unreleased
27+
#### Changed
28+
- Updated `anomaly/streams-platform` to `~2.0.0`.

0 commit comments

Comments
 (0)