From a96f1697ddc9da5004c59fb2bd1e356a1378531b Mon Sep 17 00:00:00 2001 From: Nicolas Brassard Date: Fri, 5 Dec 2014 16:54:45 -0500 Subject: [PATCH] Trying to integrate flow Basic config for flow. Not working for now. Re: #31 --- workspace/assets/.flowconfig | 6 ++++++ workspace/assets/Gruntfile.js | 6 +++++- workspace/assets/js/dev/dev.js | 5 +++++ workspace/assets/package.json | 3 ++- 4 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 workspace/assets/.flowconfig diff --git a/workspace/assets/.flowconfig b/workspace/assets/.flowconfig new file mode 100644 index 00000000..a67a489b --- /dev/null +++ b/workspace/assets/.flowconfig @@ -0,0 +1,6 @@ +# .flowconfig +[include] +.*/js + +[libs] +.*/js/lib \ No newline at end of file diff --git a/workspace/assets/Gruntfile.js b/workspace/assets/Gruntfile.js index e60c4d69..b4236941 100644 --- a/workspace/assets/Gruntfile.js +++ b/workspace/assets/Gruntfile.js @@ -193,6 +193,10 @@ module.exports = function (grunt) { } }, + flow: { + options: {} + }, + analyzecss: { prod: { sources: [ @@ -325,7 +329,7 @@ module.exports = function (grunt) { }); // Default tasks. - grunt.registerTask('dev', ['jshint', 'complexity']); + grunt.registerTask('dev', ['jshint', 'complexity', 'flow']); grunt.registerTask('js', ['concat:sources', 'uglify', 'concat:libs']); grunt.registerTask('bundle', ['clean:bundle', 'concat:lessLibs', 'concat:lessCore']); grunt.registerTask('css', ['bundle', 'less', 'usebanner', 'csslint', 'analyzecss']); diff --git a/workspace/assets/js/dev/dev.js b/workspace/assets/js/dev/dev.js index f24ee9ac..4eae9d90 100644 --- a/workspace/assets/js/dev/dev.js +++ b/workspace/assets/js/dev/dev.js @@ -14,4 +14,9 @@ $(window).trigger('resize'); }); + function x(x) { + return x * 10; + } + x('allo'); + })(jQuery, window); \ No newline at end of file diff --git a/workspace/assets/package.json b/workspace/assets/package.json index 5de7bcb8..96b6a838 100644 --- a/workspace/assets/package.json +++ b/workspace/assets/package.json @@ -23,11 +23,12 @@ "grunt-contrib-clean": "~0.5.0", "grunt-contrib-concat": "~0.4.0", "grunt-contrib-copy": "~0.5.0", + "grunt-contrib-csslint": "^0.2.0", "grunt-contrib-jshint": "~0.10.0", "grunt-contrib-less": "~0.12.0", "grunt-contrib-uglify": "~0.4.0", "grunt-contrib-watch": "~0.6.1", - "grunt-contrib-csslint": "^0.2.0", + "grunt-flow": "0.0.3", "matchdep": "~0.3.0" } }