Full-contained static site workflow
You can read Houl documentation on https://houl.netlify.com/
MIT
Full-contained static site workflow
Home Page: https://houl.netlify.com
License: MIT License
Full-contained static site workflow
You can read Houl documentation on https://houl.netlify.com/
MIT
I'm not sure a root cause yet but posting as a note.
$ yarn build-cache
yarn build-cache v0.24.5
$ houl build -c houl/houl.config.js --cache houl/.cache
/.../node_modules/progeny/index.js:339
throw err;
^
Error: ENOENT: no such file or directory, open '/.../src/_pug/_components/_social_banner.pug'
at Error (native)
at Object.fs.openSync (fs.js:641:18)
at Object.fs.readFileSync (fs.js:509:33)
at Object.readFile (/.../node_modules/cbify/index.js:33:16)
at progeny (/.../node_modules/progeny/index.js:322:16)
at progenySync (/.../node_modules/progeny/index.js:337:5)
at DepResolver (/.../node_modules/houl/lib/cli/build.js:52:47)
at DepResolver.register (/.../node_modules/houl/lib/dep-resolver.js:15:25)
at loop (/.../node_modules/houl/lib/cache-stream.js:55:19)
at depResolver.getOutDeps.forEach.fileName (/.../node_modules/houl/lib/cache-stream.js:58:9)
error Command failed with exit code 1.
It would be useful if we can merge preset options like webpack-merge.
Currently, isExclude
matches the full path of files but it should only match the paths under project directory (i.e. under input
)
Sometimes, we may want to build a part of source files in a project for various purpose. (e.g. generating styleguide by using built css files)
--filter **/*.scss
option would be helpful in that case.
Currently, the request to /path/to/dir/
will be predicted as the request to /path/to/dir/index.html
. But /path/to/dir
(no trailing slash) is not. We should treat the both path as the same thing.
To customize a preset behavior, it would be nice if we can specify preset options. The preset
option may have an object to do that.
{
"input": "src",
"output": "dist",
"preset": {
"name": "some-houl-preset",
"options": { /* the preset options goes here */ }
}
}
Then, in the some-houl-preset
, the preset author can define houl.config.js
with a function that receive the preset options as its 1st argument.
module.exports = function config(options) {
// Must return preset config
return {
rules: {
// ...
}
}
}
The current dev server implementation is quite slow because it always compiles all requested files. We should cache already compiled files in the same dev server session so that the response time will be faster.
Some gulp plugins behaves incorrectly if we change extnames before executing them. e.g. gulp-stylelint
will treat .scss
files as .css
files when we change the extname to .css
and it occurs unexpected behavior.
We should move the code to change extname after executing tasks.
Sometimes, the user may want to serve a part of a Web site by dev server.
e.g. in the following file structure:
- src
|- index.html
|- js/
|- css/
|- img/
|- ...
The user may want to access src/index.html
via http://localhost:8080/sub/index.html
To do that, we need to add basePath
option for dev server like webpack dev server's publicPath
option.
https://webpack.js.org/configuration/dev-server/#devserver-publicpath-
$ git checkout houl-build
$ npm i
$ rm -rf dist
$ rm houl/.cache
$ npm run build-cache
$ cat houl/.cache | wc
0 1 74726
$ tail houl/.cache
...
...img/img-vol5_top.png":"01e24225"},"deps":{}}%
(build without modifications for sources)
$ npm run build-cache
$ cat houl/.cache | wc
0 1 1048606
(deps are updated in this step)
This is because cache stream does not look into deps if the source file does not hit with cache. We need to always resolve and register nested deps in cache.
If the user excludes some files in their tasks by using gulp-ignore, the build process is accidentally ended while the build does not finished yet.
This is because the task-stream
module does not handle end
event of internal readable stream and it only listens data
event of it. So if the task does not provide result data, it cannot handle end of the stream.
Maybe this error happens because there is an old cache having files which no longer exist in dependencies.
We should verity and update the cache based on the latest files.
Sometimes having two files (houl.config.js
and houl.task.js
) is cumbersome especially for small build setting. It would be useful if we can define tasks in config file directly.
const pug = require('gulp-pug')
module.exports = {
tasks: {
pug: stream => {
return stream.pipe(pug())
}
},
rules: {
pug: {
task: 'pug',
outputExt: 'html'
}
}
}
Let we have a file base.scss
and variable.scss
, and base.scss
dependes on variable.scss
.
When the user modifies variable.scss
, base.scss
will be updated and output to dist directory. However, the last modified time of output file of base.scss
is not updated.
This can be problematic under some cache systems that look last modified time such as Ruby on Rails asset pipe line.
Pipeline of stream which introduced in Node v10 is suitable for error handling on Houl. It handles errors emitted by any stream in the pipeline. So we don't need to monkey patch the stream instance to do that.
It would be nice if houl can proxies to other servers. The use case is when there is a backend server that provide views or apis while a frontend app depends on them.
The proxy option would look like:
module.exports = {
input: 'src',
output: 'dist',
// ...
proxy: {
'/api': 'http://localhost:4000/api/',
'/other': {
target: 'http://localhost:4000/other/',
logLevel: 'silent'
}
}
}
This is the same interface as webpack-dev-server's proxy.
We may use http-proxy-middleware to achieve this as well.
Hi!
I would like to set Browsersync options.
For example startPath.
Could you add Browsersync options to Houl?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.