Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Arnau Siches
committed
Oct 3, 2015
0 parents
commit 6f1cbfe
Showing
7 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM alpine:3.2 | ||
MAINTAINER Arnau Siches <arnau@ustwo.com> | ||
|
||
ENV SASSC_VERSION=3.2.5 \ | ||
LIBSASS_VERSION=3.2.5 \ | ||
SASS_LIBSASS_PATH=/usr/local/libsass-$LIBSASS_VERSION | ||
|
||
COPY build.sh /build.sh | ||
RUN /build.sh | ||
|
||
RUN adduser -D ustwo \ | ||
&& addgroup ustwo ustwo | ||
|
||
WORKDIR /home/ustwo | ||
|
||
ENTRYPOINT ["/usr/local/bin/sassc"] | ||
CMD ["-v"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.PHONY: build shell test version | ||
|
||
image_name := ustwo/sass | ||
|
||
build: | ||
@docker build -t $(image_name) . | ||
|
||
shell: | ||
@docker run --rm -it --entrypoint=/bin/sh $(image_name) | ||
|
||
version: | ||
@docker run --rm -t $(image_name) | ||
|
||
test: test-001 test-002 | ||
|
||
test-001: | ||
@docker run --rm -t \ | ||
-v $(PWD)/tests:/home/ustwo/tests \ | ||
$(image_name) \ | ||
--style compressed \ | ||
tests/test-001.sass | ||
|
||
test-002: | ||
@docker run --rm -t \ | ||
-v $(PWD)/tests:/home/ustwo/tests \ | ||
$(image_name) \ | ||
--style compressed \ | ||
tests/test-002.scss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# ustwo sassc | ||
|
||
This image is based on [Alpine](https://alpinelinux.org) to ensure a small base | ||
image. | ||
|
||
## Versions | ||
|
||
* 3.2.5, latest | ||
|
||
## Assumptions | ||
|
||
* Workdir: `/home/ustwo`. | ||
|
||
## Usage | ||
|
||
$ docker run --rm -t \ | ||
-v $(PWD)/input.scss:/home/ustwo/input.scss \ | ||
ustwo/sass:3.2.5 \ | ||
--sourcemap \ | ||
--style compressed \ | ||
input.scss output.css | ||
|
||
## Maintainers | ||
|
||
* [Arnau Siches](mailto:arnau@ustwo.com) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#! /bin/sh | ||
|
||
set -e | ||
|
||
SASSC_VERSION=3.2.5 | ||
LIBSASS_VERSION=3.2.5 | ||
SASS_LIBSASS_PATH=/usr/local/libsass-$LIBSASS_VERSION | ||
|
||
apk add --update \ | ||
curl \ | ||
g++ \ | ||
make | ||
rm -rf /var/cache/apk/* | ||
|
||
cd /usr/local | ||
|
||
# Fetch | ||
curl -L https://github.com/sass/libsass/archive/$LIBSASS_VERSION.tar.gz | tar xvz | ||
curl -L https://github.com/sass/sassc/archive/$SASSC_VERSION.tar.gz | tar xvz | ||
|
||
# Compile | ||
cd /usr/local/sassc-$SASSC_VERSION | ||
make | ||
|
||
# Clean | ||
cp /usr/local/sassc-$SASSC_VERSION/bin/sassc /usr/local/bin/sassc | ||
rm -rf /usr/local/sassc-$SASSC_VERSION \ | ||
/usr/local/libsass-$LIBSASS_VERSION | ||
|
||
apk del curl make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#test-001 | ||
color: green |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#test-002 { | ||
color: green; | ||
} |