Comments (7)
You're using defaults, so it expects your css and js to be in assets/styles and assets/scripts.
Is that your case ?
from hugulp.
from hugulp.
Is public/styles.css created ?
Not sure what could be the problem.
Maybe you could add gulp-debug somewhere around here https://github.com/jbrodriguez/hugulp/blob/master/gulp/build.js#L74, to figure it out
from hugulp.
Probably I'm misunderstanding something.
I've tried again, but still can't get it to work.
I'm no longer using the default .hugulprc
file, but instead this one:
{
"version": 2,
"pipeline": [
"images",
"styles",
"scripts",
"fingerprint",
"html"
],
"path": {
"styles": "css",
"images": "img",
"scripts": "js"
},
"watch": {
"source": "assets",
"target": "static"
},
"build": {
"source": "public",
"target": "public"
},
"autoprefixer": {
"browsers": [
"last 2 versions"
]
},
"cleancss": {
"advanced": false
},
"htmlmin": {
"collapseWhitespace": true
},
"gifsicle": {
"interlaced": true
},
"jpegtran": {
"progressive": true
},
"optipng": {
"optimizationLevel": 5
},
"svgo": {
"plugins": [
{
"removeViewBox": true
},
{
"cleanupIDs": false
}
]
}
}
This is the folder structure of my project:
total 8
drwxr-xr-x 3 user group 96 Mar 17 12:37 archetypes
-rw-r--r--@ 1 user group 468 Mar 23 09:35 config.toml
drwxr-xr-x 12 user group 384 Mar 23 20:41 content
drwxr-xr-x 2 user group 64 Mar 15 12:44 data
drwxr-xr-x 8 user group 256 Mar 23 20:41 layouts
drwxr-xr-x 48 user group 1536 Mar 25 17:22 public
drwxr-xr-x 3 user group 96 Mar 20 16:55 resources
drwxr-xr-x 24 user group 768 Mar 23 20:41 static
drwxr-xr-x 2 user group 64 Mar 15 12:44 themes
And these are the contents of the static
folder:
total 160
-rw-r--r--@ 1 user group 2144 Mar 20 15:20 android-chrome-192x192.png
-rw-r--r--@ 1 user group 5396 Mar 20 15:20 android-chrome-512x512.png
-rw-r--r--@ 1 user group 1845 Mar 20 15:20 user-touch-icon.png
-rw-r--r--@ 1 user group 246 Mar 20 15:20 browserconfig.xml
drwxr-xr-x 4 user group 128 Mar 23 20:41 css
-rw-r--r--@ 1 user group 509 Mar 20 15:20 favicon-16x16.png
-rw-r--r--@ 1 user group 660 Mar 20 15:20 favicon-32x32.png
-rw-r--r--@ 1 user group 15086 Mar 20 15:20 favicon.ico
-rwxr-xr-x 1 user group 229 Sep 11 2017 humans.txt
drwxr-xr-x 7 user group 224 Mar 23 20:41 img
drwxr-xr-x 5 user group 160 Mar 23 20:41 js
-rw-r--r--@ 1 user group 1670 Mar 20 15:20 mstile-144x144.png
-rw-r--r--@ 1 user group 1556 Mar 20 15:20 mstile-150x150.png
-rw-r--r--@ 1 user group 1718 Mar 20 15:20 mstile-310x150.png
-rw-r--r--@ 1 user group 3007 Mar 20 15:20 mstile-310x310.png
-rw-r--r--@ 1 user group 1240 Mar 20 15:20 mstile-70x70.png
drwxr-xr-x 3 user group 96 Mar 23 13:11 patterns
-rwxr-xr-x 1 user group 78 Sep 11 2017 robots.txt
-rw-r--r--@ 1 user group 3649 Mar 20 15:20 safari-pinned-tab.svg
-rw-r--r--@ 1 user group 452 Mar 20 15:20 site.webmanifest
public/styles.css
is not being created, but that's also not where I expect my styles to be.
The original CSS is in static/css/main.css
and the output ends up in public/css/main-5eb219ac99.css
.
That's where I expect it to be, except the CSS isn't minified at all.
from hugulp.
In your .hugulprc, try changing
"watch": {
- "source": "assets",
+ "source": "static",
from hugulp.
Thanks! I get it now :)
I made an assets folder and put my css
and js
directories in there.
Now they're being minified.
from hugulp.
Great !
from hugulp.
Related Issues (20)
- Add docker support HOT 1
- having problem with reference task HOT 1
- Stuck in infinite loop on Ubuntu HOT 4
- UnCSS support HOT 3
- Source Map HOT 2
- Unable to minify Javascript error HOT 1
- HTML minifying HOT 1
- .hugulprc HOT 2
- Update code and variables
- Put all hard coded files/directories into an array
- Support .sass files in addition to .scss
- hugulp next HOT 1
- why doesn't 'watch' include autoprefixer? HOT 5
- JavaScript Concatenation? HOT 4
- Allow json extension for config file
- Update to Gulp 4 HOT 1
- Support for standardjs or custom eslint-config
- hugulp reprocesses images already compressed or optimized by hugulp HOT 1
- No stylesheets generated? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hugulp.