Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): allow file path hashing in watch mode #43

Merged
merged 5 commits into from
Sep 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 21 additions & 14 deletions .vulmix/mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,16 @@ class VulmixInit {
},
})

.ejs('index.ejs', '_dist')
.ejs(
['index.ejs', '_dist/mix-manifest.json'],
'_dist',
{},
{
base: '_dist',
partials: ['_dist/mix-manifest.json'],
mixVersioning: true,
}
)

.copy('.vulmix/assets/icons/favicon-16x16.png', '_dist/assets/icons')

Expand All @@ -47,18 +56,16 @@ class VulmixInit {

.extract()

.after(stats => {
mix.imgs({
source: 'assets/img',
destination: '_dist/assets/img',
webp: true,
thumbnailsSizes: [1920, 1200, 900, 600, 300, 50],
smallerThumbnailsOnly: true,
thumbnailsOnly: true,
imageminWebpOptions: {
quality: 90,
},
})
.imgs({
source: 'assets/img',
destination: '_dist/assets/img',
webp: true,
thumbnailsSizes: [1920, 1200, 900, 600, 300, 50],
smallerThumbnailsOnly: true,
thumbnailsOnly: true,
imageminWebpOptions: {
quality: 90,
},
})

/**
Expand All @@ -73,7 +80,7 @@ class VulmixInit {
*/
mix
.serve(
'npx http-server -p 8000 -a localhost _dist -c-1 --gzip --proxy http://localhost:8000?',
'npx http-server -p 8000 -a localhost _dist --gzip --proxy http://localhost:8000?',
{
verbose: false,
build: false,
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
"main": "index.js",
"scripts": {
"create-img-dir": "mkdirp _dist/assets/img",
"remove-dist": "rimraf _dist",
"remove-dist": "rimraf _dist/assets/_vulmix _dist/assets/css _dist/assets/js",
"build": "npm run remove-dist && npm run create-img-dir && mix",
"dev": "npm run remove-dist && npm run create-img-dir && mix watch",
"hot": "npm run remove-dist && npm run create-img-dir && mix watch --hot",
"serve": "npx http-server -p 8000 -a localhost _dist -c-1 --gzip --proxy http://localhost:8000?",
"serve": "npx http-server -p 8000 -a localhost _dist --gzip --proxy http://localhost:8000?",
"prod": "npm run remove-dist && npm run create-img-dir && mix --production"
},
"author": "Victor Ribeiro",
Expand Down