From 79bfff024d818e3f5a368133028702ca38886c5d Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Fri, 5 Jun 2015 14:19:44 -0700 Subject: [PATCH] Run build sequentially --- dist/json-formatter.css | 16 +++++++-------- dist/json-formatter.js | 2 +- dist/json-formatter.min.css | 4 ++-- dist/json-formatter.min.js | 7 +++++++ gulpfile.js | 41 ++++++++++++++++++++----------------- package.json | 3 ++- 6 files changed, 42 insertions(+), 31 deletions(-) create mode 100644 dist/json-formatter.min.js diff --git a/dist/json-formatter.css b/dist/json-formatter.css index 591ff77..d8edf22 100644 --- a/dist/json-formatter.css +++ b/dist/json-formatter.css @@ -1,7 +1,7 @@ /*! * jsonformatter * - * Version: 0.2.7 - 2015-06-02T21:39:36.129Z + * Version: 0.2.7 - 2015-06-05T21:19:07.022Z * License: MIT */ @@ -12,7 +12,7 @@ .json-formatter-row, .json-formatter-row a, .json-formatter-row a:hover { - color: #000000; + color: black; text-decoration: none; } .json-formatter-row .json-formatter-row { @@ -29,15 +29,15 @@ content: "[]"; } .json-formatter-row .string { - color: #008000; + color: green; white-space: pre; word-wrap: break-word; } .json-formatter-row .number { - color: #0000ff; + color: blue; } .json-formatter-row .boolean { - color: #ff0000; + color: red; } .json-formatter-row .null { color: #855a00; @@ -53,11 +53,11 @@ } .json-formatter-row .url { text-decoration: underline; - color: #0000ff; + color: blue; cursor: pointer; } .json-formatter-row .bracket { - color: #0000ff; + color: blue; } .json-formatter-row .key { color: #00008b; @@ -87,7 +87,7 @@ .json-formatter-dark.json-formatter-row, .json-formatter-dark.json-formatter-row a, .json-formatter-dark.json-formatter-row a:hover { - color: #ffffff; + color: white; text-decoration: none; } .json-formatter-dark.json-formatter-row .json-formatter-row { diff --git a/dist/json-formatter.js b/dist/json-formatter.js index 91a0525..600bd65 100644 --- a/dist/json-formatter.js +++ b/dist/json-formatter.js @@ -1,7 +1,7 @@ /*! * jsonformatter * - * Version: 0.2.7 - 2015-06-02T21:39:36.121Z + * Version: 0.2.7 - 2015-06-05T21:19:07.015Z * License: MIT */ diff --git a/dist/json-formatter.min.css b/dist/json-formatter.min.css index fec87c1..d6ca0e9 100644 --- a/dist/json-formatter.min.css +++ b/dist/json-formatter.min.css @@ -1,6 +1,6 @@ /*! * jsonformatter * - * Version: 0.2.7 - 2015-06-02T21:39:36.129Z + * Version: 0.2.7 - 2015-06-05T21:19:07.022Z * License: MIT - */.json-formatter-row{font-family:monospace}.json-formatter-row,.json-formatter-row a,.json-formatter-row a:hover{color:#000;text-decoration:none}.json-formatter-row .json-formatter-row{margin-left:1em}.json-formatter-row .children.empty{opacity:.5;margin-left:1em}.json-formatter-row .children.empty.object:after{content:"No properties"}.json-formatter-row .children.empty.array:after{content:"[]"}.json-formatter-row .string{color:green;white-space:pre;word-wrap:break-word}.json-formatter-row .number{color:#00f}.json-formatter-row .boolean{color:red}.json-formatter-row .null{color:#855a00}.json-formatter-row .undefined{color:#ca0b69}.json-formatter-row .function{color:#ff20ed}.json-formatter-row .date{background-color:rgba(0,0,0,.05)}.json-formatter-row .url{text-decoration:underline;color:#00f;cursor:pointer}.json-formatter-row .bracket{color:#00f}.json-formatter-row .key{color:#00008b;cursor:pointer}.json-formatter-row .constructor-name{cursor:pointer}.json-formatter-row .toggler{font-size:.8em;line-height:1.2em;vertical-align:middle;opacity:.6;cursor:pointer}.json-formatter-row .toggler:after{display:inline-block;transition:transform 100ms ease-in;content:"►"}.json-formatter-row .toggler.open:after{transform:rotate(90deg)}.json-formatter-dark.json-formatter-row{font-family:monospace}.json-formatter-dark.json-formatter-row,.json-formatter-dark.json-formatter-row a,.json-formatter-dark.json-formatter-row a:hover{color:#fff;text-decoration:none}.json-formatter-dark.json-formatter-row .json-formatter-row{margin-left:1em}.json-formatter-dark.json-formatter-row .children.empty{opacity:.5;margin-left:1em}.json-formatter-dark.json-formatter-row .children.empty.object:after{content:"No properties"}.json-formatter-dark.json-formatter-row .children.empty.array:after{content:"[]"}.json-formatter-dark.json-formatter-row .string{color:#31f031;white-space:pre;word-wrap:break-word}.json-formatter-dark.json-formatter-row .number{color:#66c2ff}.json-formatter-dark.json-formatter-row .boolean{color:#ec4242}.json-formatter-dark.json-formatter-row .null{color:#eec97d}.json-formatter-dark.json-formatter-row .undefined{color:#ef8fbe}.json-formatter-dark.json-formatter-row .function{color:#fd48cb}.json-formatter-dark.json-formatter-row .date{background-color:rgba(255,255,255,.05)}.json-formatter-dark.json-formatter-row .url{text-decoration:underline;color:#027bff;cursor:pointer}.json-formatter-dark.json-formatter-row .bracket{color:#9494ff}.json-formatter-dark.json-formatter-row .key{color:#23a0db;cursor:pointer}.json-formatter-dark.json-formatter-row .constructor-name{cursor:pointer}.json-formatter-dark.json-formatter-row .toggler{font-size:.8em;line-height:1.2em;vertical-align:middle;opacity:.6;cursor:pointer}.json-formatter-dark.json-formatter-row .toggler:after{display:inline-block;transition:transform 100ms ease-in;content:"►"}.json-formatter-dark.json-formatter-row .toggler.open:after{transform:rotate(90deg)} \ No newline at end of file + */.json-formatter-dark.json-formatter-row,.json-formatter-row{font-family:monospace}.json-formatter-dark.json-formatter-row .toggler.open:after,.json-formatter-row .toggler.open:after{transform:rotate(90deg)}.json-formatter-row,.json-formatter-row a,.json-formatter-row a:hover{color:#000;text-decoration:none}.json-formatter-row .json-formatter-row{margin-left:1em}.json-formatter-row .children.empty{opacity:.5;margin-left:1em}.json-formatter-row .children.empty.object:after{content:"No properties"}.json-formatter-row .children.empty.array:after{content:"[]"}.json-formatter-row .string{color:green;white-space:pre;word-wrap:break-word}.json-formatter-row .number{color:#00f}.json-formatter-row .boolean{color:red}.json-formatter-row .null{color:#855a00}.json-formatter-row .undefined{color:#ca0b69}.json-formatter-row .function{color:#ff20ed}.json-formatter-row .date{background-color:rgba(0,0,0,.05)}.json-formatter-row .url{text-decoration:underline;color:#00f;cursor:pointer}.json-formatter-row .bracket{color:#00f}.json-formatter-row .key{color:#00008b;cursor:pointer}.json-formatter-row .constructor-name{cursor:pointer}.json-formatter-row .toggler{font-size:.8em;line-height:1.2em;vertical-align:middle;opacity:.6;cursor:pointer}.json-formatter-row .toggler:after{display:inline-block;transition:transform 100ms ease-in;content:"►"}.json-formatter-dark.json-formatter-row,.json-formatter-dark.json-formatter-row a,.json-formatter-dark.json-formatter-row a:hover{color:#fff;text-decoration:none}.json-formatter-dark.json-formatter-row .json-formatter-row{margin-left:1em}.json-formatter-dark.json-formatter-row .children.empty{opacity:.5;margin-left:1em}.json-formatter-dark.json-formatter-row .children.empty.object:after{content:"No properties"}.json-formatter-dark.json-formatter-row .children.empty.array:after{content:"[]"}.json-formatter-dark.json-formatter-row .string{color:#31f031;white-space:pre;word-wrap:break-word}.json-formatter-dark.json-formatter-row .number{color:#66c2ff}.json-formatter-dark.json-formatter-row .boolean{color:#ec4242}.json-formatter-dark.json-formatter-row .null{color:#eec97d}.json-formatter-dark.json-formatter-row .undefined{color:#ef8fbe}.json-formatter-dark.json-formatter-row .function{color:#fd48cb}.json-formatter-dark.json-formatter-row .date{background-color:rgba(255,255,255,.05)}.json-formatter-dark.json-formatter-row .url{text-decoration:underline;color:#027bff;cursor:pointer}.json-formatter-dark.json-formatter-row .bracket{color:#9494ff}.json-formatter-dark.json-formatter-row .key{color:#23a0db;cursor:pointer}.json-formatter-dark.json-formatter-row .constructor-name{cursor:pointer}.json-formatter-dark.json-formatter-row .toggler{font-size:.8em;line-height:1.2em;vertical-align:middle;opacity:.6;cursor:pointer}.json-formatter-dark.json-formatter-row .toggler:after{display:inline-block;transition:transform 100ms ease-in;content:"►"} \ No newline at end of file diff --git a/dist/json-formatter.min.js b/dist/json-formatter.min.js new file mode 100644 index 0000000..435b890 --- /dev/null +++ b/dist/json-formatter.min.js @@ -0,0 +1,7 @@ +/*! + * jsonformatter + * + * Version: 0.2.7 - 2015-06-05T21:19:07.015Z + * License: MIT + */ +"use strict";angular.module("jsonFormatter",["RecursionHelper"]).directive("jsonFormatter",["RecursionHelper",function(n){function e(n){return n.replace('"','"')}function t(n){if(void 0===n)return"";if(null===n)return"Object";if("object"==typeof n&&!n.constructor)return"Object";var e=/function (.{1,})\(/,t=e.exec(n.constructor.toString());return t&&t.length>1?t[1]:""}function r(n){return null===n?"null":typeof n}function s(n,s,o){n.isArray=function(){return Array.isArray(n.json)},n.isObject=function(){return n.json&&"object"==typeof n.json},n.getKeys=function(){return n.isObject()?Object.keys(n.json).map(function(n){return""===n?'""':n}):void 0},n.type=r(n.json),n.hasKey="undefined"!=typeof n.key,n.getConstructorName=function(){return t(n.json)},"string"===n.type&&("Invalid Date"!==new Date(n.json).toString()&&(n.isDate=!0),0===n.json.indexOf("http")&&(n.isUrl=!0)),n.isEmptyObject=function(){return n.getKeys()&&!n.getKeys().length&&n.isOpen&&!n.isArray()},n.isOpen=!!n.open,n.toggleOpen=function(){n.isOpen=!n.isOpen},n.childrenOpen=function(){return n.open>1?n.open-1:0},n.openLink=function(e){e&&(window.location.href=n.json)},n.parseValue=function(t){return n.type=r(n.json),"null"===n.type?"null":"undefined"===n.type?"undefined":("string"===n.type&&(t='"'+e(t)+'"'),"function"===n.type?n.json.toString().replace(/\n/g,"").replace(/\{.+?\}/,"")+"{ ... }":t)}}return{templateUrl:"json-formatter.html",restrict:"E",replace:!0,scope:{json:"=",key:"=",open:"="},compile:function(e){return n.compile(e,s)}}}]),angular.module("RecursionHelper",[]).factory("RecursionHelper",["$compile",function(n){return{compile:function(e,t){angular.isFunction(t)&&(t={post:t});var r,s=e.contents().remove();return{pre:t&&t.pre?t.pre:null,post:function(e,o){r||(r=n(s)),r(e,function(n){o.append(n)}),t&&t.post&&t.post.apply(null,arguments)}}}}}]),angular.module("jsonFormatter").run(["$templateCache",function(n){n.put("json-formatter.html",'
{{key}}: {{getConstructorName(json)}} [{{json.length}}] {{parseValue(json)}}
')}]); \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index 006de19..934a217 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,22 +1,23 @@ -var fs = require('fs'); -var connect = require('gulp-connect'); -var gulp = require('gulp'); -var karma = require('karma').server; -var concat = require('gulp-concat'); -var jshint = require('gulp-jshint'); -var header = require('gulp-header'); -var rename = require('gulp-rename'); -var es = require('event-stream'); -var del = require('del'); -var uglify = require('gulp-uglify'); -var minifyHtml = require('gulp-minify-html'); -var minifyCSS = require('gulp-minify-css'); +var fs = require('fs'); +var connect = require('gulp-connect'); +var gulp = require('gulp'); +var karma = require('karma').server; +var concat = require('gulp-concat'); +var jshint = require('gulp-jshint'); +var header = require('gulp-header'); +var rename = require('gulp-rename'); +var es = require('event-stream'); +var del = require('del'); +var uglify = require('gulp-uglify'); +var minifyHtml = require('gulp-minify-html'); +var minifyCSS = require('gulp-minify-css'); var templateCache = require('gulp-angular-templatecache'); -var gutil = require('gulp-util'); -var plumber = require('gulp-plumber'); -var open = require('gulp-open'); -var less = require('gulp-less'); -var order = require("gulp-order"); +var gutil = require('gulp-util'); +var plumber = require('gulp-plumber'); +var open = require('gulp-open'); +var less = require('gulp-less'); +var order = require("gulp-order"); +var runSequence = require('run-sequence'); var config = { @@ -142,7 +143,9 @@ function handleError(err) { this.emit('end'); }; -gulp.task('build', ['clean', 'scripts', 'styles']); +gulp.task('build', function(cb) { + runSequence('clean', 'scripts', 'styles', cb); +}); gulp.task('serve', ['build', 'connect', 'watch', 'open']); gulp.task('default', ['build', 'test']); gulp.task('test', ['build', 'jshint-test', 'karma']); diff --git a/package.json b/package.json index c545180..f727742 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,8 @@ "karma-firefox-launcher": "^0.1.6", "karma-jasmine": "^0.3.5", "karma-mocha-reporter": "^1.0.2", - "mversion": "^1.10.0" + "mversion": "^1.10.0", + "run-sequence": "^1.1.0" }, "readme": "# Bower Publishable Angular Directive Boilerplate\n\nThis is a simple AngularJS directive boilerplate to help you start your own AngularJS directive and publish it in Bower and NPM.\nThis readme file itself is a boilerplate.\n\n#### Using the boilerplate\nClone the project and install dependencies, then use Gulp to start the prject.\n```shell\ngit clone git@github.com:mohsen1/angular-directive-boilerplate.git my-directive\ncd my-directive\nnpm install\nbower install\ngulp serve\n```\n#### Install via NPM or bower\n\n```shell\nnpm install angular-directive-boilerplate\n```\n```shell\nbower install angular-directive-boilerplate\n```\n\n### License\nMIT\n", "readmeFilename": "README.md",