From ec7dc0b32e3b7e09a40a7488e784d2c6a17d70f2 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Fri, 23 Aug 2019 23:39:07 -0700 Subject: [PATCH] =?UTF-8?q?Add=20snippets=20to=20=E2=80=98oni-css=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 14 ++++++++++++++ GNUmakefile | 18 ++++++++++++++++-- oni-css/Cask | 13 +++++++++++++ oni-css.el => oni-css/oni-css.el | 0 oni-css/snippets/css-mode/box-shadow | 5 +++++ 5 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 oni-css/Cask rename oni-css.el => oni-css/oni-css.el (100%) create mode 100644 oni-css/snippets/css-mode/box-shadow diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f7e76bd..692bfd4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,6 +16,16 @@ package-oni-conf: paths: - oni-conf/dist/ +package-oni-css: + stage: pre-package-multifile + before_script: + - rm -rf oni-css/dist + script: + - cask --path oni-css package + artifacts: + paths: + - oni-css/dist/ + test-oni-alert: stage: test script: make test-oni-alert @@ -33,6 +43,9 @@ test-oni-conf: test-oni-css: stage: test + dependencies: + - package-oni-css + needs: [package-oni-css] script: make test-oni-css test-oni-grep: @@ -51,6 +64,7 @@ package: stage: package dependencies: - package-oni-conf + - package-oni-css before_script: - rm -rf bin/ - mkdir bin/ diff --git a/GNUmakefile b/GNUmakefile index 79a833c..e6d2dc3 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -16,6 +16,12 @@ package-oni-conf: --funcall package-initialize \ --eval "(package-upload-file (car (sort (file-expand-wildcards \"oni-conf/dist/*.tar\") #'string>)))" +package-oni-css: + emacs --batch \ + --load oni-package.el \ + --funcall package-initialize \ + --eval "(package-upload-file (car (sort (file-expand-wildcards \"oni-css/dist/*.tar\") #'string>)))" + install-%: emacs --batch \ --load oni-package.el \ @@ -32,6 +38,14 @@ install-oni-conf: $(foreach DEP,$(DEPS),--eval "(package-install-file \"$(DEP).el\")") \ --eval "(package-install-file (car (sort (file-expand-wildcards \"oni-conf/dist/*.tar\") #'string>)))" \ +install-oni-css: + emacs --batch \ + --load oni-package.el \ + --funcall package-initialize \ + --eval '(package-refresh-contents)' \ + $(foreach DEP,$(DEPS),--eval "(package-install-file \"$(DEP).el\")") \ + --eval "(package-install-file (car (sort (file-expand-wildcards \"oni-css/dist/*.tar\") #'string>)))" \ + test-%: install-% emacs --batch \ --load oni-package.el \ @@ -41,10 +55,10 @@ test-%: install-% --eval "(setq ert-batch-backtrace-right-margin nil)" \ --funcall ert-run-tests-batch-and-exit -test-oni-css: DEPS := oni-company oni-fci test-oni-bookmark: DEPS := oni-data-dir -test-oni-php: DEPS := oni-flycheck oni-company oni-fci test-oni-conf: DEPS := oni-yasnippet +test-oni-css: DEPS := oni-company oni-fci +test-oni-php: DEPS := oni-flycheck oni-company oni-fci clean: rm -fv $(FILES) diff --git a/oni-css/Cask b/oni-css/Cask new file mode 100644 index 0000000..b22146e --- /dev/null +++ b/oni-css/Cask @@ -0,0 +1,13 @@ +(source gnu) +(source melpa) + +(package-file "./oni-css.el") + +(depends-on "oni-company" :git "../" :files ("oni-company.el")) +(depends-on "oni-fci" :git "../" :files ("oni-fci.el")) +(depends-on "hydra") +(depends-on "rainbow-mode") + +(files + "*.el" + ("snippets" "./snippets/*")) diff --git a/oni-css.el b/oni-css/oni-css.el similarity index 100% rename from oni-css.el rename to oni-css/oni-css.el diff --git a/oni-css/snippets/css-mode/box-shadow b/oni-css/snippets/css-mode/box-shadow new file mode 100644 index 0000000..82fe9d5 --- /dev/null +++ b/oni-css/snippets/css-mode/box-shadow @@ -0,0 +1,5 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: box-shadow +# key: boxshadow +# -- +box-shadow: ${1:offset-x} ${2:offset-y}${3: [blur-radius]}${4: [spread-radius]}${5: [color]}; \ No newline at end of file