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

Separate Packages #812

Closed
wants to merge 17 commits into from
Closed

Separate Packages #812

wants to merge 17 commits into from

Conversation

jmophoto
Copy link
Contributor

@jmophoto jmophoto commented Oct 10, 2018

This separates the package.json files out again and moves the webpack config into the docs directory.

Issue: #811

This pulls in Sam's bundle size check on the docs bundle.

It also removes the .npmignore file. From what I have read, this can lead to issues where npm honors this over the .gitignore file. This can lead to files ignored in git being added accidentally to the npm package. Since we are specifying the files: 'dist' now, those are the only ones included and the ignore isn't needed.

.travis.yml

  • Add ci and auditing for the package.json in the docs directory

Changelog.js

  • Update changelog to latest version

docs/package.json

  • Add in package.json for the docs

webpack.config.js

  • Remove hot and inline since they are in the script
  • Change devTools to eval-source-map to use original code instead of generated
  • Fix paths
  • Add babel options back in. Since this file is in the docs directory, the .babelrc isn't picked up so they need to be added here, also.
  • Specify path along with filename for bundle package

@sambev
Copy link
Contributor

sambev commented Oct 10, 2018

I am not sure the package.json files and scripts are lining up. A fresh install of this for me yields:

 ~/p/mx-react-components/jmo/separate-packages > npm run dev                                                                    Wed Oct 10 13:52:54 2018

> mx-react-components@6.1.3 dev /Users/sam.beveridge/projects/mx-react-components
> cd docs && NODE_ENV=development webpack-dev-server --mode=development

sh: webpack-dev-server: command not found

Even if I have installed the docs package. I think this makes sense, given that the dev server is not installed in the lib's dev dependencies, so it wouldn't be able to find it in it's environment.

@jmophoto
Copy link
Contributor Author

Did you do a fresh install on both the package.json and the docs/package.json?

I have been running npm ci and then npm run docs:ci.

I tried to pare them down to only what was needed, but I may have missed something.

@jmophoto
Copy link
Contributor Author

Looking now, I am missing the webpack-dev-server in the main package. I can try adding that.

@sambev
Copy link
Contributor

sambev commented Oct 10, 2018

Yeah that is with a fresh install in both and yeah, it is missing the dev server in the main. This has me thinking about what should be where. 🤔

@cerinman
Copy link
Contributor

Closing this in favor of #813

@cerinman cerinman closed this Oct 15, 2018
@cerinman cerinman deleted the jmo/separate-packages branch November 8, 2018 18:57
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

3 participants