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

Remove third-party dependencies #160

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

StephenGregory
Copy link
Contributor

What do you think of not storing dependencies within the repositories? I think it clearly defines the source code of this extension vs third-party software. You'll see that I'm pulling in the same versions that you have in the repository.

This is just an in-progress look at what I'm looking at.

To pull in dependencies:

$ npm install
$ gulp

Dependencies left to be removed:

  • libs/utils.js ? - is this part of this repository or another?
  • plugins/default/jslint/libs/jslint.js - where did you find this version?
  • plugins/default/jsx/libs/reacttools.js - where did you find this version?

Other tasks can be added to create a distributable package.

});

gulp.task("coffeelint", function () {
var coffeeScript = request("https://github.com/jashkenas/coffeescript/tarball/533ad8afe920b2dbf64ffb00efda45648242cc24")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can possibly be cleaned up by specifying the dependency in package.json (similar to how eslint is defined)

@StephenGregory StephenGregory force-pushed the sg/remove-dependencies branch 2 times, most recently from addd415 to b8e0933 Compare August 23, 2015 02:52
"coffeelint": "^1.9.1",
"coffee-script": "https://github.com/jashkenas/coffeescript/tarball/1.9.1",
"eslint": "https://github.com/eslint/eslint/tarball/v1.0.0-rc-3",
"gulp": "^3.9.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in devDependencies instead.

@MiguelCastillo
Copy link
Owner

@StephenGregory This is a fantastic PR! It will certainly help maintain dependencies. I have to go through it in details to see how you are handling JSHint and ESLint. I will try to load this one this evening and give it a try. Thank you for this PR!

@StephenGregory
Copy link
Contributor Author

Great! In the meantime, if you could provide the resources for the remaining tools, I can work on pulling in those dependencies as well.

@MiguelCastillo
Copy link
Owner

utils is something I created a while ago... I have created belty, which has extend. We can use that to replace mixin.

reactools is an npm package.

jslint I believe I got it directly from github. Not sure, it has been a while.

@StephenGregory
Copy link
Contributor Author

Thanks! With respect to reacttools.js, how did you go about minifying and concatenating the package? (through npm run build ?)

With respect to jslint, we can pull in the version with the same date stamp (although, the source code is slightly different if you do a diff between the two). Alternatively, we can try out the latest version.

Also, I'll check out belty and work on integrating that.

@MiguelCastillo
Copy link
Owner

So for reacttools, I installed the npm package and ran browserify on it via command line.

npm install
cd node_modules/react-tools
browserify main.js -s reacttools > reacttools.js

Updating to the latest jslint sounds good to me. :)

belty is on npm and the dist folder has browser bundles.

@StephenGregory
Copy link
Contributor Author

Hmm. For reacttools, I am having issues reproducing the output in this repo (the output I get is similar, but has an extra ~500 lines).

Commands I ran (picking the versions you would have had available to you when reacttools.js was added to this repo:

$ npm install [email protected]
$ npm install [email protected]
$ node_modules/browserify/bin/cmd.js main.js -s reacttools -o reacttools.js

For a quick comparison, I used wc -l reacttools.js.

Also, I think I've replaced utils.js appropriately with belty.

@MiguelCastillo
Copy link
Owner

@StephenGregory I tried browserifying reactools last night and I also could not get the exact same output, but it worked just fine when I tested it. I can push up the new reactools so that you can compare outputs, if you would like me to.

@StephenGregory
Copy link
Contributor Author

Sure @MiguelCastillo !

@MiguelCastillo
Copy link
Owner

Here you go :) #162

It's already merged.

@StephenGregory
Copy link
Contributor Author

Perfect. However, it's still not quite what I am getting. I posted a gist to get your thoughts. Maybe it is obvious what I'm not doing.

@MiguelCastillo
Copy link
Owner

Yeah, it's just the order in which browserify bundled the modules. Go ahead and ignore that issue. I had browserify 10.x.x when it created the one I just checked in. I upgraded to 11.x.x and I am getting a different bundle.

I loaded your gist into my running instance of interactive linter, and it works well. Thanks for trying to track this issue down. :)

@StephenGregory
Copy link
Contributor Author

Great! No problem. I used the gulpjs browserify recipe to integrate reacttools.js

Now, what is remaining is JSLint.

Edit: Where did JSLintError.js come from?

@MiguelCastillo
Copy link
Owner

@StephenGregory thank you so much. This is great!

@MiguelCastillo
Copy link
Owner

Sorry I didn't answer the question about JSLintError.js before... Didnt see it. That was created by someone I collaborated on earlier on when interactive linter was just getting started. There isn't really an npm package and really is something that we maintain ourselves. :) Feel free to dig!

@StephenGregory
Copy link
Contributor Author

Ahh, gotcha! No worries. Just making sure I tracked down everything.

I added JSLint (not the latest version, the Feb 18 2013 version). I have not tested it yet, though.

I have not tested all of these changes with Brackets yet.

@MiguelCastillo
Copy link
Owner

@StephenGregory I pulled down your branch and when I run gulp chokidar throws some exceptions. What version of node are you running?

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.

2 participants