Skip to content

Commit

Permalink
update exemple
Browse files Browse the repository at this point in the history
  • Loading branch information
billouboq committed Aug 11, 2018
1 parent af698a9 commit 25c9a49
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/gulp/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const postcss = require('gulp-postcss');
const gulp = require('gulp');
const slashCSS = require("../../index");

const inputFilePath = "../assets/normal.css";
const targetFilePath = "../assets/*.critical.css";
const inputFilePath = "./normal.css";
const targetFilePath = "./*.critical.css";
const outputFilePath = "./result.css";

// plugin we will use in postcss
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions examples/normal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const postcss = require("postcss");
const slashCSS = require("../../index");
const fs = require("fs");

const inputFilePath = "../assets/normal.css";
const targetFilePath = "../assets/*.critical.css";
const inputFilePath = "./normal.css";
const targetFilePath = "./*.critical.css";
const outputFilePath = "./result.normal.css";

// plugin we will use in postcss
Expand Down
21 changes: 21 additions & 0 deletions examples/normal/normal.critical.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
html,
body {
height: 100%;
width: 100%;
}

h1,
h2,
h3,
h4,
h5 {
padding: 10px;
}

.main-content {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
27 changes: 27 additions & 0 deletions examples/normal/normal.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
html,
body {
height: 100%;
width: 100%;
}

h1,
h2,
h3,
h4,
h5 {
padding: 10px;
}

.main-content {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
/* not in critical */
background-color: red;
}

.not-critical {
font-style: 12px;
}

0 comments on commit 25c9a49

Please sign in to comment.