From 04eb52d9090c666c427d335f3d82b3c5e08612e9 Mon Sep 17 00:00:00 2001 From: Jaid Date: Sat, 9 Feb 2019 08:47:01 +0100 Subject: [PATCH] Fixed scripts Signed-off-by: Jaid --- package.json | 4 ++-- test/index.test.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index fc42ba6..2f307a0 100644 --- a/package.json +++ b/package.json @@ -47,10 +47,10 @@ "webpack-config-jaid": "2.0.0" }, "scripts": { - "clean": "rimraf dist test/*/dist test/*/info", + "clean": "rimraf **/dist/", "build:prod": "cross-env NODE_ENV=production webpack", "build:dev": "webpack", - "test": "jest && npm run build:prod && cross-env MAIN=dist jest", + "test": "jest && npm run build:prod && cross-env MAIN=dist/package/production jest", "test:dev": "jest", "test:debug": "cross-env DEBUG=$(basename $PWD) cross-env node --inspect node_modules/jest/bin/jest.js --runInBand", "release": "npm test && cross-env git tag v$npm_package_version && git push --tags && cross-env opn https://github.com/$npm_package_author_name/$(basename $PWD)/releases/new?tag=v$npm_package_version" diff --git a/test/index.test.js b/test/index.test.js index 70cac79..a15e40f 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -7,8 +7,8 @@ import CleanWebpackPlugin from "clean-webpack-plugin" import PublishimoWebpackPlugin from "publishimo-webpack-plugin" import fsp from "@absolunet/fsp" -const indexModule = (process.env.MAIN ? path.resolve(process.env.MAIN) : path.join(__dirname, "..", "src")) |> require -const {default: JsdocTsdWebpackPlugin} = indexModule +const indexModule = (process.env.MAIN ? path.resolve(__dirname, "..", process.env.MAIN) : path.join(__dirname, "..", "src")) +const {default: JsdocTsdWebpackPlugin} = require(indexModule) jest.setTimeout(60 * 1000)