Skip to content

Commit 43726c8

Browse files
committed
chore(*): prepare release 0.1.0
1 parent 5bb72a2 commit 43726c8

File tree

9 files changed

+83
-37
lines changed

9 files changed

+83
-37
lines changed

dist/amd/parser.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ define(['exports'], function (exports) {
2727

2828
Parser.prototype.doParse = function doParse(content) {
2929
var lines = this.getLines(content);
30-
if (!lines) {
31-
return {};
32-
}
33-
3430
return this.parseContent(lines);
3531
};
3632

@@ -85,12 +81,20 @@ define(['exports'], function (exports) {
8581
}();
8682
}
8783

84+
var key = pair[0];
85+
var value = this.stripComments(pair[1]);
86+
8887
return {
89-
key: pair[0],
90-
value: pair[1]
88+
key: key,
89+
value: value
9190
};
9291
};
9392

93+
Parser.prototype.stripComments = function stripComments(value) {
94+
var values = value.split('#');
95+
return values[0].trim();
96+
};
97+
9498
Parser.prototype.getEnv = function getEnv() {
9599
return this.env;
96100
};

dist/aurelia-environment.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ declare module 'aurelia-environment' {
6464
*/
6565
parseKeyValuePair(line: string): any;
6666

67+
/**
68+
* Strips comments from a value.
69+
*
70+
* @param value - the value to strip comments from
71+
*/
72+
stripComments(value: string): string;
73+
6774
/**
6875
* Returns the environment object.
6976
*/

dist/aurelia-environment.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ export class Parser {
3636
*/
3737
doParse(content: string): any {
3838
let lines = this.getLines(content);
39-
if (!lines) {
40-
return {};
41-
}
42-
4339
return this.parseContent(lines);
4440
}
4541

@@ -105,12 +101,25 @@ export class Parser {
105101
};
106102
}
107103

104+
let key = pair[0];
105+
let value = this.stripComments(pair[1]);
106+
108107
return {
109-
key: pair[0],
110-
value: pair[1]
108+
key: key,
109+
value: value
111110
};
112111
}
113112

113+
/**
114+
* Strips comments from a value.
115+
*
116+
* @param value - the value to strip comments from
117+
*/
118+
stripComments(value: string): string {
119+
let values = value.split('#');
120+
return values[0].trim();
121+
}
122+
114123
/**
115124
* Returns the environment object.
116125
*/

dist/commonjs/parser.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ var Parser = exports.Parser = function () {
2222

2323
Parser.prototype.doParse = function doParse(content) {
2424
var lines = this.getLines(content);
25-
if (!lines) {
26-
return {};
27-
}
28-
2925
return this.parseContent(lines);
3026
};
3127

@@ -80,12 +76,20 @@ var Parser = exports.Parser = function () {
8076
}();
8177
}
8278

79+
var key = pair[0];
80+
var value = this.stripComments(pair[1]);
81+
8382
return {
84-
key: pair[0],
85-
value: pair[1]
83+
key: key,
84+
value: value
8685
};
8786
};
8887

88+
Parser.prototype.stripComments = function stripComments(value) {
89+
var values = value.split('#');
90+
return values[0].trim();
91+
};
92+
8993
Parser.prototype.getEnv = function getEnv() {
9094
return this.env;
9195
};

dist/es2015/parser.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ export let Parser = class Parser {
1313

1414
doParse(content) {
1515
let lines = this.getLines(content);
16-
if (!lines) {
17-
return {};
18-
}
19-
2016
return this.parseContent(lines);
2117
}
2218

@@ -58,12 +54,20 @@ export let Parser = class Parser {
5854
}();
5955
}
6056

57+
let key = pair[0];
58+
let value = this.stripComments(pair[1]);
59+
6160
return {
62-
key: pair[0],
63-
value: pair[1]
61+
key: key,
62+
value: value
6463
};
6564
}
6665

66+
stripComments(value) {
67+
let values = value.split('#');
68+
return values[0].trim();
69+
}
70+
6771
getEnv() {
6872
return this.env;
6973
}

dist/system/parser.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ System.register([], function (_export, _context) {
2828

2929
Parser.prototype.doParse = function doParse(content) {
3030
var lines = this.getLines(content);
31-
if (!lines) {
32-
return {};
33-
}
34-
3531
return this.parseContent(lines);
3632
};
3733

@@ -86,12 +82,20 @@ System.register([], function (_export, _context) {
8682
}();
8783
}
8884

85+
var key = pair[0];
86+
var value = this.stripComments(pair[1]);
87+
8988
return {
90-
key: pair[0],
91-
value: pair[1]
89+
key: key,
90+
value: value
9291
};
9392
};
9493

94+
Parser.prototype.stripComments = function stripComments(value) {
95+
var values = value.split('#');
96+
return values[0].trim();
97+
};
98+
9599
Parser.prototype.getEnv = function getEnv() {
96100
return this.env;
97101
};

dist/temp/aurelia-environment.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ var Parser = exports.Parser = function () {
2222

2323
Parser.prototype.doParse = function doParse(content) {
2424
var lines = this.getLines(content);
25-
if (!lines) {
26-
return {};
27-
}
28-
2925
return this.parseContent(lines);
3026
};
3127

@@ -80,12 +76,20 @@ var Parser = exports.Parser = function () {
8076
}();
8177
}
8278

79+
var key = pair[0];
80+
var value = this.stripComments(pair[1]);
81+
8382
return {
84-
key: pair[0],
85-
value: pair[1]
83+
key: key,
84+
value: value
8685
};
8786
};
8887

88+
Parser.prototype.stripComments = function stripComments(value) {
89+
var values = value.split('#');
90+
return values[0].trim();
91+
};
92+
8993
Parser.prototype.getEnv = function getEnv() {
9094
return this.env;
9195
};

doc/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
<a name="0.1.0"></a>
2+
# [0.1.0](https://github.com/MarcScheib/aurelia-environment/compare/0.0.2...v0.1.0) (2016-04-17)
3+
4+
5+
### Features
6+
7+
* **parser:** add inline comments ([bf57a26](https://github.com/MarcScheib/aurelia-environment/commit/bf57a26))
8+
9+
10+
111
<a name="0.0.2"></a>
212
## [0.0.2](https://github.com/MarcScheib/aurelia-environment/compare/0.0.1...v0.0.2) (2016-03-20)
313

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aurelia-environment",
3-
"version": "0.0.2",
3+
"version": "0.1.0",
44
"description": "An environment plugin for Aurelia.",
55
"keywords": [
66
"aurelia",

0 commit comments

Comments
 (0)