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

CB-12397 Package .gitignore when publishing to npm #22

Closed
wants to merge 2 commits into from

Conversation

raphinesse
Copy link
Contributor

For further details see discussion starting at:
apache/cordova-discuss#69 (comment)

@brodybits
Copy link

How was this tested?

@raphinesse
Copy link
Contributor Author

npm pack with my local npm 6 on Linux. I already thought that we should test this with some test publish to see that there's no funny stuff happening.

@brodybits
Copy link

I tested as follows:

If I would try using my test version of cordova-cli to create a new project I would get a new project with .npmignore, NOT with .gitignore. I would not expect a different result if we would publish this change and update the upstream packages on NPM.

I think we still need a workaround solution like I proposed in apache/cordova-create#8 to resolve the issue, will reopen for discussion.

@raphinesse
Copy link
Contributor Author

Thanks for the testing, I will take another look at this.

@raphinesse
Copy link
Contributor Author

raphinesse commented May 18, 2018

@brodybits I also ran some tests with the following script (run as node foo.js dest template):

var CordovaLogger = require('cordova-common').CordovaLogger;
CordovaLogger.get().setLevel(CordovaLogger.VERBOSE);

require('cordova-create')(process.argv[2], null, null, { lib: { www: {
    template: true,
    url: process.argv[3]
}}}).catch(function (err) {
    console.error(err);
    process.exitCode = 1;
});

Unfortunately I can confirm your results:

  • Works as intended for local templates (files are simply copied by cordova-create)
  • Renames .gitignore to .npmignore for templates fetched by cordova-fetch

What a bummer!

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.

None yet

2 participants