Skip to content

Commit 3caf9c7

Browse files
committed
Add to NPM registry
Fix #2
1 parent 8f78a1a commit 3caf9c7

File tree

8 files changed

+12
-7
lines changed

8 files changed

+12
-7
lines changed

dist/granim.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Granim.prototype.getCurrentColors = require('./getCurrentColors.js');
9797

9898
Granim.prototype.pauseWhenNotInView = require('./pauseWhenNotInView.js');
9999

100-
window.Granim = Granim;
100+
module.exports = Granim;
101101

102102
},{"./animateColors.js":2,"./changeState.js":3,"./clear.js":4,"./colorDiff.js":5,"./eventPolyfill.js":6,"./getCurrentColors.js":7,"./getDimensions.js":8,"./getLightness.js":9,"./hexToRgb.js":10,"./makeGradient.js":11,"./pause.js":12,"./pauseWhenNotInView.js":13,"./play.js":14,"./refreshColors.js":15,"./setColors.js":16,"./setDirection.js":17}],2:[function(require,module,exports){
103103
'use strict';
@@ -535,4 +535,7 @@ module.exports = function() {
535535
}
536536
};
537537

538-
},{}]},{},[1]);
538+
},{}],18:[function(require,module,exports){
539+
window.Granim = require('./lib/Granim.js');
540+
541+
},{"./lib/Granim.js":1}]},{},[18]);

dist/granim.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/assets/js/vendor/granim.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gulpfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var gulp = require('gulp'),
1818

1919
// LIB
2020
gulp.task('build', function() {
21-
return browserify({ entries: './lib/Granim.js', debug: isSourcemaps }).bundle()
21+
return browserify({ entries: 'standalone.js', debug: isSourcemaps }).bundle()
2222
.pipe(source('./granim.js'))
2323
.pipe(buffer())
2424
.pipe(gulpif(!isSourcemaps, header('/*! Granim v' + appVersion + ' */\n')))

index.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('./lib/Granim.js');

lib/Granim.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ Granim.prototype.getCurrentColors = require('./getCurrentColors.js');
9595

9696
Granim.prototype.pauseWhenNotInView = require('./pauseWhenNotInView.js');
9797

98-
window.Granim = Granim;
98+
module.exports = Granim;

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "granim",
33
"version": "1.0.1",
44
"description": "Create fluid and interactive gradients animations with this small js library.",
5-
"main": "granim.js",
5+
"main": "index.js",
66
"scripts": {
77
"start": "cd docs/ && node server.js"
88
},

standalone.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
window.Granim = require('./lib/Granim.js');

0 commit comments

Comments
 (0)