File tree 4 files changed +17
-6
lines changed
4 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 19
19
" design-system"
20
20
],
21
21
"scripts" : {
22
- "build " : " script/build " ,
22
+ "dist " : " script/dist " ,
23
23
"build-storybook" : " build-storybook -o build" ,
24
24
"check-links" : " script/check-links http://localhost:3000/css -v" ,
25
25
"lint" : " stylelint --quiet --syntax scss src/**/*.scss" ,
26
- "now- build" : " next build" ,
26
+ "build" : " next build" ,
27
27
"now-start" : " next start" ,
28
28
"postlint" : " echo 'TODO: eslint docs pages'" ,
29
29
"postpublish" : " script/postpublish" ,
30
- "prepare" : " npm run build " ,
30
+ "prepare" : " npm run dist " ,
31
31
"prepublishOnly" : " script/prepublish" ,
32
+ "postpublish" : " script/postpublish" ,
32
33
"publish-storybook" : " npm run storybook && gh-pages -d build -b gh-pages -r https://github.com/primer/storybook" ,
33
- "start" : " next " ,
34
+ "start" : " script/server " ,
34
35
"start-storybook" : " start-storybook -p 8000 -c .storybook" ,
35
36
"sync" : " script/sync" ,
36
37
"test" : " npm-run-all -s test-jest test-urls" ,
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -e
3
3
4
- outdir=build
4
+ outdir=dist
5
5
rm -rf $outdir
6
6
mkdir -p src/$outdir
7
7
@@ -19,7 +19,7 @@ for index in $indexes; do
19
19
fi
20
20
file=" $outdir /$name .css"
21
21
pushd $dir > /dev/null
22
- echo " [build ] $index -> $file "
22
+ echo " [dist ] $index -> $file "
23
23
npx node-sass --include-path=$root index.scss > " $root /$file "
24
24
npx cssstats " $root /$file " > " $root /$outdir /$name .json"
25
25
echo " module.exports = {cssstats: require('./$name .json')}" > " $root /$outdir /$name .js"
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ # generate the build directory
4
+ npm run dist
5
+
3
6
files=$( git ls-files src | sed -e ' s#^src/##' | sed -e ' s#/.*$##' | sort -u)
4
7
echo $files > publish-files.txt
5
8
cd src
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ if [[ " $NODE_ENV " = " production" ]]; then
4
+ next
5
+ else
6
+ next start
7
+ fi
You can’t perform that action at this time.
0 commit comments