Skip to content

Use browserify for building and add some tests#175

Closed
kt3k wants to merge 2 commits intoshipshapecode:masterfrom
kt3k:feature/browserify-and-test
Closed

Use browserify for building and add some tests#175
kt3k wants to merge 2 commits intoshipshapecode:masterfrom
kt3k:feature/browserify-and-test

Conversation

@kt3k
Copy link
Copy Markdown

@kt3k kt3k commented May 7, 2016

What I did in this PR:

  • Introduced browserify for building the module. I think this is better than concatenating for keeping the modularity of the scripts.
    • standalone: 'Tether' option in browserify settings makes the bundle umd. dist/js/tether(.min).js must work as an umd module.
  • Added test settings using karma test runner.
    • Added some easy test cases.
  • Added .editorconfig

@kt3k kt3k force-pushed the feature/browserify-and-test branch from b52ca0c to b78f778 Compare May 7, 2016 02:23
@awerlang
Copy link
Copy Markdown

@TrevorBurnham there's anything we could do to unblock this one? Without it, we are prevented to use rollup: rollup/rollup-plugin-babel#87
In time, I don't think it's rollup job to fix the issue, but here on the dist bundle.

Thanks

@mbaierl
Copy link
Copy Markdown

mbaierl commented Feb 18, 2017

Hi,
it would be amazing if this would finally work....

@nathancahill
Copy link
Copy Markdown

This should absolutely be merged @HubSpot @TrevorBurnham.

@balloob
Copy link
Copy Markdown

balloob commented Mar 24, 2017

I have forked the branch by @kt3k and included a new build on it. As a temporary solution you can refer to Tether 1.3.4 browserified build like this in your package.json:

{
  "dependencies": {
    "tether": "balloob/tether#7e0d48e4ac2162e251dc2b69d7c13e6c29a5667f"
  }
}

@kt3k
Copy link
Copy Markdown
Author

kt3k commented Mar 29, 2017

close this in favor of #359

@kt3k kt3k closed this Mar 29, 2017
@nathancahill
Copy link
Copy Markdown

@kt3k That's a different project. Issue still exists in this project. Please reopen. There are multiple forks being maintained with your changes until @HubSpot merges this.

@gthomas-appfolio
Copy link
Copy Markdown

Yes this should be reopened and merged, fork is being used by reactstrap to work around this but would be best to correct here

@kt3k
Copy link
Copy Markdown
Author

kt3k commented Mar 31, 2017

Oops, thanks for pointing it.

By the way, now I think rollup is better choice for bundling this project because it produces much simpler and smaller bundle than browserify.

@fantasydr
Copy link
Copy Markdown

I'm trying to use 'reactstrap' and the issue caused by 'reactstrap-tether' brought me here.

It seems this PR will create a UMD which cannot be consumed by 'browserify'.
The repro is simple. Use an empty project with 'reactstrap-tether':

{
  "dependencies": {  
    "reactstrap-tether": "^1.3.4",  
    "browserify": "^13.0.0"  
  },  
  "name": "bad-require",
  "private": true,
  "scripts": {
    "start": "browserify -d -e test.js",
  },
}

The test.js is one line:

var tether = require('reactstrap-tether');

Run

npm run start

will generate errors saying

Error: Cannot find module './utils' from .....

The webpack might work with this properly. But why break browserify (or did i miss anything) ?

@zekedroid
Copy link
Copy Markdown

bump

@zekedroid
Copy link
Copy Markdown

Thanks @awerlang! I think I'll try to fix it here first because the change is needed for reactstrap-tether which is needed for reacstrap. It would be simplest to make the patch. Unless there's already a fork that is good enough.

@kt3k
Copy link
Copy Markdown
Author

kt3k commented Aug 11, 2018

Closing for inactivity.

@kt3k kt3k closed this Aug 11, 2018
@kt3k kt3k deleted the feature/browserify-and-test branch August 11, 2018 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants