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

create a build-settings package that all other packages depend on #342

Merged
merged 5 commits into from
Oct 17, 2018

Conversation

kevinbarabash
Copy link
Contributor

The reason for this is that we want lerna to detect any changes to our build settings and bump the versions of our packages when that happens since the compiled code is different.

It's going to be hard to test this for real b/c I'll need another commit which just changes the build-settings package and none of the other packages. With this PR we've made changes to all packages by either their package.json files which lerna will detect allowing us to publish new versions of everything.

@jeresig
Copy link
Member

jeresig commented Oct 15, 2018

Deploy preview for wonder-blocks ready!

Built with commit 9d8bf61

https://deploy-preview-342--wonder-blocks.netlify.com

@codecov
Copy link

codecov bot commented Oct 15, 2018

Codecov Report

Merging #342 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #342   +/-   ##
=======================================
  Coverage   89.38%   89.38%           
=======================================
  Files         105      105           
  Lines        1479     1479           
  Branches      293      293           
=======================================
  Hits         1322     1322           
  Misses        135      135           
  Partials       22       22

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 13f818a...9d8bf61. Read the comment docs.

Copy link
Member

@jeresig jeresig left a comment

Choose a reason for hiding this comment

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

Hmm... I think this makes sense in theory, but I have a lot of concerns (inline).

"version": "0.0.1",
"main": "index.js",
"license": "MIT",
"private": true
Copy link
Member

Choose a reason for hiding this comment

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

This isn't going to be published? Do we not having to prefix this with @khanacademy? What happens when we publish the Wonder Blocks packages that depend on this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When we go to install one of our wonder-blocks-* packages somewhere, this should be ignored b/c we've marked it as a dev dependency. The @khanacademy prefix isn't necessary but we could add it if we wanted. Since it's not a package we intend on publishing I opted not to include prefix to better differentiate it from those packages we are publishing.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm - ok! I think a better name would be something like wonder-blocks-build-settings or some such, just to make it clear that this isn't some third-party package.

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've changed the name of the package in the package.json file. I didn't bother changing the folder name since wonder-blocks/wonder-blocks-build-settings seemed redundant. I also added a README.md in order to try to explain things.

Copy link
Member

Choose a reason for hiding this comment

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

How do you folks feel about using a naming convention that encapsulates the internal, dev-only nature of this style of package, making that more obvious?

wb-dev-build-settings or just wb-dev-build?

For some reason, it makes me a little uneasy how similar to our prod packages this looks.

Copy link
Contributor Author

@kevinbarabash kevinbarabash Oct 16, 2018

Choose a reason for hiding this comment

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

I'll change into wb-dev-build-settings.

import fs from "fs";
import autoExternal from "rollup-plugin-auto-external";
import babel from "rollup-plugin-babel";

const {presets, plugins} = require("./babel.config.js");
const {presets, plugins} = require("../babel.config.js");
Copy link
Member

Choose a reason for hiding this comment

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

Why wasn't the babel config moved too?

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 worried about it no longer being visible to those things need, but maybe that concern is unfounded since the the things that need are already in this folder.

@kevinbarabash
Copy link
Contributor Author

Looks like I need to get the docs building too.

Copy link
Member

@jeresig jeresig left a comment

Choose a reason for hiding this comment

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

Thank you for the changes!

@jeresig jeresig assigned kevinbarabash and unassigned jeresig Oct 16, 2018
@@ -1,3 +1,4 @@
/* eslint-disable import/no-commonjs */
Copy link
Member

Choose a reason for hiding this comment

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

Thank you for adding these!

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 think eventually we'll want want to have two different eslint configs, one for node and one for browser. We should be able to configure eslint to use different configs based on a path regex.

@kevinbarabash kevinbarabash merged commit 6ca53d7 into master Oct 17, 2018
@kevinbarabash kevinbarabash deleted the build_settings branch October 17, 2018 19:00
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.

6 participants