Skip to content

QUnit/Grunt extension #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 296 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
296 commits
Select commit Hold shift + click to select a range
1ef5ff6
Housekeeping: Code resturctured.
manuelpichler Feb 26, 2012
dec53bd
Sonar integration started.
manuelpichler Mar 12, 2012
773fb85
Sonar extension files added.
manuelpichler Mar 12, 2012
5b4e7ed
Migrated to Douglas Crockfords JSLint run on rhino
kore Mar 26, 2012
56f8476
Implemented: Make JSLint configurable
kore Mar 26, 2012
ab3d724
Fixed: Always perform a full update
manuelpichler Mar 26, 2012
2e95eff
Merge pull request #6 from kore/master
manuelpichler Mar 26, 2012
f178b3c
Added initial resources for requirejs extension
jakobwesthoff Apr 17, 2012
dd99454
Added executable configuration for rhino
jakobwesthoff Apr 17, 2012
4c9e76d
Implemented first version of requirejs bootstrapping
jakobwesthoff Apr 18, 2012
642438a
Added correct rhino executable name
jakobwesthoff Apr 18, 2012
3fcee5b
Added possibility to configure and add loaders
jakobwesthoff Apr 18, 2012
522c1d2
Documented and cleaned up requirejs extension
jakobwesthoff Apr 18, 2012
9c39740
Refactored combined file creation to all attachment of entrypoint loader
jakobwesthoff Apr 18, 2012
d0f2ebc
Fixed check for existing js source directory
jakobwesthoff Apr 18, 2012
9bb6436
Fixed template variable name for buildfile
jakobwesthoff Apr 18, 2012
ed6ef9e
Implemented loading of initial entrypoint
jakobwesthoff Apr 18, 2012
956c8aa
Changed entrypoint to be relative to sitedir and created correct runt…
jakobwesthoff Apr 18, 2012
42ee0bc
Made the entrypoint/baseUrl configuration absolute, as it is always r…
jakobwesthoff Apr 19, 2012
b9c0214
Implemented generic availability extension
jakobwesthoff Apr 19, 2012
4ff7fa5
Only execute codesniffer if a php srcdir is available
jakobwesthoff Apr 19, 2012
895d5e7
Fixed wrong property naming
jakobwesthoff Apr 19, 2012
16934b6
Made sure jshint is only executed if js srcdir is present
jakobwesthoff Apr 19, 2012
f9c5cd9
jslint is only executed if javascript srcdir is present
jakobwesthoff Apr 19, 2012
8f3941a
Only run jstestdriver tasks if javascript testdir is available
jakobwesthoff Apr 19, 2012
6dcf40c
Only execute pdepend if php srcdir is available
jakobwesthoff Apr 19, 2012
735718c
Removed php extension
jakobwesthoff Apr 19, 2012
a2e2c84
Refactored phpunit tasks to use new availability extension
jakobwesthoff Apr 19, 2012
aa56683
Refactored sonar tasks to use new availability extension
jakobwesthoff Apr 19, 2012
38a5706
Only run phpcb if php srcdir is available
jakobwesthoff Apr 19, 2012
ad2ccfe
Only run phpcpd if php srcdir is available
jakobwesthoff Apr 19, 2012
228817e
Only execute phpmd if php srcdir is available
jakobwesthoff Apr 19, 2012
066d8ff
Only execute phploc if php srcdir is available
jakobwesthoff Apr 19, 2012
2d0b559
Implemented generic macro to execute antcall if properties are enabled
jakobwesthoff Apr 20, 2012
b59b53a
Changed archive extension to use new `enabled` extension
jakobwesthoff Apr 20, 2012
8375a97
Added enabled flag to codesniffer
jakobwesthoff Apr 20, 2012
a6c8ae2
Made the enabled.antcall macro feature complete in comparison to a re…
jakobwesthoff Apr 20, 2012
74d5b8d
Hooked jshint into the compile step, but disabled it by default
jakobwesthoff Apr 20, 2012
22fe4cd
Hooked jslint into the compile step and enabled it by default
jakobwesthoff Apr 20, 2012
75f5beb
Implemented log output if a target is skipped due to being disabled
jakobwesthoff Apr 20, 2012
4387370
Hooked jstestdriver into the testing step
jakobwesthoff Apr 20, 2012
0ceaa93
Allowed pdepend to be disabled
jakobwesthoff Apr 20, 2012
cdbc9f6
Implemented log output of property value in case something is disabled
jakobwesthoff Apr 20, 2012
68a59ad
Allowed for phpcb to be disabled
jakobwesthoff Apr 20, 2012
2dcac08
Allowed phpcpd to be disabled
jakobwesthoff Apr 20, 2012
260a654
Allowed phploc to be disabled
jakobwesthoff Apr 20, 2012
f14ef84
Allowed phpmd to be disabled
jakobwesthoff Apr 20, 2012
ea83147
Allowed phpunit to be disabled
jakobwesthoff Apr 20, 2012
e1fda81
Realigned and cleaned up defaults.properties
jakobwesthoff Apr 20, 2012
d02c3e9
Added some help documentation to the requirejs module, before startin…
jakobwesthoff Apr 20, 2012
876d43d
Started splitting the requirejs extension into different sub extensions
jakobwesthoff Apr 20, 2012
2072c37
Added: New docbook extension
manuelpichler Apr 20, 2012
8093f49
Fixed: Ignore the temporary test directory.
manuelpichler Apr 20, 2012
ad23327
Merge branch 'master' of github.com:Qafoo/build-commons into feat/req…
jakobwesthoff May 9, 2012
6ac1ac9
Made bootstrap config template configurable and switched to ants defa…
jakobwesthoff May 9, 2012
90084a5
Moved loader build config creation into main module
jakobwesthoff May 9, 2012
1c905b6
Implemented requirejs compile step
jakobwesthoff May 9, 2012
849cd96
Added base compile build config template
jakobwesthoff May 9, 2012
2cad8c7
Introduced basic structure of new optimize build step
jakobwesthoff May 10, 2012
c0c4039
Rearranged processing to put optimize between test and package
jakobwesthoff May 10, 2012
c09093c
Added optimizedir to basic infrastructure
jakobwesthoff May 10, 2012
da07bc0
Renamed optimize step to bundle step after discussion with @kore
jakobwesthoff May 10, 2012
73866ad
Introduced commons.srcdir.htdocs for htdocs data
jakobwesthoff May 10, 2012
83b8c1f
Implemented proper bundle directory initialization
jakobwesthoff May 10, 2012
bccab4c
Adapted packaging to use bundled sources
jakobwesthoff May 10, 2012
c4ba0e9
Adapted archive extension to use bundled data
jakobwesthoff May 10, 2012
0f738fa
Merge branch 'feat/pre-packaging' into feat/requirejs
jakobwesthoff May 10, 2012
5974dbf
Renamed requirejs.compiler.prefix to reflect in which step it is used
jakobwesthoff May 10, 2012
54a8445
Made requirejs compiled output configurable
jakobwesthoff May 10, 2012
079aace
Used new `commons.srcdir.htdocs` instead of `commons.sitedir`
jakobwesthoff May 11, 2012
8167876
Renamed `requirejs:compile` to `requirejs:bundle` to fit the new nami…
jakobwesthoff May 11, 2012
1b1085d
Refactored javascript task to plain ant
jakobwesthoff May 11, 2012
d19ff69
Implemented replacement of all javascript files inside the project wi…
jakobwesthoff May 11, 2012
3d1997a
Optimizing loader plugin data by default
jakobwesthoff May 11, 2012
267b43c
Merge pull request #1 from Qafoo/feat/flexible-task-execution
manuelpichler May 21, 2012
299e687
Merge branch 'feat/flexible-task-execution' of github.com:Qafoo/build…
manuelpichler May 21, 2012
96292d2
Merge pull request #2 from Qafoo/feat/pre-packaging
manuelpichler May 21, 2012
ec1df01
Merge branch 'feat/pre-packaging' of github.com:Qafoo/build-commons
manuelpichler May 21, 2012
83f9c86
Merge pull request #3 from Qafoo/feat/requirejs
manuelpichler May 21, 2012
891e446
Merge branch 'feat/requirejs' of github.com:Qafoo/build-commons
manuelpichler May 21, 2012
50cbaf8
Added default state for requirejs
jakobwesthoff May 21, 2012
b765d45
Made requirejs:bootstrap availabilty and enabled aware
jakobwesthoff May 21, 2012
6c8d570
Made requirejs:bundle availability and enabled aware
jakobwesthoff May 21, 2012
8ade4ca
Fixed dependency order of requirejs:bundle tasks
jakobwesthoff May 21, 2012
744910a
Merge pull request #8 from Qafoo/feat/requirejs-availability
jakobwesthoff May 21, 2012
2b06ae0
Added initial resources for requirejs extension
jakobwesthoff Apr 17, 2012
73950d4
Added executable configuration for rhino
jakobwesthoff Apr 17, 2012
ae35e77
Implemented first version of requirejs bootstrapping
jakobwesthoff Apr 18, 2012
77442c7
Added correct rhino executable name
jakobwesthoff Apr 18, 2012
63db51a
Added possibility to configure and add loaders
jakobwesthoff Apr 18, 2012
3bb4387
Documented and cleaned up requirejs extension
jakobwesthoff Apr 18, 2012
fc565da
Refactored combined file creation to all attachment of entrypoint loader
jakobwesthoff Apr 18, 2012
b18af51
Fixed check for existing js source directory
jakobwesthoff Apr 18, 2012
70965a5
Fixed template variable name for buildfile
jakobwesthoff Apr 18, 2012
4831cd0
Implemented loading of initial entrypoint
jakobwesthoff Apr 18, 2012
2641587
Changed entrypoint to be relative to sitedir and created correct runt…
jakobwesthoff Apr 18, 2012
3cd6611
Made the entrypoint/baseUrl configuration absolute, as it is always r…
jakobwesthoff Apr 19, 2012
6c4d4a6
Implemented generic availability extension
jakobwesthoff Apr 19, 2012
4fd35be
Only execute codesniffer if a php srcdir is available
jakobwesthoff Apr 19, 2012
abf8b7f
Fixed wrong property naming
jakobwesthoff Apr 19, 2012
c1cb56d
Made sure jshint is only executed if js srcdir is present
jakobwesthoff Apr 19, 2012
5a9803b
jslint is only executed if javascript srcdir is present
jakobwesthoff Apr 19, 2012
32750bf
Only run jstestdriver tasks if javascript testdir is available
jakobwesthoff Apr 19, 2012
3a7c796
Only execute pdepend if php srcdir is available
jakobwesthoff Apr 19, 2012
cdb3b0e
Removed php extension
jakobwesthoff Apr 19, 2012
1f3c500
Refactored phpunit tasks to use new availability extension
jakobwesthoff Apr 19, 2012
9f90eb0
Refactored sonar tasks to use new availability extension
jakobwesthoff Apr 19, 2012
cfa270a
Only run phpcb if php srcdir is available
jakobwesthoff Apr 19, 2012
54a0050
Only run phpcpd if php srcdir is available
jakobwesthoff Apr 19, 2012
78edf12
Only execute phpmd if php srcdir is available
jakobwesthoff Apr 19, 2012
b5aa97e
Only execute phploc if php srcdir is available
jakobwesthoff Apr 19, 2012
413f44f
Implemented generic macro to execute antcall if properties are enabled
jakobwesthoff Apr 20, 2012
9ab8db7
Changed archive extension to use new `enabled` extension
jakobwesthoff Apr 20, 2012
f57b579
Added enabled flag to codesniffer
jakobwesthoff Apr 20, 2012
8b1623c
Made the enabled.antcall macro feature complete in comparison to a re…
jakobwesthoff Apr 20, 2012
4afe6b9
Hooked jshint into the compile step, but disabled it by default
jakobwesthoff Apr 20, 2012
cd1efed
Hooked jslint into the compile step and enabled it by default
jakobwesthoff Apr 20, 2012
b87cbe7
Implemented log output if a target is skipped due to being disabled
jakobwesthoff Apr 20, 2012
befdcf8
Hooked jstestdriver into the testing step
jakobwesthoff Apr 20, 2012
6049854
Allowed pdepend to be disabled
jakobwesthoff Apr 20, 2012
84622b6
Implemented log output of property value in case something is disabled
jakobwesthoff Apr 20, 2012
67ceac4
Allowed for phpcb to be disabled
jakobwesthoff Apr 20, 2012
5ab0e89
Allowed phpcpd to be disabled
jakobwesthoff Apr 20, 2012
2a5edf0
Allowed phploc to be disabled
jakobwesthoff Apr 20, 2012
2a8a7ae
Allowed phpmd to be disabled
jakobwesthoff Apr 20, 2012
f259f66
Allowed phpunit to be disabled
jakobwesthoff Apr 20, 2012
28b7833
Realigned and cleaned up defaults.properties
jakobwesthoff Apr 20, 2012
d9ffa8a
Added some help documentation to the requirejs module, before startin…
jakobwesthoff Apr 20, 2012
de71276
Started splitting the requirejs extension into different sub extensions
jakobwesthoff Apr 20, 2012
a051b2d
Made bootstrap config template configurable and switched to ants defa…
jakobwesthoff May 9, 2012
9b10097
Moved loader build config creation into main module
jakobwesthoff May 9, 2012
8ded7d0
Implemented requirejs compile step
jakobwesthoff May 9, 2012
9bf91e4
Added base compile build config template
jakobwesthoff May 9, 2012
63dae99
Introduced basic structure of new optimize build step
jakobwesthoff May 10, 2012
e961e27
Rearranged processing to put optimize between test and package
jakobwesthoff May 10, 2012
b0f8ef2
Added optimizedir to basic infrastructure
jakobwesthoff May 10, 2012
b5e5d1e
Renamed optimize step to bundle step after discussion with @kore
jakobwesthoff May 10, 2012
f4b150f
Introduced commons.srcdir.htdocs for htdocs data
jakobwesthoff May 10, 2012
cf7d866
Implemented proper bundle directory initialization
jakobwesthoff May 10, 2012
266a77f
Adapted packaging to use bundled sources
jakobwesthoff May 10, 2012
25ff288
Adapted archive extension to use bundled data
jakobwesthoff May 10, 2012
09ab783
Renamed requirejs.compiler.prefix to reflect in which step it is used
jakobwesthoff May 10, 2012
5492b96
Made requirejs compiled output configurable
jakobwesthoff May 10, 2012
6cade53
Used new `commons.srcdir.htdocs` instead of `commons.sitedir`
jakobwesthoff May 11, 2012
0b6f053
Renamed `requirejs:compile` to `requirejs:bundle` to fit the new nami…
jakobwesthoff May 11, 2012
5db0e0d
Refactored javascript task to plain ant
jakobwesthoff May 11, 2012
4837c1a
Implemented replacement of all javascript files inside the project wi…
jakobwesthoff May 11, 2012
379122f
Optimizing loader plugin data by default
jakobwesthoff May 11, 2012
32f60be
Added default state for requirejs
jakobwesthoff May 21, 2012
17fedf3
Made requirejs:bootstrap availabilty and enabled aware
jakobwesthoff May 21, 2012
bea4565
Made requirejs:bundle availability and enabled aware
jakobwesthoff May 21, 2012
800003d
Fixed dependency order of requirejs:bundle tasks
jakobwesthoff May 21, 2012
132d8d2
Merge branch 'master' of github.com:Qafoo/build-commons
jakobwesthoff May 21, 2012
2a53c60
Added current version of the wro4j-runner
jakobwesthoff May 11, 2012
9e81522
Added default properties for wro4j
jakobwesthoff May 11, 2012
4dbe7c3
Added default single file template
jakobwesthoff May 11, 2012
7f6fd5a
WIP version of the wro4j extension
jakobwesthoff May 11, 2012
f2730b6
Fixed the wro4j execution. It's working now yeah!
jakobwesthoff May 11, 2012
01a646a
Created multiple file template
jakobwesthoff May 11, 2012
630decf
Implemented macro and target to execute wro4j on multiple files
jakobwesthoff May 11, 2012
912f691
Implemented unescaping the file structure after processing. Eat this …
jakobwesthoff May 11, 2012
9654ca6
Implemented first version of wro4j:minified step
jakobwesthoff May 21, 2012
26faaaf
Added proper xml processing instructions
jakobwesthoff May 21, 2012
57f35a3
Added predefined wro4j minifying processor
jakobwesthoff May 21, 2012
be78f0e
Fixed some property typos ;)
jakobwesthoff May 21, 2012
f3acc2e
Merge branch 'master' of github.com:Qafoo/build-commons
manuelpichler May 21, 2012
34b3205
Added: Default settings for the sonar extension.
manuelpichler May 21, 2012
6e09824
Added: Default settings for the sonar extension.
manuelpichler May 21, 2012
447a821
Implemented original file replacement after wro4j minification
jakobwesthoff May 21, 2012
3c330c8
Removed phplint from compile step
jakobwesthoff May 22, 2012
56f6860
Implemented phplint as separate extension
jakobwesthoff May 22, 2012
57f7753
Made sure metadata file is deleted on failed linting run
jakobwesthoff May 22, 2012
1b71ec5
Exclude SCM and build related directories while preparing the bundle …
jakobwesthoff May 22, 2012
a6e3552
Implemented proof of concept for parallel execution of extension-points
jakobwesthoff May 22, 2012
f499f3a
Adapted verify step to use newly created parallel execution feature
jakobwesthoff May 22, 2012
fddd2a6
Adapted phpunit to new parallel extension-point system
jakobwesthoff May 22, 2012
cf44a7a
Adapted phpmd to new parallel extension-point system
jakobwesthoff May 22, 2012
f5b4c8d
Adapted phploc to new parallel extension-point system
jakobwesthoff May 22, 2012
aa0e309
Adapted phpcpd to new parallel extension-point system
jakobwesthoff May 22, 2012
1799d98
Adapted pdepend to new parallel extension-point system
jakobwesthoff May 22, 2012
4bc1158
Adapted codesniffer to new parallel extension-point system
jakobwesthoff May 22, 2012
94412f3
Bundled rhino and all execution relevant libraries with build-commons
jakobwesthoff May 23, 2012
c4d84a3
Implemented macro to easily execute javascript using the distributed …
jakobwesthoff May 23, 2012
1d6a0dc
Added macro to define script tasks using the distributed scripting en…
jakobwesthoff May 23, 2012
a98a4e8
Switched parallel extensionpoint task over to build-commons rhino
jakobwesthoff May 23, 2012
d17575e
Fixed typo in macro attribute
jakobwesthoff May 23, 2012
71aa2d2
Switched requirejs inline scripts to new internal script engine
jakobwesthoff May 23, 2012
c747ce5
Moved base macros over to their own file
jakobwesthoff May 23, 2012
a92e7fa
Implemented macro to easily execute bundled rhino
jakobwesthoff May 23, 2012
bc1e207
Modified requirejs extension to use bundled rhino
jakobwesthoff May 23, 2012
3e6f82d
Implemented phpab extension
jakobwesthoff May 23, 2012
9798b8b
Disabled phpab by default
jakobwesthoff May 23, 2012
03fe7ef
Remove old autoload files before regenerating
jakobwesthoff May 23, 2012
f705057
Merge pull request #10 from Qafoo/feat/phpab
jakobwesthoff May 30, 2012
20b9362
Merge pull request #5 from Qafoo/feat/parallel-extension-points
jakobwesthoff May 30, 2012
75e0bb3
Merge pull request #12 from Qafoo/feat/exclude-scm-files
jakobwesthoff May 30, 2012
fd2228f
Merge pull request #4 from Qafoo/feat/phplint
jakobwesthoff May 30, 2012
531c4a3
Merge pull request #9 from Qafoo/feat/wro4j
jakobwesthoff May 30, 2012
d098bbe
Merge remote-tracking branch 'qafoo/master'
manuelpichler May 30, 2012
df3f5ca
Fixed: Only set test dir when no phpunit.xml exists.
manuelpichler May 31, 2012
4e1559e
Fixed: Broken handling of PHPUnit's phpunit.xml file
manuelpichler May 31, 2012
fa21334
Try to run jsTestDriver headless
manuelpichler Jun 14, 2012
8b14537
Debug flag added.
manuelpichler Jun 14, 2012
72c5037
Run jstestdriver headless, when -Dheadless=true is set
manuelpichler Jun 14, 2012
d327397
Script is now executable again.
manuelpichler Jun 14, 2012
26c9f73
Fixed: Cleanup temporary requireJS resources.
manuelpichler Jun 14, 2012
ced0b64
Fixed: In process fork of JsTestDriver.
manuelpichler Jun 14, 2012
4ab845f
Fixed: Disable this fancy JS and CSS stuff by default.
manuelpichler Jun 14, 2012
c788d86
Added: Basic documentation overview
kore Jun 19, 2012
df714da
Added: Documentation stub generator
kore Jun 19, 2012
2c47913
Added: Generated extension documentation stubs
kore Jun 19, 2012
81602f2
Added trivial target to build HTML site
kore Jun 19, 2012
8298a7e
Switched to basic theme for now
kore Jun 19, 2012
6109904
Configured HTML output
kore Jun 19, 2012
5309c96
Use html links in source
kore Jun 19, 2012
11ca3c7
Added gh-pages as submodule under src/site/html
kore Jun 23, 2012
84e0c7f
Generated website
kore Jun 23, 2012
3628eac
Updated gh-pages submodule
kore Jun 23, 2012
bcdee88
Improved output with custom style
kore Jun 25, 2012
9b6d22d
Documented standard build chain
kore Jun 25, 2012
b866992
Documented basic project properties
kore Jun 25, 2012
9313ad2
Documented standard project setup
kore Jun 25, 2012
6b3090d
Started writing use cases, finished use case: PHP library
kore Jun 25, 2012
f1c9078
Spell checking
kore Jun 25, 2012
0cc0a3d
Updated html site
kore Jun 25, 2012
d8d5714
Removed submodel (because I fucked up)
kore Jun 25, 2012
058d936
Readded gh-pages submodule
kore Jun 25, 2012
44e673c
Updated html site
kore Jun 25, 2012
c50767a
Updated website
kore Jun 25, 2012
34765d0
Fixed SVN externals URL
kore Jun 27, 2012
f1d78b6
Fixed: Error handling in Javascript parallel extension.
manuelpichler Jun 27, 2012
5638182
Merge branch 'master' of github.com:Qafoo/build-commons
manuelpichler Jun 27, 2012
595191c
Fixed: Use public HTTPS url for the page.
manuelpichler Jul 3, 2012
d9e6a72
Fixed call to submodule add (which was init before)
hco Jul 12, 2012
9e05103
Merge pull request #17 from hco/patch-1
kore Jul 18, 2012
ee84b70
Fixes #18: jslint does not used bundled rhino
kore Aug 28, 2012
3be3fad
Use commons.script and removed debug output
kore Aug 28, 2012
c93b5c5
Merge pull request #19 from Qafoo/18-jslint-rhino
kore Aug 28, 2012
0e2946e
Added: Initial version of a ABC composer extension.
manuelpichler Aug 28, 2012
817b514
Merge branch 'master' of git://github.com/Qafoo/build-commons into HEAD
manuelpichler Aug 28, 2012
3d3c759
Fixed: Remove composer installer on exit
manuelpichler Aug 28, 2012
a466912
Added: New Vagrant extension.
manuelpichler Aug 31, 2012
0a71604
Added: New macro to calculate relative paths.
manuelpichler Aug 31, 2012
a1f8807
Fixed: Only update composer dependencies on *.lock change
manuelpichler Aug 31, 2012
c12db26
Added: blank line at the of the source files.
manuelpichler Sep 3, 2012
e3a019a
Implemented: Multiple project generate script.
manuelpichler Sep 3, 2012
8f45693
Directory renamed.
manuelpichler Sep 3, 2012
666b9de
added qunit/grunt extension
Sep 11, 2012
c7f5756
Merge branch 'master' of github.com:Qafoo/build-commons into qunit
Sep 12, 2012
b5e8830
added check for availability of gruntfile
Sep 12, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/resources/defaults.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ phploc.enabled = true
phpmd.enabled = true

phpunit.enabled = true
qunit.enabled = true

; phpab is a nice tool but not used for all projects, therefore it is off by
; default
Expand Down
Binary file not shown.
3 changes: 3 additions & 0 deletions src/main/resources/extensions/qunit/qunit.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
qunit.package.name = grunt
qunit.executable.grunt = grunt
qunit.gruntjsdir = ${basedir}
Binary file not shown.
87 changes: 87 additions & 0 deletions src/main/xml/exts/qunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="ant-build-commons-extensions-qunit">

<!--
Import default properties for this extension.
-->
<property file="${resourcedir}/extensions/qunit/qunit.properties" />

<!--
Import utilized extensions
-->
<import file="enabled.xml" />
<import file="npm.xml" />

<!--
Shortcut for the "qunit:qunit" target.
-->
<target name="qunit" depends="qunit:qunit" />

<!--
This target will run all tests for the current project.
-->
<target name="qunit:qunit">
<common.enabled.antcall target="-qunit:run"
property="qunit.enabled" />
</target>

<target name="-qunit:run"
depends="-qunit:install-or-upgrade,
-qunit:run-testsuite" />

<target name="-qunit:is-gruntfile-present">
<condition property="-qunit:out-gruntfile-present">
<available file="${qunit.gruntjsdir}/grunt.js" />
</condition>
</target>

<target name="-qunit:run-testsuite"
if="-qunit:out-gruntfile-present"
depends="-qunit:is-gruntfile-present">

<exec executable="${qunit.executable.grunt}"
failonerror="true"
dir="${qunit.gruntjsdir}">

<arg value="jsunit" />
</exec>

</target>

<target name="-qunit:install-or-upgrade"
depends="-qunit:is-installed,
-qunit:install,
-qunit:upgrade" />

<target name="-qunit:install" unless="-qunit:out-installed">
<antcall target="npm:install">
<param name="in.npm.package.name" value="${qunit.package.name}" />
</antcall>
</target>

<target name="-qunit:upgrade" if="-qunit:out-installed">
<antcall target="npm:upgrade">
<param name="in.npm.package.name" value="${qunit.package.name}" />
</antcall>
</target>

<target name="-qunit:is-installed">
<condition property="-qunit:out-installed">
<available file="${npm.local.modulesdir}/${qunit.package.name}" />
</condition>
</target>


<!--
EXTENSION POINTS UTILIZED BY THIS MODULE
-->

<!--
This target will hook the the "qunit:qunit" target into the main TEST
build-step
-->
<target name="-qunit:test:main~hooked"
depends="qunit:qunit"
extensionOf="-test:main~hook" />

</project>