From 62909c6eb5392aa0cba31ac16778d61523c1313c Mon Sep 17 00:00:00 2001 From: Kristofer Baxter Date: Wed, 29 Jan 2020 21:47:41 -0800 Subject: [PATCH] Refactor build system and test runner since it no longer ran (#119) --- mobile-web/.babelrc | 7 +- mobile-web/.github/workflows/test.yml | 19 + mobile-web/README.md | 7 +- mobile-web/example/platform.html | 2 +- mobile-web/gulpfile.js | 89 - mobile-web/karma.conf.js | 82 +- mobile-web/package-lock.json | 12671 ------------------- mobile-web/package.json | 52 +- mobile-web/rollup.config.js | 54 + mobile-web/tests/some-test.js | 1 - mobile-web/tests/test-cache-url-creator.js | 40 +- mobile-web/travis.yml | 22 - mobile-web/webpack.config.js | 30 - mobile-web/yarn.lock | 4341 +++++++ 14 files changed, 4513 insertions(+), 12904 deletions(-) create mode 100644 mobile-web/.github/workflows/test.yml delete mode 100644 mobile-web/gulpfile.js delete mode 100644 mobile-web/package-lock.json create mode 100644 mobile-web/rollup.config.js delete mode 100644 mobile-web/travis.yml delete mode 100644 mobile-web/webpack.config.js create mode 100644 mobile-web/yarn.lock diff --git a/mobile-web/.babelrc b/mobile-web/.babelrc index d8f77a5..4246000 100644 --- a/mobile-web/.babelrc +++ b/mobile-web/.babelrc @@ -1,11 +1,10 @@ { "presets": [ - ["env", { + ["@babel/preset-env", { "loose": true, "targets": { - "browsers": ["last 2 versions", "safari >= 7"] - }, - "modules": "commonjs" + "browsers": ["last 2 versions", "safari >= 10"] + } }] ] } diff --git a/mobile-web/.github/workflows/test.yml b/mobile-web/.github/workflows/test.yml new file mode 100644 index 0000000..8f029cc --- /dev/null +++ b/mobile-web/.github/workflows/test.yml @@ -0,0 +1,19 @@ +name: Unit Tests + +on: [pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [12.x] + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install + - run: yarn build + - run: yarn test \ No newline at end of file diff --git a/mobile-web/README.md b/mobile-web/README.md index 6d242f9..b645ab6 100644 --- a/mobile-web/README.md +++ b/mobile-web/README.md @@ -5,6 +5,7 @@ | Command | Description | | ----------------------------------------------------------------------- | --------------------------------------------------------------------- | -| **`gulp`** | Runs "build" | -| **`gulp serve`** or **`gulp watch`** | Runs "build" with watch and runs a localhost webserver | -| **`gulp clean`** | deletes the /dist directory | +| **`yarn build`** | Runs "build" | +| **`yarn watch`** | Runs "build" with watch and runs a localhost webserver | +| **`yarn test`** | executes tests in /tests directory | +| **`yarn clean`** | deletes the /dist directory | diff --git a/mobile-web/example/platform.html b/mobile-web/example/platform.html index 31ca178..b1dec2e 100644 --- a/mobile-web/example/platform.html +++ b/mobile-web/example/platform.html @@ -5,7 +5,7 @@ Viewer - +