Skip to content

Commit 8a66d07

Browse files
author
jjelosua
committed
fix autoinit id generation
1 parent 6725459 commit 8a66d07

File tree

12 files changed

+29
-18
lines changed

12 files changed

+29
-18
lines changed

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
1.2.2
2+
-----
3+
4+
* Fix autoInit id generation with randomization when autoInit is called multiple times
5+
16
1.2.1
27
-----
38

Gruntfile.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,18 @@ module.exports = function(grunt) {
6767
options: {
6868
context : {
6969
// Comment if we want autoinit to be stripped out
70-
AUTOINIT: true
70+
AUTOINIT: true,
71+
ENV: 'production'
7172
}
7273
},
7374
pym : {
7475
src : 'src/pym.js',
7576
dest : 'build/pym.js'
7677
},
78+
loader : {
79+
src : 'build/pym-loader.js',
80+
dest : 'build/pym-loader.js'
81+
},
7782
},
7883
concat: {
7984
pym: {

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Use case: The NPR Visuals team uses Pym.js to embed small custom bits of code (c
3131

3232
## [› Read the documentation](http://blog.apps.npr.org/pym.js/)
3333

34-
## [› Browse the API](http://blog.apps.npr.org/pym.js/api/pym.js/1.2.1/)
34+
## [› Browse the API](http://blog.apps.npr.org/pym.js/api/pym.js/1.2.2/)
3535

3636
Assumptions
3737
-----------

dist/p.v1.m.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/pl.v1.m.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/pym-loader.v1.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! pym-loader.js - v1.2.1 - 2017-05-04 */
1+
/*! pym-loader.js - v1.2.2 - 2017-05-20 */
22
/*
33
* pym-loader.js is a wrapper library that deals with particular CMS scenarios to successfully load Pym.js into a given page
44
* To find out more about Pym.js check out the docs at http://blog.apps.npr.org/pym.js/ or the readme at README.md for usage.
@@ -124,8 +124,6 @@
124124
};
125125

126126
var pymUrl = "https://pym.nprapps.org/pym.v1.min.js";
127-
/* Check for karma local testing, if the replacement has not been done yet on the build process */
128-
if (pymUrl.lastIndexOf('@@', 0) === 0) { pymUrl = '/base/src/pym.js'; }
129127
tryLoadingWithRequirejs(pymUrl) || tryLoadingWithJQuery(pymUrl) || loadPymViaEmbedding(pymUrl);
130128

131129
/**

0 commit comments

Comments
 (0)