correr los comandos dentro de hain siempre
This commit is contained in:
parent
e2524cfcef
commit
33fce61ce4
1 changed files with 20 additions and 8 deletions
28
Makefile
28
Makefile
|
@ -32,8 +32,20 @@ build: ## Compilar el sitio (env=production)
|
|||
make bundle args="exec jekyll build --profile --trace"
|
||||
@echo -e "\a"
|
||||
|
||||
hain: ## Correr comandos con hain (args="comandos")
|
||||
$(hainish) '$(args)'
|
||||
|
||||
bundle: ## Correr comandos con bundler (args="install")
|
||||
$(hainish) 'bundle $(args)'
|
||||
$(MAKE) hain args="bundle $(args)"
|
||||
|
||||
yarn: ## Correr comandos con yarn (args="add paquete")
|
||||
$(MAKE) hain args="yarn $(args)"
|
||||
|
||||
npx: ## Correr comandos con npx (args="run")
|
||||
$(MAKE) hain args="npx $(args)"
|
||||
|
||||
npm: ## Correr comandos con npm (args="install -g paquete")
|
||||
$(MAKE) hain args="npm $(args)"
|
||||
|
||||
serve: /etc/hosts $(hain)/run/nginx/nginx.pid ## Servidor de desarrollo
|
||||
@echo "Iniciado servidor web en https://$(domain):4000/"
|
||||
|
@ -41,7 +53,7 @@ serve: /etc/hosts $(hain)/run/nginx/nginx.pid ## Servidor de desarrollo
|
|||
webpack: assets/js/pack.js ## Compilar JS
|
||||
@echo -e "\a"
|
||||
|
||||
webpack-dev-server: /tmp/webpack.pid ## Servidor de prueba de Webpack
|
||||
webpack-dev-server: $(hain)/tmp/webpack.pid ## Servidor de prueba de Webpack
|
||||
|
||||
fa: assets/fonts/forkawesome-webfont.woff2 ## Fork Awesome
|
||||
@echo -e "\a"
|
||||
|
@ -62,19 +74,19 @@ push: ## Publica los cambios locales
|
|||
rsync -avi --delete-after _site/ root@athshe.sutty.nl:/srv/sutty/srv/http/data/_deploy/$(site).sutty.nl/
|
||||
|
||||
node_modules: package.json
|
||||
$(hainish) yarn
|
||||
$(MAKE) yarn
|
||||
|
||||
Gemfile.lock: Gemfile
|
||||
$(hainish) 'bundle install'
|
||||
$(MAKE) bundle args=install
|
||||
|
||||
# XXX: Cada vez que se reinicia el sistema, cambia la fecha de creación
|
||||
# del pid 1 y lo usamos como medida para saber si hay que iniciar nginx.
|
||||
# Si nginx se cae después de iniciarlo, no vamos a reiniciarlo así.
|
||||
$(hain)/run/nginx/nginx.pid: /proc/1
|
||||
$(hainish) nginx
|
||||
$(MAKE) hain args=nginx
|
||||
|
||||
/tmp/webpack.pid:
|
||||
$(hainish) ./node_modules/.bin/webpack-dev-server --public $(domain):4000 --host 127.0.0.1 --port 65001 & echo $$! > /tmp/webpack.pid
|
||||
$(hain)/tmp/webpack.pid:
|
||||
$(MAKE) hain args="./node_modules/.bin/webpack-dev-server --public $(domain):4000 --host 127.0.0.1 --port 65001 & echo $$! > /tmp/webpack.pid"
|
||||
|
||||
/etc/hosts: always
|
||||
@echo "Chequeando si es necesario agregar el dominio local $(domain)"
|
||||
|
@ -82,7 +94,7 @@ $(hain)/run/nginx/nginx.pid: /proc/1
|
|||
|
||||
js = $(wildcard _packs/*.js) $(wildcard _packs/*/*.js) $(wildcard *.js)
|
||||
assets/js/pack.js: $(js)
|
||||
$(hainish) ./node_modules/.bin/webpack --config webpack.prod.js
|
||||
$(MAKE) hain args="./node_modules/.bin/webpack --config webpack.prod.js"
|
||||
|
||||
# Tomar los códigos de los íconos de este archivo y copiarlos a fa.txt
|
||||
# node_modules/font-awesome/scss/_variables.scss
|
||||
|
|
Loading…
Reference in a new issue