Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
feat : add purgeCSS and change current playlist
Browse files Browse the repository at this point in the history
  • Loading branch information
Zainal21 committed Feb 10, 2022
1 parent 4ea4dcc commit e55d3d8
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 11 deletions.
18 changes: 17 additions & 1 deletion nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,23 @@ export default {
'@/assets/css/main.scss',
'@/assets/css/prism-material-light.css',
],
buildModules: ['@nuxtjs/tailwindcss'],
buildModules: ['@nuxtjs/tailwindcss', 'nuxt-purgecss'],
purgeCSS:{
extractors: () => [
{
extractor(content) {
return content.match(/[A-z0-9-:\\/]+/g)
},
extensions: ['html', 'vue', 'js']
},
{
extractor(content) {
return content.match(/[A-z0-9-\\/]+/g)
},
extensions: ['vue']
}
]
},
build: {
extend (config) {
const rule = config.module.rules.find(r => r.test.toString() === '/\\.(png|jpe?g|gif|svg|webp)$/i')
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"nuxt": "^2.11.0",
"nuxt-i18n": "^6.4.1",
"nuxt-lazy-load": "^1.2.6",
"nuxt-purgecss": "^1.0.0",
"nuxt-webfontloader": "^1.1.0",
"vue-disqus": "^4.0.1",
"vue-lazyload": "^1.3.3"
Expand Down
2 changes: 1 addition & 1 deletion pages/data/linktree.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
{
"name": "instagram",
"redirect": "https://www.instagram.com/muhamadzain.dev",
"redirect": "https://www.instagram.com/muhamadzain.tsx",
"color": "bg-red-600"
},
{
Expand Down
12 changes: 6 additions & 6 deletions pages/data/playlist.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[
{
"id": 1,
"title": "Eminem - Mockingbird (Official Music Video)",
"source": "https://www.youtube.com/embed/S9bCLPwzSC0"
"title": "Radja - Benci Bilang Cinta (Official Music Video)",
"source": "https://www.youtube.com/embed/ds2jdbChkE"
},
{
"id": 2,
"title": "DENNY CAKNAN feat. GUYON WATON - WIDODARI (Official Music Video)",
"source": "https://www.youtube.com/embed/jeccjxIgBJ0"
"title": "Yasir Lana Cover Ai Khodijah",
"source": "https://www.youtube.com/embed/U59EKWaapOc"
},
{
"id": 3,
Expand All @@ -16,7 +16,7 @@
},
{
"id": 4,
"title": "Anggun - Hanyalah Cinta",
"source": "https://www.youtube.com/embed/OULif_-R2Cw"
"title": "Axwell Λ Ingrosso - Sun Is Shining (Official Music Video)",
"source": "https://www.youtube.com/embed/nbXgHAzUWB0"
}
]
95 changes: 92 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@
resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7"
integrity sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw==

"@fullhuman/postcss-purgecss@^2.1.2":
"@fullhuman/postcss-purgecss@^2.0.5", "@fullhuman/postcss-purgecss@^2.1.2":
version "2.3.0"
resolved "https://registry.yarnpkg.com/@fullhuman/postcss-purgecss/-/postcss-purgecss-2.3.0.tgz#50a954757ec78696615d3e118e3fee2d9291882e"
integrity sha512-qnKm5dIOyPGJ70kPZ5jiz0I9foVOic0j+cOzNDoo8KoCf6HjicIZ99UfO2OmE7vCYSKAAepEwJtNzpiiZAh9xw==
Expand Down Expand Up @@ -2439,7 +2439,7 @@ chrome-trace-event@^1.0.2:
dependencies:
tslib "^1.9.0"

ci-info@^1.6.0:
ci-info@^1.5.0, ci-info@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497"
integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==
Expand Down Expand Up @@ -2689,6 +2689,16 @@ connect@^3.7.0:
parseurl "~1.3.3"
utils-merge "1.0.1"

consola@^1.4.5:
version "1.4.5"
resolved "https://registry.yarnpkg.com/consola/-/consola-1.4.5.tgz#09732d07cb50af07332e54e0f42fafb92b962c4a"
integrity sha512-movqq3MbyXbSf7cG/x+EbO3VjKQVZPB/zeB5+lN1TuBYh9BWDemLQca9P+a4xpO4lXva9rz+Bd8XyqlH136Lww==
dependencies:
chalk "^2.3.2"
figures "^2.0.0"
lodash "^4.17.5"
std-env "^1.1.0"

consola@^2.10.0, consola@^2.15.0, consola@^2.4.0, consola@^2.6.0, consola@^2.9.0:
version "2.15.0"
resolved "https://registry.yarnpkg.com/consola/-/consola-2.15.0.tgz#40fc4eefa4d2f8ef2e2806147f056ea207fcc0e9"
Expand Down Expand Up @@ -3434,6 +3444,15 @@ enhanced-resolve@^4.1.1, enhanced-resolve@^4.3.0:
memory-fs "^0.5.0"
tapable "^1.0.0"

enhanced-resolve@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz#2f3cfd84dbe3b487f18f2db2ef1e064a571ca5ec"
integrity sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==
dependencies:
graceful-fs "^4.1.2"
memory-fs "^0.5.0"
tapable "^1.0.0"

entities@^1.1.1, entities@~1.1.1:
version "1.1.2"
resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56"
Expand Down Expand Up @@ -3764,6 +3783,13 @@ figgy-pudding@^3.5.1:
resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e"
integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==

figures@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962"
integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=
dependencies:
escape-string-regexp "^1.0.5"

figures@^3.0.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af"
Expand Down Expand Up @@ -4679,6 +4705,13 @@ is-callable@^1.1.4, is-callable@^1.2.2:
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.2.tgz#c7c6715cd22d4ddb48d3e19970223aceabb080d9"
integrity sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==

is-ci@^1.1.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.2.1.tgz#e3779c8ee17fccf428488f6e281187f2e632841c"
integrity sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==
dependencies:
ci-info "^1.5.0"

is-color-stop@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-color-stop/-/is-color-stop-1.1.0.tgz#cfff471aee4dd5c9e158598fbe12967b5cdad345"
Expand Down Expand Up @@ -5913,6 +5946,17 @@ nuxt-lazy-load@^1.2.6:
intersection-observer "^0.7.0"
string-replace-loader "^2.1.1"

nuxt-purgecss@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/nuxt-purgecss/-/nuxt-purgecss-1.0.0.tgz#7c275205f0b727a5822781908d684f2e094ff5e7"
integrity sha512-gu6CUd+oA738Gqyl8P16HmnvreuslKVrn8tTJnjCut6OOC3pRrxqct6sAad0sxDk2fULVdeGb7V/mxo8qKisPQ==
dependencies:
"@fullhuman/postcss-purgecss" "^2.0.5"
consola "^1.4.5"
glob-all "^3.1.0"
purgecss "^2.0.5"
purgecss-webpack-plugin "^2.0.5"

nuxt-webfontloader@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/nuxt-webfontloader/-/nuxt-webfontloader-1.1.0.tgz#68b47ffbeaee4c41969f42f57a86946e0c36715c"
Expand Down Expand Up @@ -7204,7 +7248,16 @@ punycode@^2.1.0, punycode@^2.1.1:
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==

purgecss@^2.3.0:
purgecss-webpack-plugin@^2.0.5:
version "2.3.0"
resolved "https://registry.yarnpkg.com/purgecss-webpack-plugin/-/purgecss-webpack-plugin-2.3.0.tgz#ba50bc25524ddbc27b5ed47ef30af65ad3a10bb2"
integrity sha512-I9IMWFq4sHRg/FuuD38upRZdQ0EHuyrv+dFTKcPRjugJWkIU6S5lzKdZqO4cFo+ApcA5gqHnAEIk1ncPabZITg==
dependencies:
purgecss "^2.3.0"
webpack "^4.42.1"
webpack-sources "^1.4.3"

purgecss@^2.0.5, purgecss@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/purgecss/-/purgecss-2.3.0.tgz#5327587abf5795e6541517af8b190a6fb5488bb3"
integrity sha512-BE5CROfVGsx2XIhxGuZAT7rTH9lLeQx/6M0P7DTXQH4IUc3BBzs9JUzt4yzGf3JrH9enkeq6YJBe9CTtkm1WmQ==
Expand Down Expand Up @@ -8110,6 +8163,13 @@ static-extend@^0.1.1:
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=

std-env@^1.1.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/std-env/-/std-env-1.3.1.tgz#4e1758412439e9ece1d437b1b098551911aa44ee"
integrity sha512-KI2F2pPJpd3lHjng+QLezu0eq+QDtXcv1um016mhOPAJFHKL+09ykK5PUBWta2pZDC8BVV0VPya08A15bUXSLQ==
dependencies:
is-ci "^1.1.0"

std-env@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/std-env/-/std-env-2.2.1.tgz#2ffa0fdc9e2263e0004c1211966e960948a40f6b"
Expand Down Expand Up @@ -9104,6 +9164,35 @@ webpack-sources@^1.0.1, webpack-sources@^1.1.0, webpack-sources@^1.4.0, webpack-
source-list-map "^2.0.0"
source-map "~0.6.1"

webpack@^4.42.1:
version "4.46.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.46.0.tgz#bf9b4404ea20a073605e0a011d188d77cb6ad542"
integrity sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q==
dependencies:
"@webassemblyjs/ast" "1.9.0"
"@webassemblyjs/helper-module-context" "1.9.0"
"@webassemblyjs/wasm-edit" "1.9.0"
"@webassemblyjs/wasm-parser" "1.9.0"
acorn "^6.4.1"
ajv "^6.10.2"
ajv-keywords "^3.4.1"
chrome-trace-event "^1.0.2"
enhanced-resolve "^4.5.0"
eslint-scope "^4.0.3"
json-parse-better-errors "^1.0.2"
loader-runner "^2.4.0"
loader-utils "^1.2.3"
memory-fs "^0.4.1"
micromatch "^3.1.10"
mkdirp "^0.5.3"
neo-async "^2.6.1"
node-libs-browser "^2.2.1"
schema-utils "^1.0.0"
tapable "^1.1.3"
terser-webpack-plugin "^1.4.3"
watchpack "^1.7.4"
webpack-sources "^1.4.1"

webpack@^4.44.2:
version "4.44.2"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.44.2.tgz#6bfe2b0af055c8b2d1e90ed2cd9363f841266b72"
Expand Down

1 comment on commit e55d3d8

@vercel
Copy link

@vercel vercel bot commented on e55d3d8 Feb 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.