diff --git a/examples/hello-world/package.json b/examples/hello-world/package.json index 193d3c30..39cffa5d 100644 --- a/examples/hello-world/package.json +++ b/examples/hello-world/package.json @@ -8,8 +8,7 @@ "dev": "sde dev", "build": "sde bundle", "vite": "vite", - "preview": "vite preview --open --outDir ./sde-prep/check-report", - "save-baseline": "sde-check baseline --save" + "preview": "vite preview --open --outDir ./sde-prep/check-report" }, "dependencies": { "@sdeverywhere/build": "^0.3.7", diff --git a/examples/template-jquery/package.json b/examples/template-jquery/package.json index 46b29a04..042f1d41 100644 --- a/examples/template-jquery/package.json +++ b/examples/template-jquery/package.json @@ -6,8 +6,7 @@ "scripts": { "clean": "rm -rf ./sde-prep", "dev": "sde dev", - "build": "sde bundle", - "save-baseline": "sde-check baseline --save" + "build": "sde bundle" }, "workspaces": [ "packages/core", diff --git a/examples/template-minimal/package.json b/examples/template-minimal/package.json index 6a50c671..3bcc94f7 100644 --- a/examples/template-minimal/package.json +++ b/examples/template-minimal/package.json @@ -5,9 +5,8 @@ "type": "module", "scripts": { "clean": "rm -rf sde-prep", - "build": "sde bundle", "dev": "sde dev", - "save-baseline": "sde-check baseline --save" + "build": "sde bundle" }, "dependencies": { "@sdeverywhere/build": "^0.3.7", diff --git a/packages/plugin-check/bin/sde-check.js b/packages/plugin-check/bin/sde-check.js deleted file mode 100755 index 53bf65b0..00000000 --- a/packages/plugin-check/bin/sde-check.js +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env node - -/* - * This is the entrypoint for the `sde-check` CLI, which provides commands - * that work in conjunction with `@sdeverywhere/plugin-check`. - */ - -import { copyFileSync, existsSync, mkdirSync } from 'fs' -import { join as joinPath } from 'path' - -function printUsage() { - console.log() - console.log('Usage:') - console.log(' sde-check save-current-bundle\t\tcopy the latest bundle to the `bundles` directory') - console.log() -} - -function timestamp() { - const padL = (nr, len = 2, chr = `0`) => `${nr}`.padStart(len, chr) - - const d = new Date() - const year = d.getFullYear() - const month = padL(d.getMonth() + 1) - const day = padL(d.getDate()) - const hours = padL(d.getHours()) - const minutes = padL(d.getMinutes()) - const seconds = padL(d.getSeconds()) - - return `${year}-${month}-${day}--${hours}-${minutes}-${seconds}` -} - -const args = process.argv.slice(2) -if (args.length !== 2 || args[0] !== 'save-current-bundle') { - printUsage() - process.exit(1) -} - -// TODO: For now we make a number of assumptions (e.g., that the bundle will be copied to -// the `bundles` directory under the current working directory, that the bundle filename -// will contain the current timestamp); we should make these configurable -const prepDir = joinPath(process.cwd(), 'sde-prep') -const srcBundleFile = joinPath(prepDir, 'check-bundle.js') -if (!existsSync(srcBundleFile)) { - console.error(`ERROR: No 'check-bundle.js' file found in 'sde-prep' directory`) - process.exit(1) -} - -const bundlesDir = joinPath(process.cwd(), 'bundles') -if (!existsSync(bundlesDir)) { - mkdirSync(bundlesDir, { recursive: true }) -} - -const dstBundleFile = joinPath(bundlesDir, `${timestamp()}.js`) -copyFileSync(srcBundleFile, dstBundleFile) diff --git a/packages/plugin-check/package.json b/packages/plugin-check/package.json index 422957a9..f3743def 100644 --- a/packages/plugin-check/package.json +++ b/packages/plugin-check/package.json @@ -2,7 +2,6 @@ "name": "@sdeverywhere/plugin-check", "version": "0.3.35", "files": [ - "bin/**", "dist/**", "template-bundle/**", "template-report/**", @@ -19,9 +18,6 @@ "require": "./dist/index.cjs" } }, - "bin": { - "sde-check": "bin/sde-check.js" - }, "scripts": { "clean": "rm -rf dist", "lint": "eslint src --max-warnings 0",