Skip to content

Commit b29c130

Browse files
authored
Merge pull request #170 from jekyll/ci-build
Build the front end in CI
2 parents 9331185 + a853dce commit b29c130

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"open:src": "babel-node tools/srcServer.js",
1111
"lint": "esw webpack.config.* src tools",
1212
"lint:watch": "npm run lint -- --watch",
13-
"clean-dist": "npm run remove-dist && mkdir ./lib/jekyll-admin/public",
13+
"clean-dist": "npm run remove-dist && npm run add-dist",
14+
"add-dist": "mkdirp ./lib/jekyll-admin/public",
1415
"remove-dist": "rimraf ./lib/jekyll-admin/public",
1516
"build:html": "babel-node tools/buildHtml.js",
1617
"prebuild": "npm run clean-dist && npm run build:html && npm run lint && npm test",
@@ -71,6 +72,7 @@
7172
"file-loader": "0.8.5",
7273
"isparta": "4.0.0",
7374
"jsdom": "^9.2.1",
75+
"mkdirp": "^0.5.1",
7476
"mocha": "2.4.5",
7577
"nock": "^8.0.0",
7678
"node-sass": "3.7.0",

script/cibuild-node

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,13 @@
33
set -e
44

55
echo "Running Node tests..."
6-
npm test
6+
7+
# We want to run `script/build` on CI to ensure things actually build, but
8+
# we don't want to have to run `script/build` locally every time we run tests
9+
#
10+
# Note: `script/build` runs `npm test` as part of the build process
11+
if [ -n "$CI" ]; then
12+
script/build
13+
else
14+
npm test
15+
fi

0 commit comments

Comments
 (0)