Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
Kevin
/
CSS Optimizations Workshop
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ffa9740a
authored
Dec 08, 2014
by
Kevin Van Ransbeeck
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Extra task to showcase (very basic) critical CSS extraction in grunt
1 parent
706dc74f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
3 deletions
Gruntfile.js
index.html
package.json
Gruntfile.js
View file @
ffa9740
...
...
@@ -175,6 +175,7 @@ module.exports = function(grunt) {
// Load necessairy grunt tasks based on npm modules.
require
(
"load-grunt-tasks"
)(
grunt
);
grunt
.
registerTask
(
'build'
,
[
'uglify'
,
'svgstore'
,
'sass'
,
'concat_css'
,
'autoprefixer'
,
'php2html'
,
'cssmin'
]);
grunt
.
registerTask
(
'critical'
,
[
'uglify'
,
'svgstore'
,
'sass'
,
'concat_css'
,
'autoprefixer'
,
'php2html'
,
'penthouse'
,
'inline'
,
'cssmin'
]);
grunt
.
registerTask
(
'build'
,
[
'uglify'
,
'svgstore'
,
'sass'
,
'concat_css'
,
'autoprefixer'
,
'cssmin'
]);
grunt
.
registerTask
(
'default'
,
[
'build'
,
'watch'
]);
}
index.html
View file @
ffa9740
This diff is collapsed.
Click to expand it.
package.json
View file @
ffa9740
...
...
@@ -9,8 +9,6 @@
"grunt-contrib-cssmin"
:
"^0.10.0"
,
"grunt-contrib-uglify"
:
"^0.6.0"
,
"grunt-contrib-watch"
:
"~0.5.3"
,
"grunt-critical"
:
"0.0.4"
,
"grunt-criticalcss"
:
"^0.4.1"
,
"grunt-inline"
:
"^0.3.2"
,
"grunt-penthouse"
:
"^0.1.2"
,
"grunt-php2html"
:
"^0.1.17"
,
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment