mirror of
https://github.com/primer/css.git
synced 2024-11-23 11:27:26 +03:00
publish: copy all src/* before publishing, clean up post
This commit is contained in:
parent
e1e2b9f55e
commit
8895827eac
1
.gitignore
vendored
1
.gitignore
vendored
@ -9,4 +9,5 @@ _site
|
||||
build/
|
||||
node_modules
|
||||
primer-version.txt
|
||||
publish-files.txt
|
||||
static/primer.css
|
||||
|
@ -34,7 +34,9 @@
|
||||
"check-links": "script/check-links http://localhost:3000/css -v",
|
||||
"test-all-modules": "ava --verbose tests/test-*.js",
|
||||
"now-build": "next build",
|
||||
"now-start": "next start"
|
||||
"now-start": "next start",
|
||||
"prepublishOnly:" "script/prepublish",
|
||||
"postpublish": "script/postpublish"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@githubprimer/octicons-react": "^8.1.3",
|
||||
|
9
script/postpublish
Executable file
9
script/postpublish
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
file=publish-files.txt
|
||||
if [[ -f $file ]]; then
|
||||
echo "deleting all files listed in $file..."
|
||||
cat $file | xargs rm -rfv
|
||||
rm $file
|
||||
fi
|
7
script/prepublish
Executable file
7
script/prepublish
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
files=$(git ls-files src | sed -e 's#^src/##' | sed -e 's#/.*$##' | sort -u)
|
||||
echo $files > publish-files.txt
|
||||
cd src
|
||||
cp -rv $files ..
|
||||
cd -
|
Loading…
Reference in New Issue
Block a user