Giter VIP home page Giter VIP logo

Comments (10)

athaeryn avatar athaeryn commented on July 20, 2024

This should be working, but I'm leaving this open until I've tested it.

from boba.js.

athaeryn avatar athaeryn commented on July 20, 2024

This is done.

from boba.js.

corbanb avatar corbanb commented on July 20, 2024

How did you setup boba to work with browserify? I wasn't able to get the working.

from boba.js.

athaeryn avatar athaeryn commented on July 20, 2024

Do you have code you can show me? The setup should be pretty standard. You'll just need to include your GA tracking script and jQuery before running new Boba.

from boba.js.

corbanb avatar corbanb commented on July 20, 2024

Trying to do the below but keep getting object is not defined on the new Boba line.


var $ = require('jquery');
var Parse = require('parse-browserify');
var _ = require('underscore');
var ga = require("ga-browserify");
var Boba = require('../vendor/boba.js');

var App = App || {};
ga("UA-XXX");

Parse.$ = $;
Boba.$ = $;
Boba.ga = ga;

App.tracker = new Boba({
    siteName: 'Website',
    pageName: 'home',
    defaultCategory: 'category',
    defaultAction: 'action',
    defaultLabel: 'label'
});

App.tracker.trackLinks();

from boba.js.

athaeryn avatar athaeryn commented on July 20, 2024

Did you install Boba with npm? Only the npm version is set up to work with require.

Also, Boba doesn't currently support Boba.$ = $, it just looks for $ as a global. That's something I should implement though.

from boba.js.

corbanb avatar corbanb commented on July 20, 2024

ahhhhhh no I was trying to require it from my libs folder. working now. thx!

from boba.js.

corbanb avatar corbanb commented on July 20, 2024

Out of curiosity what did you have to change to make Boba work with browserify? Was it just adding it to the npm registry? Or something at the code level?

from boba.js.

athaeryn avatar athaeryn commented on July 20, 2024

There's a gulp task that takes the source file and makes two versions. This line, which sets module.exports = Boba is removed from the browser version.

I should probably remove the line that sets window.Boba from the browserify version... Looks like I've got two to-dos! I'm going to leave this issue open and close it when I implement those features.

from boba.js.

athaeryn avatar athaeryn commented on July 20, 2024

Issues addressed in 0418920 and d066f24.

from boba.js.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.