Add VERSION property to CanJS Object #316

Merged
merged 4 commits into from Apr 26, 2013

Conversation

Projects
None yet
2 participants
@ccummings
Contributor

ccummings commented Apr 21, 2013

For detecting what version is loaded.

What about adding this to can.js:

can.VERSION = "1.1.4";

The grunt build scripts would have to be updated to keep this in synch with the version in package.json

@ccummings

This comment has been minimized.

Show comment
Hide comment
@ccummings

ccummings Apr 21, 2013

Contributor

Wasn't sure what we wanted to do about the VERSION property when using CanJS from GitHub. The version will be @VERSION, which isn't very helpful, but we require some sort of unique symbol that can be replaced when the grunt build task runs.

Alternatively, we could just update this property manually in the source, but I would prefer to automate as much as possible.

Contributor

ccummings commented Apr 21, 2013

Wasn't sure what we wanted to do about the VERSION property when using CanJS from GitHub. The version will be @VERSION, which isn't very helpful, but we require some sort of unique symbol that can be replaced when the grunt build task runs.

Alternatively, we could just update this property manually in the source, but I would prefer to automate as much as possible.

@ccummings

This comment has been minimized.

Show comment
Hide comment
@ccummings

ccummings Apr 23, 2013

Contributor

Changed the default value to @EDGE. This lets developers using the GitHub version know they are using the bleeding edge version of CanJS.

Contributor

ccummings commented Apr 23, 2013

Changed the default value to @EDGE. This lets developers using the GitHub version know they are using the bleeding edge version of CanJS.

Gruntfile.js
+ {
+ pattern: /@EDGE/gim, //version property
+ replacement: '<%= pkg.version %>'
+ },

This comment has been minimized.

@daffl

daffl Apr 25, 2013

Contributor

Can you remove the tailing comma? I guess it's one of my pet peeves but it shows up as an error in Webstorm and any JS linter.

@daffl

daffl Apr 25, 2013

Contributor

Can you remove the tailing comma? I guess it's one of my pet peeves but it shows up as an error in Webstorm and any JS linter.

daffl added a commit that referenced this pull request Apr 26, 2013

Merge pull request #316 from bitovi/issue-316
Add VERSION property to CanJS Object

@daffl daffl merged commit cdb8d96 into master Apr 26, 2013

1 check passed

default The Travis build passed
Details

@daffl daffl deleted the issue-316 branch Apr 26, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment