diff --git a/.gitignore b/.gitignore index 82e87110..08adb506 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ dist/ out/ site/ public/meta.json +public/version.json ng2-material/**/*.css ng2-material/**/*.css.map diff --git a/Gruntfile.js b/Gruntfile.js index 233796a8..fcdfce71 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -288,6 +288,11 @@ module.exports = function (grunt) { var path = require('path'); var util = require('util'); var meta = {}; + + fs.writeFileSync('public/version.json',JSON.stringify({ + version: require('./package.json').version + })); + glob("examples/components/**/*.html", function (err, files) { files.forEach(parseDemo); var output = prepareMeta(); diff --git a/examples/app.html b/examples/app.html index 5c3573ad..4df512e4 100644 --- a/examples/app.html +++ b/examples/app.html @@ -5,8 +5,8 @@

Angular2 Material + v{{version}}

- diff --git a/examples/app.scss b/examples/app.scss index dcd53669..8ce38e9d 100644 --- a/examples/app.scss +++ b/examples/app.scss @@ -5,9 +5,6 @@ $md-font-url: '../public/font/'; @import "example"; demos-app { - .md-toolbar { - max-width: 200px; - } md-content { > section { max-width: 800px; diff --git a/examples/app.ts b/examples/app.ts index ddbe3942..9b87c027 100644 --- a/examples/app.ts +++ b/examples/app.ts @@ -31,6 +31,8 @@ export interface IExampleData { export class DemosApp { meta: any; + version: string; + constructor(http: Http) { http.get('public/meta.json') .subscribe((res: Response) => { @@ -44,8 +46,10 @@ export class DemosApp { // } //}); //this.meta = results; - - console.log(this.meta); + }); + http.get('public/version.json') + .subscribe((res: Response) => { + this.version = res.json().version; }); } }