forked from FG42/FG42
project-path has been added to project DSL
This commit is contained in:
parent
2a5a7302dc
commit
a4533dc45d
|
@ -5,13 +5,13 @@
|
||||||
"This hashmap is responsible for storing project configurations.")
|
"This hashmap is responsible for storing project configurations.")
|
||||||
|
|
||||||
;; DSL -----------------------------------------------------
|
;; DSL -----------------------------------------------------
|
||||||
(defmacro deftask (name body)
|
(defmacro deftask (name &rest body)
|
||||||
"Create a new task for the project with the given NAME and BODY."
|
"Create a new task for the project with the given NAME and BODY."
|
||||||
`(let ((pmap (gethash __project-name__
|
`(let ((pmap (gethash __project-name__
|
||||||
open-project-configurations
|
open-project-configurations
|
||||||
(make-hash-table :test 'equal))))
|
(make-hash-table :test 'equal))))
|
||||||
|
|
||||||
(puthash ,(symbol-name name) (lambda (buffer) ,body) pmap)
|
(puthash ,(symbol-name name) (lambda (project-path buffer) ,@body) pmap)
|
||||||
(puthash __project-name__ pmap open-project-configurations)))
|
(puthash __project-name__ pmap open-project-configurations)))
|
||||||
|
|
||||||
(defmacro run-shell-command (command)
|
(defmacro run-shell-command (command)
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
(let* ((project-hash (gethash project open-project-configurations))
|
(let* ((project-hash (gethash project open-project-configurations))
|
||||||
(task (gethash task-name project-hash))
|
(task (gethash task-name project-hash))
|
||||||
(buf (with-buffer project task-name)))
|
(buf (with-buffer project task-name)))
|
||||||
(funcall task buf)))
|
(funcall task project buf)))
|
||||||
|
|
||||||
(defun execute-run-task ()
|
(defun execute-run-task ()
|
||||||
"Execute the :run task for the current project."
|
"Execute the :run task for the current project."
|
||||||
|
|
Loading…
Reference in New Issue