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

Can I use a third-party package? #114

Closed
montanaflynn opened this issue Dec 6, 2015 · 5 comments
Closed

Can I use a third-party package? #114

montanaflynn opened this issue Dec 6, 2015 · 5 comments

Comments

@montanaflynn
Copy link
Contributor

I'd love to include some date-related functions but don't want to duplicate the code as I already have them created and tested here: https://github.com/montanaflynn/human-date

Would it be ok to include my package in the package.json file?

@graypegg
Copy link
Contributor

graypegg commented Dec 6, 2015

humandate.js is probably small enough that it could fit inside Δ.js, Rabrennie would have the final say though

@Rabrennie
Copy link
Owner

As long as you check to see if it's loaded in some way I don't see why not. I'd rather you put it as a bower dependency for now because I'm only really using npm for gulp. As @toish said though it would fit in Δ.js but as I said it's really up to you.

@gytdau gytdau closed this as completed Dec 6, 2015
@montanaflynn
Copy link
Contributor Author

I added human-date to bower, can you give me an example of how to include it?

@gytdau
Copy link
Collaborator

gytdau commented Dec 6, 2015

Add something like this to bower.json

  (...),
  "dependencies": {
        "the-name-of-your-package": "~1.2.3"
  }
}

where 1.2.3 is your desired version.
I'm not sure on how you should go about actually including it. I'd say that you should probably put it in a new script tag in the head section of a web page whenever you plan on using it.

@montanaflynn
Copy link
Contributor Author

I don't think that's the best way to include packages. How I imagined it would work is I include it in npm's package.json, include it in myFunction.js and let gulp handle putting it into dist/

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

No branches or pull requests

4 participants