Skip to content

Commit

Permalink
remove rsync stuff with new postcss-cli version
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed Dec 10, 2021
1 parent 5d00e8a commit 3f6637c
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 56 deletions.
18 changes: 1 addition & 17 deletions other/pm2.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,9 @@ module.exports = {
script: 'node ./other/refresh-on-content-changes.js',
ignore_watch: ['.'],
},

// We build postcss to other/postcss.ignored and use rsync to copy them to
// the app directory. If we point postcss directly to the app directory then
// it updates the files even if there are no changes, which triggers a
// double rebuild. So we use rsync with --checksum so it only updates the
// files when their contents have changed.
{
name: 'Postcss',
script:
'postcss styles/**/*.css --base styles --dir other/postcss.ignored',
script: 'postcss styles/**/*.css --base styles --dir app/styles',
autorestart: false,
watch: [
'./tailwind.config.js',
Expand All @@ -57,14 +50,5 @@ module.exports = {
FORCE_COLOR: '1',
},
},
{
name: 'rsync',
script: 'rsync -v --checksum -r other/postcss.ignored/ app/styles',
watch: ['other/postcss.ignored'],
autorestart: false,
env: {
FORCE_COLOR: '1',
},
},
],
}
85 changes: 47 additions & 38 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"jest-watch-typeahead": "^0.6.4",
"msw": "^0.35.0",
"postcss": "^8.4.4",
"postcss-cli": "^9.0.2",
"postcss-cli": "^9.1.0",
"prettier": "^2.5.0",
"prettier-plugin-tailwind": "^2.2.12",
"rimraf": "^3.0.2",
Expand Down

0 comments on commit 3f6637c

Please sign in to comment.