Skip to content

Commit b52650f

Browse files
author
Kristoffer Alfheim
committed
Merge pull request #4 from kalfheim/rename
Changed names and namespaces
2 parents 581bd61 + 66620b7 commit b52650f

24 files changed

+61
-57
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# critical-css [![Build Status](https://travis-ci.org/krisawzm/critical-css.svg)](https://travis-ci.org/krisawzm/critical-css)
1+
# critical-css [![Build Status](https://travis-ci.org/kalfheim/critical-css.svg)](https://travis-ci.org/kalfheim/critical-css)
22

33
A Laravel package for generating and using inline critical-path CSS.
44

@@ -56,7 +56,7 @@ Add the following to the `providers` key in `config/app.php`:
5656

5757
``` php
5858
'providers' => [
59-
Krisawzm\CriticalCss\CriticalCssServiceProvider::class,
59+
Alfheim\CriticalCss\CriticalCssServiceProvider::class,
6060
];
6161
```
6262

@@ -66,8 +66,8 @@ To get access to the `criticalcss:clear` and `criticalcss:make` commands, add th
6666

6767
``` php
6868
protected $commands = [
69-
\Krisawzm\CriticalCss\Console\CriticalCssMake::class,
70-
\Krisawzm\CriticalCss\Console\CriticalCssClear::class,
69+
\Alfheim\CriticalCss\Console\CriticalCssMake::class,
70+
\Alfheim\CriticalCss\Console\CriticalCssClear::class,
7171
];
7272
```
7373

@@ -77,7 +77,7 @@ Generate a template for the `config/criticalcss.php` file by running:
7777

7878
$ php artisan vendor:publish
7979

80-
> **Note:** Descriptions for the config options are only present in the config file, **not** in this readme. Click [here](https://github.com/krisawzm/critical-css/blob/master/src/config/criticalcss.php) to open the config file on GitHub.
80+
> **Note:** Descriptions for the config options are only present in the config file, **not** in this readme. Click [here](https://github.com/kalfheim/critical-css/blob/master/src/config/criticalcss.php) to open the config file on GitHub.
8181
8282
## Usage
8383

@@ -91,7 +91,7 @@ Providing everything is set up and configured properly, all you need to do in or
9191

9292
This will generate a unique file for each of the URIs (routes) provided.
9393

94-
See [this commit](https://github.com/krisawzm/critical-css-demo/commit/8288ba8971fc7381ef933affdde3b3d71c5475e3) for a diff of the implementation.
94+
See [this commit](https://github.com/kalfheim/critical-css-demo/commit/8288ba8971fc7381ef933affdde3b3d71c5475e3) for a diff of the implementation.
9595

9696
### Using critical-path CSS with Blade templates
9797

@@ -133,9 +133,9 @@ For multiple views, you may wrap `@criticalCss` in a `@section`, then `@yield` t
133133

134134
I made a simple demo using [this](http://startbootstrap.com/template-overviews/clean-blog/) Bootstrap theme. It's a fairly simple theme, and it does not have any major performance issues, but yet, implementing inline critical-path CSS **did** improve performance.
135135

136-
Demo repo: https://github.com/krisawzm/critical-css-demo
136+
Demo repo: https://github.com/kalfheim/critical-css-demo
137137

138-
See [this commit](https://github.com/krisawzm/critical-css-demo/commit/8288ba8971fc7381ef933affdde3b3d71c5475e3) for a diff of the implementation.
138+
See [this commit](https://github.com/kalfheim/critical-css-demo/commit/8288ba8971fc7381ef933affdde3b3d71c5475e3) for a diff of the implementation.
139139

140140
### [PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) results
141141

@@ -152,7 +152,7 @@ This will require adding the following to the `aliases` key in **config/app.php*
152152

153153
``` php
154154
'aliases' => [
155-
'Critical' => Krisawzm\CriticalCss\Facades\Critical::class,
155+
'Critical' => Alfheim\CriticalCss\Facades\Critical::class,
156156
];
157157
```
158158

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"autoload": {
2626
"psr-4": {
27-
"Krisawzm\\CriticalCss\\": "src/"
27+
"Alfheim\\CriticalCss\\": "./src/"
2828
}
2929
},
3030
"autoload-dev": {

src/BladeUtils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Krisawzm\CriticalCss;
3+
namespace Alfheim\CriticalCss;
44

55
use Illuminate\View\Compilers\BladeCompiler;
66

src/Console/CriticalCssClear.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Krisawzm\CriticalCss\Console;
3+
namespace Alfheim\CriticalCss\Console;
44

55
class CriticalCssClear extends CriticalCssCommand
66
{

src/Console/CriticalCssCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
22

3-
namespace Krisawzm\CriticalCss\Console;
3+
namespace Alfheim\CriticalCss\Console;
44

55
use Illuminate\Console\Command;
66

77
abstract class CriticalCssCommand extends Command
88
{
9-
/** @var \Krisawzm\CriticalCss\Storage\StorageInterface */
9+
/** @var \Alfheim\CriticalCss\Storage\StorageInterface */
1010
protected $storage;
1111

1212
/**

src/Console/CriticalCssMake.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Krisawzm\CriticalCss\Console;
3+
namespace Alfheim\CriticalCss\Console;
44

55
use Artisan;
66
use InvalidArgumentException;

src/CriticalCssServiceProvider.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22

3-
namespace Krisawzm\CriticalCss;
3+
namespace Alfheim\CriticalCss;
44

55
use Illuminate\Support\ServiceProvider;
6-
use Krisawzm\CriticalCss\Storage\LaravelStorage;
7-
use Krisawzm\CriticalCss\HtmlFetchers\LaravelHtmlFetcher;
8-
use Krisawzm\CriticalCss\CssGenerators\CriticalGenerator;
6+
use Alfheim\CriticalCss\Storage\LaravelStorage;
7+
use Alfheim\CriticalCss\HtmlFetchers\LaravelHtmlFetcher;
8+
use Alfheim\CriticalCss\CssGenerators\CriticalGenerator;
99

1010
class CriticalCssServiceProvider extends ServiceProvider
1111
{

src/CssGenerators/CriticalGenerator.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace Krisawzm\CriticalCss\CssGenerators;
3+
namespace Alfheim\CriticalCss\CssGenerators;
44

55
use Symfony\Component\Process\ProcessBuilder;
6-
use Krisawzm\CriticalCss\Storage\StorageInterface;
7-
use Krisawzm\CriticalCss\HtmlFetchers\HtmlFetcherInterface;
6+
use Alfheim\CriticalCss\Storage\StorageInterface;
7+
use Alfheim\CriticalCss\HtmlFetchers\HtmlFetcherInterface;
88

99
/**
1010
* Generates critical-path CSS using the Critical npm package.
@@ -16,10 +16,10 @@ class CriticalGenerator implements CssGeneratorInterface
1616
/** @var array */
1717
protected $css;
1818

19-
/** @var \Krisawzm\CriticalCss\HtmlFetchers\HtmlFetcherInterface */
19+
/** @var \Alfheim\CriticalCss\HtmlFetchers\HtmlFetcherInterface */
2020
protected $htmlFetcher;
2121

22-
/** @var \Krisawzm\CriticalCss\Storage\StorageInterface */
22+
/** @var \Alfheim\CriticalCss\Storage\StorageInterface */
2323
protected $storage;
2424

2525
/** @var string */
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<?php
22

3-
namespace Krisawzm\CriticalCss\CssGenerators;
3+
namespace Alfheim\CriticalCss\CssGenerators;
44

55
use RuntimeException;
66

77
class CssGeneratorException extends RuntimeException
88
{
9+
//
910
}

src/CssGenerators/CssGeneratorInterface.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace Krisawzm\CriticalCss\CssGenerators;
3+
namespace Alfheim\CriticalCss\CssGenerators;
44

5-
use Krisawzm\CriticalCss\Storage\StorageInterface;
6-
use Krisawzm\CriticalCss\HtmlFetchers\HtmlFetcherInterface;
5+
use Alfheim\CriticalCss\Storage\StorageInterface;
6+
use Alfheim\CriticalCss\HtmlFetchers\HtmlFetcherInterface;
77

88
/**
99
* The purpose of this interface is to generate and store critical-path CSS.
@@ -15,10 +15,10 @@ interface CssGeneratorInterface
1515
*
1616
* @param array $css Files to extract CSS from.
1717
*
18-
* @param \Krisawzm\CriticalCss\HtmlFetchers\HtmlFetcherInterface $htmlFetcher
18+
* @param \Alfheim\CriticalCss\HtmlFetchers\HtmlFetcherInterface $htmlFetcher
1919
* Provides the HTML source to be operated against.
2020
*
21-
* @param \Krisawzm\CriticalCss\Storage\StorageInterface $storage
21+
* @param \Alfheim\CriticalCss\Storage\StorageInterface $storage
2222
* Provides a storage driver to write the output to.
2323
*
2424
* @return void
@@ -34,7 +34,7 @@ public function __construct(array $css,
3434
*
3535
* @return bool Indicating successful write to the StorageInterface.
3636
*
37-
* @throws \Krisawzm\CriticalCss\CssGenerators\CssGeneratorException
37+
* @throws \Alfheim\CriticalCss\CssGenerators\CssGeneratorException
3838
*/
3939
public function generate($uri);
4040
}

0 commit comments

Comments
 (0)