gulpを使ってディレクトリ名を取得する方法です。
いわゆるカレントを付けたい時に重宝します。
使うのは
var rename = require(‘gulp-rename’);
pugとかjadeのtaskに
.pipe(rename(function(path){
curPath = path.dirname
return {
‘curPath’ : curPath
}
}))
で、curPathにディレクトリ名が入ります。
Web屋(フロントエンド・バックエンド)
gulpを使ってディレクトリ名を取得する方法です。
いわゆるカレントを付けたい時に重宝します。
使うのは
var rename = require(‘gulp-rename’);
pugとかjadeのtaskに
.pipe(rename(function(path){
curPath = path.dirname
return {
‘curPath’ : curPath
}
}))
更新内容
「設定」→「一般」→「ソフトウェア・アップデート」から
サーバーアップグレードに伴い、ヘッダーのContent-Lengthが消える。
ググってみると、Apacheのmod_deflate(mod_gzip)が導入されているのが原因と特定。
なので、htaccessで取得できるよう以下を追加。
<IfModule mod_deflate.c>
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|ico|pdf)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI _\.utxt$ no-gzip
</IfModule>
無事、取得成功。
/usr/lib/systemd/system/amavisd.service
上記を編集。
NoNewPrivileges=true
のコメントアウト。
[Install]
WantedBy=multi-user.target
を追加で起動。