diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 2b81722..09357a7 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,37 +2,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -54,21 +27,11 @@ - - - - - - - - - - - + - - + + @@ -79,8 +42,21 @@ - - + + + + + + + + + + + + + + + @@ -89,40 +65,60 @@ - + - - - - - - - - - - - - + + - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -142,10 +138,11 @@ @@ -157,9 +154,9 @@ @@ -220,6 +217,42 @@ - - + - + - + @@ -545,14 +596,6 @@ - - - - - - - - @@ -585,49 +628,100 @@ - + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GulpFile.js b/GulpFile.js index 77104ae..f027118 100644 --- a/GulpFile.js +++ b/GulpFile.js @@ -28,6 +28,7 @@ var sources = { html : "src/html/*.html", htmls : "src/html/**/*.html", distIndex: "dist/index.html", + json : "src/json/*.json", js : "src/scripts/*.js", jsAll : "src/scripts/**/*.js", coffee : "src/coffee/*.coffee" @@ -35,6 +36,7 @@ var sources = { var destinations = { sass : "dist/css/", html : "dist/", + json : "dist/json", coffee: "dist/coffee/", js : "dist/js/", doc : "dist/doc/" @@ -108,6 +110,7 @@ gulp.task('watch', function () { gulp.watch(sources.sass, ['sass2css']); gulp.watch('bower.json', ['wiredep']); gulp.watch(sources.html, ['html_transform']); + gulp.watch(sources.htmls, ['html_transform']); // gulp.watch(sources.htmls, ['html','wiredep']); gulp.watch(sources.coffee, ['coffee2js', 'test']); @@ -118,9 +121,11 @@ gulp.task('lint', function () { .pipe(jshint.reporter('jshint-stylish')); }); - gulp.task("html_transform", function () { console.log("html was changed"); + gulp.src(sources.json) + .pipe(gulp.dest(destinations.json)); + gulp.src([sources.htmls, sources.html]) .pipe(gulp.dest(destinations.html)) .pipe(browserSync.stream()); @@ -137,6 +142,6 @@ gulp.task('wiredep', ['html_transform'], function () { .pipe(gulp.dest(destinations.html)) ; }); -gulp.task("default", [ "wiredep","coffee2js", "sass2css", "lint", "browser-sync", "imagemin", "watch"], function () { +gulp.task("default", ['html_transform', "wiredep", "coffee2js", "sass2css", "lint", "browser-sync", "imagemin", "watch"], function () { console.log("spartiiiii"); }); diff --git a/src/coffee/main.coffee b/src/coffee/main.coffee index de7db2c..3b7f623 100644 --- a/src/coffee/main.coffee +++ b/src/coffee/main.coffee @@ -2,13 +2,16 @@ # here we do stuff ### angular.module "tkApp", [] -.controller("MainCtrl", ($scope)-> +.controller("MainCtrl", ($scope, $http)-> ### # scoped variables ### $scope.demo = 'WOHOOO angular ça marche' + $http.get('json/squares.json').then( (data)-> + $scope.config = data.data + ) ### # scoped functions ### diff --git a/src/html/index.html b/src/html/index.html index 1371afb..e1c76b5 100644 --- a/src/html/index.html +++ b/src/html/index.html @@ -56,7 +56,7 @@

- Getting started: + Comment jouer:

@@ -64,7 +64,20 @@
+
+
+ {{s.text}} +
+
+
+      config :
+      	{{config|json}}
+      
Code disponible sur mon github tykayn
diff --git a/src/sass/_global.scss b/src/sass/_global.scss index e69de29..1eb1bf3 100644 --- a/src/sass/_global.scss +++ b/src/sass/_global.scss @@ -0,0 +1,14 @@ +#board{ + border: solid 3px $blue; + background: $white; +} +.square{ + &:hover{ + background: $blue; + color: $white; + } + &.active{ + background: $dark; + color: $white; + } +} diff --git a/src/tests/spec/app.js b/src/tests/spec/app.js index 98699aa..e99be3d 100644 --- a/src/tests/spec/app.js +++ b/src/tests/spec/app.js @@ -14,7 +14,7 @@ describe("A suite", function () { describe('Controller: MainCtrl', function () { // load the controller's module - beforeEach(module('myApp')); + beforeEach(module('tkApp')); var MainCtrl, scope; scope = 1; @@ -36,4 +36,4 @@ describe('Controller: MainCtrl', function () { expect(scope).toBeDefined(); }); -}); \ No newline at end of file +});