Skip to content

Commit

Permalink
Initialized build configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
metaodi committed Dec 29, 2012
1 parent 846f83c commit 57e81d4
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
/nbproject/private/
/resources/styles/styles.css
/resources/styles/styles.css
/.sass-cache/
/bin/
/vendor/
composer.lock
composer.phar
1 change: 1 addition & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DirectoryIndex index.html index.php
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: php

php:
- 5.3
- 5.4

before_script:
- gem install sass
- gem install compass
- curl -s http://getcomposer.org/installer | php --
- php composer.phar install --dev
- phpenv rehash

script: ant build
59 changes: 59 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<project name="kort-build" basedir="." default="build">
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="lib/antlibs/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>

<property environment="env"/>

<target name="build" depends="css,lint">
<echo message="BUILD FINISHED!"/>
</target>

<target name="lint">
<antcall target="js-lint"/>
<antcall target="php-lint"/>
</target>

<target name="js-lint">
<echo message="Linting JavaScript files"/>
<exec executable="grunt">
<arg value="lint"/>
<arg value="--verbose"/>
<arg value="--force"/>
</exec>
</target>

<target name="php-lint">
<echo message="Linting PHP files"/>
<exec executable="bin/phpcs">
<arg value="--standard=code_standard.xml"/>
<arg value="--report-width=60"/>
<arg value="${php.dir}"/>
</exec>
</target>

<target name="css">
<echo message="Compile sass files to css"/>
<foreach target="compile_sass" param="dir">
<path>
<dirset dir="${basedir}">
<include name="**/styles"/>
</dirset>
</path>
</foreach>
</target>

<target name="compile_sass">
<echo message="Compile sass files in ${dir}"/>
<apply executable="sass" dest="${dir}" verbose="true" force="true" failonerror="true">
<arg value="--unix-newlines" />
<srcfile />
<targetfile />
<fileset dir="${dir}" includes="**/*.scss" />
<mapper type="glob" from="*.scss" to="*.css"/>
</apply>
</target>

</project>
9 changes: 9 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"minimum-version": "dev",
"require-dev": {
"squizlabs/php_codesniffer": "dev-master"
},
"config": {
"bin-dir": "bin"
}
}
2 changes: 2 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// This file is only needed that Heroku detects a PHP app
Binary file added lib/antlibs/ant-contrib-1.0b3.jar
Binary file not shown.

0 comments on commit 57e81d4

Please sign in to comment.