Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2171 from tailwindlabs/perf-improvements
Performance improvements
- Loading branch information
Showing
10 changed files
with
268 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,6 @@ | |
index.html | ||
package-lock.json | ||
yarn-error.log | ||
|
||
# Perf related files | ||
isolate*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
output*.css | ||
v8.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
@tailwind base; | ||
|
||
@tailwind components; | ||
|
||
@tailwind utilities; | ||
|
||
|
||
.btn-1-xl { | ||
@apply sm:space-x-0; | ||
@apply xl:space-x-0; | ||
@apply sm:space-x-1; | ||
@apply xl:space-x-1; | ||
@apply sm:space-y-0; | ||
@apply xl:space-y-0; | ||
@apply sm:space-y-1; | ||
@apply xl:space-y-1; | ||
} | ||
.btn-2-xl { | ||
@apply sm:space-x-0; | ||
@apply xl:space-x-0; | ||
@apply sm:space-x-1; | ||
@apply xl:space-x-1; | ||
@apply sm:space-y-0; | ||
@apply xl:space-y-0; | ||
@apply sm:space-y-1; | ||
@apply xl:space-y-1; | ||
@apply btn-1-xl; | ||
} | ||
.btn-3-xl { | ||
@apply sm:space-x-0; | ||
@apply xl:space-x-0; | ||
@apply sm:space-x-1; | ||
@apply xl:space-x-1; | ||
@apply sm:space-y-0; | ||
@apply xl:space-y-0; | ||
@apply sm:space-y-1; | ||
@apply xl:space-y-1; | ||
@apply btn-2-xl; | ||
} | ||
.btn-4-xl { | ||
@apply sm:space-x-0; | ||
@apply xl:space-x-0; | ||
@apply sm:space-x-1; | ||
@apply xl:space-x-1; | ||
@apply sm:space-y-0; | ||
@apply xl:space-y-0; | ||
@apply sm:space-y-1; | ||
@apply xl:space-y-1; | ||
@apply btn-3-xl; | ||
} | ||
.btn-5-xl { | ||
@apply sm:space-x-0; | ||
@apply xl:space-x-0; | ||
@apply sm:space-x-1; | ||
@apply xl:space-x-1; | ||
@apply sm:space-y-0; | ||
@apply xl:space-y-0; | ||
@apply sm:space-y-1; | ||
@apply xl:space-y-1; | ||
@apply btn-4-xl; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Cleanup existing perf stuff | ||
rm isolate-*.log | ||
|
||
# Ensure we use the latest build version | ||
npm run babelify | ||
|
||
# Run Tailwind on the big fixture file & profile it | ||
node --prof lib/cli.js build ./perf/fixture.css -c ./perf/tailwind.config.js -o ./perf/output.css | ||
|
||
# Generate flame graph | ||
node --prof-process --preprocess -j isolate*.log > ./perf/v8.json | ||
|
||
# Now visit: https://mapbox.github.io/flamebearer/ | ||
# And drag that v8.json file in there! | ||
# You can put "./lib" in the search box which will highlight all our code in green. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
module.exports = { | ||
future: 'all', | ||
experimental: 'all', | ||
purge: [], | ||
theme: { | ||
extend: {}, | ||
}, | ||
variants: [ | ||
'responsive', | ||
'motion-safe', | ||
'motion-reduce', | ||
'group-hover', | ||
'group-focus', | ||
'hover', | ||
'focus-within', | ||
'focus-visible', | ||
'focus', | ||
'active', | ||
'visited', | ||
'disabled', | ||
'checked', | ||
'first', | ||
'last', | ||
'odd', | ||
'even', | ||
], | ||
plugins: [], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.