Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
data
/vendor/
public/assets/vendor/
node_modules
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ php:
install:
- composer self-update
- composer install --dev --prefer-source
- npm install -g bower
- npm install -g gulp
- npm install

before_script:
- mkdir -p build/logs

script:
- npm test
- ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml
- ./vendor/bin/phpcs --standard=PSR2 ./src/
- ./vendor/bin/phpcs --standard=PSR2 ./test/
Expand Down
7 changes: 5 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
"**/.*"
],
"dependencies": {
"angular": "~1.2.12",
"angular-bootstrap": "~0.10.0"
"angular": "~1.*",
"angular-resource": "~1.2.x",
"angular-bootstrap": "~0.10.0",
"angular-animate": "1.*",
"moment": "~2.7.0"
},
"devDependencies": {
"jasmine": "~2.0.0"
Expand Down
21 changes: 15 additions & 6 deletions config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,27 @@
'router' => [
'routes' => [
'flexi-time' => [
'type' => 'segment',
'type' => 'literal',
'options' => [
'route' => '/flexi-time[/][:action][/:id]',
'constraints' => [
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'id' => '[0-9]+',
],
'route' => '/flexi-time',
'defaults' => [
'controller' => 'JhFlexiTime\Controller\Booking',
'action' => 'list',
],
],
'may_terminate' => true,
'child_routes' => [
'list' => [
'type' => 'literal',
'options' => [
'route' => '/list',
'defaults' => [
'controller' => 'JhFlexiTime\Controller\Booking',
'action' => 'list',
],
],
],
],
],
'flexi-time-rest' => [
'type' => 'segment',
Expand Down
49 changes: 49 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
var gulp = require("gulp");
var jshint = require("gulp-jshint");
var uglify = require("gulp-uglify");
var concat = require("gulp-concat");
var rename = require("gulp-rename");
var ngmin = require("gulp-ngmin");
var watch = require("gulp-watch");

var src = {
client: [
"public/js/src/flexitime.js",
"public/js/src/controllers/*.js",
"public/js/src/filters/*.js",
"public/js/src/directives/*.js",
"public/js/src/services/*.js",
"public/js/src/Factory.js"
]
};

gulp.task("build-lib", function () {
return gulp.src(src.client)
.pipe(concat("flexitime.js"))
//.pipe(ngmin({dynamic:true}))
.pipe(gulp.dest("./public/js/dist"))
.pipe(rename("flexitime.min.js"))
//.pipe(uglify())
.pipe(gulp.dest("./public/js/dist"));
});

gulp.task('lint', function () {
gulp.src(src.client)
.pipe(jshint())
.pipe(jshint.reporter("default"))
.pipe(jshint.reporter("fail"));
});

gulp.task('lint-dev', function () {
gulp.src(src.client)
.pipe(jshint())
.pipe(jshint.reporter("default"));
});



gulp.task('default', ['lint', 'build-lib']);

gulp.task("dev", function () {
gulp.watch(src.client, ['lint-dev', 'build-lib']);
});
46 changes: 46 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "wearejh-flexitime",
"description": "Flextime frontend",
"version": "0.0.2",
"homepage": "https://github.com/WeareJH/Flexitime",
"author": {
"name": "Aydin Hassan",
"email": "aydin@hotmail.co.uk"
},
"repository": {
"type": "git",
"url": "git@github.com:WeareJH/Flexitime.git"
},
"bugs": {
"url": "https://github.com/WeareJH/Flexitime/issues"
},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/WeareJH/Flexitime/blob/master/LICENSE"
}
],
"engines": {
"node": ">= 0.10.0"
},
"scripts": {
"test": "bower install && gulp"
},
"devDependencies": {
"karma": "~0.12.16",
"karma-firefox-launcher": "~0.1.3",
"karma-html2js-preprocessor": "~0.1.0",
"karma-coverage": "~0.2.4",
"karma-chrome-launcher": "~0.1.4",
"gulp-uglify": "~0.3.0",
"gulp-jshint": "~1.6.1",
"gulp": "~3.7.0",
"gulp-rename": "~1.2.0",
"gulp-concat": "~2.2.0",
"gulp-ngmin": "~0.3.0",
"gulp-watch": "~0.6.0",
"browser-sync": "~0.9.1"
},
"keywords": [],
"dependencies": {}
}
Loading