Saturday 22 April 2017

How does the @shopify/polaris project get built from github repo to npm dependency?

I'm interested in learning how the @shopify/polaris project in github is built and published to npm. My main questions are:

  • How are the index.es.js and index.js files being generated? Are those being generated programmatically on my computer, or are they published to npm like this?
  • What mechanism is preventing the files in the github repo from being downloaded when installed? I don't see a .npmignore in the repo.

Below I have the files in the npm package, and the github, and you can see they're different.

Here's what the polaris project looks like when it's installed via NPM / yarn.

.
├── CHANGELOG.md
├── README.md
├── index.es.js
├── index.js
├── package.json
├── src
├── styles
├── styles.css
├── styles.scss
└── types

Here's what the project looks like on github.

.
├── CHANGELOG.md
├── README.md
├── circle.yml
├── config
├── documentation
├── examples
├── package.json
├── scripts
├── src
├── tests
├── tsconfig.json
├── tslint.json
└── yarn.lock



via ThomasReggi

No comments:

Post a Comment