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

Fix issue where tsx would copy the package.json file where it shouldn't #1466

Merged
merged 4 commits into from
May 14, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ yarn add @shopify/polaris
```html
<link
rel="stylesheet"
href="https://sdks.shopifycdn.com/polaris/3.14.1-rc.1/polaris.min.css"
href="https://sdks.shopifycdn.com/polaris/3.14.1-rc.2/polaris.min.css"
/>
```

Expand Down Expand Up @@ -81,7 +81,7 @@ If React doesn’t make sense for your application, you can use a CSS-only versi
```html
<link
rel="stylesheet"
href="https://sdks.shopifycdn.com/polaris/3.14.1-rc.1/polaris.min.css"
href="https://sdks.shopifycdn.com/polaris/3.14.1-rc.2/polaris.min.css"
/>
```

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@shopify/polaris",
"description": "Shopify’s product component library",
"version": "3.14.1-rc.1",
"version": "3.14.1-rc.2",
"private": false,
"license": "SEE LICENSE IN LICENSE.md",
"author": "Shopify <dev@shopify.com>",
Expand Down
12 changes: 11 additions & 1 deletion scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

const {execSync} = require('child_process');
const {join, resolve: resolvePath} = require('path');
const {ensureDirSync, writeFileSync, readFileSync} = require('fs-extra');
const {
ensureDirSync,
writeFileSync,
readFileSync,
removeSync,
} = require('fs-extra');
const {rollup} = require('rollup');
const {cp, mv, rm} = require('shelljs');
const copyfiles = require('copyfiles');
Expand Down Expand Up @@ -57,6 +62,11 @@ copy(['./src/**/*.{scss,svg,png,jpg,jpeg,json}', intermediateBuild], {up: 1})
);
});
})
// tsc includes the root directory's package.json file in the output by default
// and the "files" key ends up filtering which files get included in the
// build output. Ideally the package.json file wouldn't be copied,
// but deleting it is a good workaround.
.then(() => removeSync(resolvePath(intermediateBuild, 'package.json')))
// Custom build consumed by Sewing Kit: it preserves all ESNext features
// including imports/ exports for better tree shaking.
.then(() => ensureDirSync(finalEsnext))
Expand Down
6 changes: 3 additions & 3 deletions src/components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Use React components in most cases, especially if you’re building a highly int
```html
<link
rel="stylesheet"
href="https://sdks.shopifycdn.com/polaris/3.14.1-rc.1/polaris.min.css"
href="https://sdks.shopifycdn.com/polaris/3.14.1-rc.2/polaris.min.css"
/>
```

Expand All @@ -73,7 +73,7 @@ Include the CSS in your HTML:
```html
<link
rel="stylesheet"
href="https://sdks.shopifycdn.com/polaris/3.14.1-rc.1/polaris.min.css"
href="https://sdks.shopifycdn.com/polaris/3.14.1-rc.2/polaris.min.css"
/>
```

Expand Down Expand Up @@ -106,7 +106,7 @@ Include the CSS stylesheet in your HTML:
```html
<link
rel="stylesheet"
href="https://sdks.shopifycdn.com/polaris/3.14.1-rc.1/polaris.min.css"
href="https://sdks.shopifycdn.com/polaris/3.14.1-rc.2/polaris.min.css"
/>
```

Expand Down