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

npm tasks #267

Merged
merged 3 commits into from
Jul 22, 2015
Merged

npm tasks #267

merged 3 commits into from
Jul 22, 2015

Conversation

emmenko
Copy link
Contributor

@emmenko emmenko commented Jul 14, 2015

This supersedes #248

/cc @gaearon

@gaearon
Copy link
Contributor

gaearon commented Jul 14, 2015

How does making a Github release fit into this workflow? Should I just do a release via web interface separately based on the pushed tag?

@emmenko
Copy link
Contributor Author

emmenko commented Jul 14, 2015

When you do a release, a github tag is created. Then you need to manually create the release note for that existing tag (but that's always a manual process).

Or do you mean something else?

@gaearon
Copy link
Contributor

gaearon commented Jul 14, 2015

Yeah this seems right.
Some tools also automate creating release notes so I just wanted to clarify.

This looks great to me.

@@ -0,0 +1,9 @@
{
"commitMessage": "Bumps to version v%s",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just change it to %s please

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure

@emmenko
Copy link
Contributor Author

emmenko commented Jul 14, 2015

Cool 👍

One thing though to remember: the patch/minor/major tasks work for normal semver numbers, so normal lifecycle releases.
If you want to release alpha/beta/-rc/whatever you should directly use the mversion cli (see examples), or do it manually, just to be sure.

@gaearon
Copy link
Contributor

gaearon commented Jul 14, 2015

Oh, okay, thanks for explaining.

@emmenko emmenko force-pushed the npm-tasks branch 3 times, most recently from 5b9b25c to 9617cb0 Compare July 14, 2015 17:07
@emmenko
Copy link
Contributor Author

emmenko commented Jul 14, 2015

@gaearon ok, I made the changes and force pushed. Should be ok now.

@@ -0,0 +1,9 @@
{
"commitMessage": "Bumps to version %s",
Copy link
Contributor

Choose a reason for hiding this comment

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

just %s please

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I thought vs% without v. Will change it, sorry

"commitMessage": "Bumps to version %s",
"tagName": "v%s",
"scripts": {
"preupdate": "npm test && npm run umd",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not build it as part of npm run build?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The umd part? Makes sense!

@emmenko
Copy link
Contributor Author

emmenko commented Jul 14, 2015

@gaearon feel free to do the final tweaks the way you like it ;)

@gaearon
Copy link
Contributor

gaearon commented Jul 14, 2015

Sure, thanks! I'll actually use some of these for a boilerplate I'm preparing. (Tired of doing the same setup for every lib.)

@emmenko
Copy link
Contributor Author

emmenko commented Jul 14, 2015

Tired of doing the same setup for every lib

I know! :)

PS: Glad to help.

@gaearon
Copy link
Contributor

gaearon commented Jul 14, 2015

Thanks again! I'll merge tomorrow.
In the meantime, I extracted some stuff into https://github.com/gaearon/library-boilerplate

@emmenko
Copy link
Contributor Author

emmenko commented Jul 14, 2015

Good idea! Thanks for the link.

@valscion
Copy link

Wow this PR clarifies the build process a lot and makes it easier to start hacking on redux. 👍

gaearon added a commit that referenced this pull request Jul 22, 2015
@gaearon gaearon merged commit b51338f into breaking-changes-1.0 Jul 22, 2015
@gaearon gaearon deleted the npm-tasks branch July 22, 2015 13:22
@mikekidder
Copy link
Contributor

(Window compatibility)
npm tasks that set environment variables for Node, it requires a slight change.
For example (from/to):

"build:umd": "webpack src/index.js dist/redux.js && NODE_ENV=production webpack src/index.js dist/redux.min.js"

"build:umd": "webpack src/index.js dist/redux.js && set NODE_ENV=production&& webpack src/index.js dist/redux.min.js"

I mentioned it in gaearon/library-boilerplate#2. Should work for Mac as well (I hope) to make it all cross-platform. The no space after setting variable is the hack discovery that makes it possible in Windows.

@gaearon
Copy link
Contributor

gaearon commented Jul 31, 2015

@mikekidder This doesn't pass NODE_ENV=production to Webpack on OS X for some reason.

@gaearon
Copy link
Contributor

gaearon commented Jul 31, 2015

I tried to fix Windows build in #379.

@mikekidder
Copy link
Contributor

Yes, "set" on OS X was questionable, I didn't have a Mac to test. I'll respond further in #379

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.

4 participants