Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CommonJS modules #481

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ sudo: false
node_js:
- "0.10"
before_script:
- npm install -g bower
- npm install -g bower gulp-cli
- bower install
- gulp build
24 changes: 12 additions & 12 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
var browserify = require('browserify')
var source = require('vinyl-source-stream')
var buffer = require('vinyl-buffer')
var gulp = require('gulp')
var eslint = require('gulp-eslint')
var concat = require('gulp-concat')
Expand Down Expand Up @@ -33,18 +36,15 @@ gulp.task('lint', function() {
})

gulp.task('build-core', function() {
var streams = ['noframework', 'jquery', 'zepto'].map(function(adapter) {
var sources = [
'src/waypoint.js',
'src/context.js',
'src/group.js',
'src/adapters/' + adapter + '.js'
]
if (['jquery', 'zepto'].indexOf(adapter) > -1) {
sources.push('src/adapters/jquery-zepto-fn-extension.js')
}
return gulp.src(sources)
.pipe(concat(adapter + '.waypoints.js', { newLine: ';' }))
var streams = ['noframework', 'jquery', 'zepto', 'test'].map(function(adapter) {
var b = browserify({
entries: './src/entries/' + adapter + '.js',
debug: false
});

return b.bundle()
.pipe(source(adapter + '.waypoints.js'))
.pipe(buffer())
.pipe(header(fileHeader('Waypoints')))
.pipe(footer(';'))
.pipe(gulp.dest('lib/'))
Expand Down
Loading