From f31dc6dd178b48aaf7e884339c069c2cf9f70411 Mon Sep 17 00:00:00 2001 From: Christian Hoffmeister Date: Sat, 27 Feb 2016 13:53:26 +0100 Subject: [PATCH] Add simple test suite --- .gitignore | 4 ++++ package.json | 8 ++++++-- test.sh | 12 ++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100755 test.sh diff --git a/.gitignore b/.gitignore index 8ed6371..7e131e0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# Node +node_modules/ +npm-debug.log + # OS specific trash .DS_Store ._.DS_Store diff --git a/package.json b/package.json index 2687eb3..1a65d8f 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "A simple package providing the Roboto fontface.", "main": "css/roboto-fontface.css", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "./test.sh" }, "repository": { "type": "git", @@ -20,5 +20,9 @@ "bugs": { "url": "https://github.com/choffmeister/roboto-fontface-bower/issues" }, - "homepage": "https://github.com/choffmeister/roboto-fontface-bower" + "homepage": "https://github.com/choffmeister/roboto-fontface-bower", + "devDependencies": { + "less": "2.6.0", + "node-sass": "3.4.2" + } } diff --git a/test.sh b/test.sh new file mode 100755 index 0000000..e674268 --- /dev/null +++ b/test.sh @@ -0,0 +1,12 @@ +#!/bin/bash -e +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +for FILE in $DIR/css/*.less; do + echo "less $FILE" + lessc "$FILE" >/dev/null +done + +for FILE in $DIR/css/*.scss; do + echo "sass $FILE" + node-sass "$FILE" >/dev/null +done