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

ember-source related cleanup #14457

Merged
merged 1 commit into from
Oct 27, 2016
Merged

ember-source related cleanup #14457

merged 1 commit into from
Oct 27, 2016

Conversation

locks
Copy link
Contributor

@locks locks commented Oct 12, 2016

Fixes #14434. See issue for checklist.

bower.json
bower_components
config
# dist
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this line suppose to do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's just a comment. In the future we might want to only ship certain things inside /dist

Copy link
Member

Choose a reason for hiding this comment

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

Then let's include more info. 😊

config
# dist
ember-cli-build.js
ember-source-2.10.0-alpha.1.tgz
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be something like ember-source-*.tgz or will be necessary to update after each version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed, was a left over from copying the ls output

@mitchlloyd
Copy link
Contributor

If we're omitting most of the files from npm, we may want to consider using the package.json "files" configuration over npmignore.

https://docs.npmjs.com/files/package.json#files

@nathanhammond
Copy link
Member

@mitchlloyd We did investigate and consider that. @locks probably remembers the reasoning for that not being a thing.

@locks
Copy link
Contributor Author

locks commented Oct 15, 2016

From what I understand, files has priority over .npmignore. That coupled with files only allowing file inclusion and not exclusion led to my understanding that if (when? 😂 ) we get trolled by .npmignore, it should be in a way that doesn't break things for the user.

Copy link
Member

@nathanhammond nathanhammond left a comment

Choose a reason for hiding this comment

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

I feel like there should be an (Ember CLI?) test which runs npm pack ember.js && npm install ember-source*.tgz && npm test to protect us from possibly doing the wrong things here.

@@ -0,0 +1,3 @@
#!/usr/bin/env bash

ember build --production && npm publish
Copy link
Member

Choose a reason for hiding this comment

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

Turn this into a JavaScript file and execSync and this will be portable. I'd prefer not to make the release process non-portable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you have an execSync example handy?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

--production is not a valid option. It should be ember build --environment production or ember build -prod.

# In the future we will likely want to restrict exactly
# which parts of `/dist` we want to include.
#
# dist
Copy link
Member

Choose a reason for hiding this comment

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

I feel like we should split this out to the very bottom of the file. Especially since it's commented to begin with. It can just be presented as a documentation of:

Currently we include the entire dist folder, but at some point we may wish to be more selective about what we include.

@nathanhammond
Copy link
Member

nathanhammond commented Oct 23, 2016

@rwjblue With one last change I believe this is ready to land. The only thing it doesn't currently have is a test for the assets which get published to ensure that all of the pieces we need get published. I feel like that test likely belongs on the Ember CLI side and not part of this repo so I'm in favor of landing this.

@locks Thank you for getting this to work in a portable manner and helping to push this over the line. <3

var execSync = require('child_process').execSync;

execSync("ember build --environment production");
execSync("npm publish");
Copy link
Member

@nathanhammond nathanhammond Oct 23, 2016

Choose a reason for hiding this comment

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

This actually seems a bit scary to auto-trigger. I feel like we just need:
execSync("ember build --environment production");

And that it should run as part of the prepublish hook. I still like it as a separate script because I'm ~100% sure that it will grow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@rwjblue rwjblue merged commit bf6c66e into emberjs:master Oct 27, 2016
@locks locks deleted the ember-source-cleanup branch February 7, 2017 14:48
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.

7 participants