Kaloyan Kosev
Kaloyan Kosev

Reputation: 13067

How to publish ignored by git distribution files to Bower?

I am building a package for NPM and Bower.

I follow this pattern to keep the working files (ES6) in the src/ directory of my package and build my distribution files (ES5, compiled with Babel) in the lib/ directory.

In my .gitignore I ignore lib/.

On the one hand side (NPM), I have a .npmignore which ignores src/, instead of lib/. This is how I publish the lib/ folder contents on NPM.

On the other hand side (Bower), the lib/ folder is missing in the repository, therefore, the Bower package doesn't include it. How can I publish the ignored by git lib/ folder contents on Bower?

Upvotes: 0

Views: 42

Answers (1)

Kaloyan Kosev
Kaloyan Kosev

Reputation: 13067

I think that's not possible.

The workaround I found is to commit the distribution files in the repository.

If they really piss you off - you could do this dirty trick: commit them right before you release a tag. Release a tag. Remove them.

Or simply drop the Bower support. But that's not a real solution to the problem, isn't it? :-)

Upvotes: 1

Related Questions