Skip to content

Commit 83f8871

Browse files
authored
Merge pull request #788 from bordeo/master
Correct AMD define for plugins
2 parents eee2d40 + 6652d3a commit 83f8871

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+51
-47
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,10 @@ lazySizes.init();
498498

499499
## Contributing
500500
Fixes, PRs and issues are always welcome, make sure to create a new branch from the **master** (not the gh-pages branch), validate against JSHint and test in all browsers. In case of an API/documentation change make sure to also document it here in the readme.md.
501+
### Build
502+
Run `npx grunt` to validate JSHint and uglify/minify all files.
503+
### Tests
504+
Run `npx serverino -p 3333` and navigate to [http://localhost:3333/tests/](http://localhost:3333/tests/)
501505

502506
## <a name="plugins"></a>Available plugins in this repo
503507
It is recommended to concat all plugins together with lazySizes. In case you don't concat it is recommended to include the plugin scripts *before* the lazySizes main script.

plugins/artdirect/ls.artdirect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
if(typeof module == 'object' && module.exports){
1111
factory(require('lazysizes'));
1212
} else if (typeof define == 'function' && define.amd) {
13-
require(['lazysizes'], factory);
13+
define(['lazysizes'], factory);
1414
} else if(window.lazySizes) {
1515
globalInstall();
1616
} else {

plugins/artdirect/ls.artdirect.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/aspectratio/ls.aspectratio.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
if(typeof module == 'object' && module.exports){
1010
factory(require('lazysizes'));
1111
} else if (typeof define == 'function' && define.amd) {
12-
require(['lazysizes'], factory);
12+
define(['lazysizes'], factory);
1313
} else if(window.lazySizes) {
1414
globalInstall();
1515
} else {

plugins/aspectratio/ls.aspectratio.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/attrchange/ls.attrchange.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
if(typeof module == 'object' && module.exports){
1111
factory(require('lazysizes'));
1212
} else if (typeof define == 'function' && define.amd) {
13-
require(['lazysizes'], factory);
13+
define(['lazysizes'], factory);
1414
} else if(window.lazySizes) {
1515
globalInstall();
1616
} else {

plugins/attrchange/ls.attrchange.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/bgset/ls.bgset.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
if(typeof module == 'object' && module.exports){
1010
factory(require('lazysizes'));
1111
} else if (typeof define == 'function' && define.amd) {
12-
require(['lazysizes'], factory);
12+
define(['lazysizes'], factory);
1313
} else if(window.lazySizes) {
1414
globalInstall();
1515
} else {

0 commit comments

Comments
 (0)