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

Export default options so other dependent packages can test against changing properties #631

Merged
merged 2 commits into from
Aug 26, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/react-server-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
},
"devDependencies": {
"babel-preset-react-server": "^0.4.4",
"gulp": "^3.9.1",
"gulp-babel": "^6.1.2",
"gulp-eslint": "^3.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, this is great.

We've gone back and forth here. It's nice to factor out devDependencies into the repo root to cut down on bootstrap time and storage requirements. But for modules where we use the "bin" script that breaks things. In this case I think adding it back into the package is the right move.

Eventually I'd like to have a lerna bootstrap --hoist-external or something that will let us define deps where they're actually used but then install them at the root and link bin scripts in where needed. Some day. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe I'm missing the correct dev entry point... but when I cloned and then ran npm run bootstrap I hit the same gulp error.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, we probably have other packages that will need similar treatment. 😬

"nsp": "^2.4.0",
"react-server-gulp-module-tagger": "^0.4.5",
"rimraf": "^2.5.2"
Expand Down
1 change: 1 addition & 0 deletions packages/react-server-cli/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ require.extensions['.md'] =
module.exports = {
parseCliArgs,
run,
defaultOptions,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you'll need to import this first?

Like:

const defaultOptions = require("./defaultOptions").default;

Up at the top?

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually this should fail travis with a linter violation.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right on cue. 👹
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was just testing the CI... Making sure it was still working correctly :)

};