diff --git a/.circleci/config.yml b/.circleci/config.yml index 83959c3..1df9f38 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,12 +9,17 @@ jobs: - run: name: Install npm deployment app command: sudo npm install -g github-release-cli + - run: + name: Build client javascript + command: | + npm install + npm run build - deploy: name: Create a release command: | PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[", ]//g') echo "Packaging to ${CIRCLE_PROJECT_REPONAME}_build-sc.zip" - zip "${CIRCLE_PROJECT_REPONAME}_build-sc.zip" index.mjs package.json api/** + zip "${CIRCLE_PROJECT_REPONAME}_build-sc.zip" index.mjs package.json public api/** echo "Creating release '${PACKAGE_VERSION}.${CIRCLE_BUILD_NUM}'" github-release upload \ --commitish $CIRCLE_SHA1 \ @@ -24,7 +29,7 @@ jobs: --tag "v${PACKAGE_VERSION}.${CIRCLE_BUILD_NUM}" \ --name "v${PACKAGE_VERSION}.${CIRCLE_BUILD_NUM}" \ --body "Automatic CircleCI Build of v${PACKAGE_VERSION}.${CIRCLE_BUILD_NUM} from ${CIRCLE_SHA1}" \ - sc-helloworld_build-sc.zip + "${CIRCLE_PROJECT_REPONAME}_build-sc.zip" workflows: version: 2 diff --git a/.gitignore b/.gitignore index c780cfc..1d20b2f 100644 --- a/.gitignore +++ b/.gitignore @@ -106,3 +106,4 @@ dist db.json app/* manage/* +public/main.js diff --git a/package.json b/package.json index d164ae3..0fb5690 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "js:build:main": "asbundle client/index.js public/main.js", "dev:server": "nodemon --watch runner.mjs --watch api runner.mjs | bunyan", "dev:client": "nodemon --watch client --exec \"npm run js:build:main\"", + "build": "npm run js:build:main", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "",