From e53bdf51a66513c3509a4fd41ec6955038f30276 Mon Sep 17 00:00:00 2001 From: Erin Millard Date: Thu, 28 Oct 2021 10:06:24 +1000 Subject: [PATCH] Update makefiles --- .eslintignore | 1 - .github/workflows/ci.yml | 2 +- .github/workflows/publish-package.yml | 2 +- .gitignore | 1 - .size-limit.js | 4 ++-- Makefile | 7 ++----- package.json | 14 +++++++------- website/Makefile | 6 +----- 8 files changed, 14 insertions(+), 23 deletions(-) diff --git a/.eslintignore b/.eslintignore index 59cd329..ad380eb 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,3 @@ /artifacts/ -/dist/ /node_modules/ /website/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c15642..2f416c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,4 +24,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: dist - path: dist + path: artifacts/dist diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 6648092..e3f530f 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -30,4 +30,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: dist - path: dist + path: artifacts/dist diff --git a/.gitignore b/.gitignore index 7d8e904..b4db66d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ /.makefiles/ /artifacts/ -/dist/ /node_modules/ /yarn-error.log /yarn.lock diff --git a/.size-limit.js b/.size-limit.js index b7ccfcd..fa178b3 100644 --- a/.size-limit.js +++ b/.size-limit.js @@ -1,10 +1,10 @@ module.exports = [ { - path: 'dist/index.js', + path: 'artifacts/dist/index.js', limit: '100 B', }, { - path: 'dist/index.es.js', + path: 'artifacts/dist/index.es.js', limit: '100 B', }, ] diff --git a/Makefile b/Makefile index 3edacbe..d994a64 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,4 @@ -JS_SOURCE_FILES += $(shell find src -type f -iname "*.ts" 2> /dev/null) -_JS_TEST_ASSETS := $(shell find test -type f -not -iname "*.ts" 2> /dev/null) - -JS_SIZE_LIMIT_REQ += dist +JS_SIZE_LIMIT_REQ += artifacts/dist ################################################################################ @@ -20,7 +17,7 @@ website-%: ################################################################################ -dist: rollup.config.js tsconfig.json node_modules $(JS_SOURCE_FILES) +artifacts/dist: rollup.config.js tsconfig.json node_modules $(JS_SOURCE_FILES) node_modules/.bin/rollup --config rollup.config.js @touch "$@" diff --git a/package.json b/package.json index 6d896ef..683ae91 100644 --- a/package.json +++ b/package.json @@ -18,16 +18,16 @@ "publishConfig": { "access": "public" }, - "main": "dist/index.js", - "module": "dist/index.es.js", - "typings": "dist/index.d.ts", + "main": "artifacts/dist/index.js", + "module": "artifacts/dist/index.es.js", + "typings": "artifacts/dist/index.d.ts", "exports": { - "import": "./dist/index.es.js", - "require": "./dist/index.js" + "import": "./artifacts/dist/index.es.js", + "require": "./artifacts/dist/index.js" }, "sideEffects": false, "files": [ - "/dist/" + "/artifacts/dist/" ], "engines": { "node": ">=14" @@ -35,7 +35,7 @@ "scripts": { "prepublishOnly": "rollup --config rollup.config.js", "size-limit-build": "rollup --config rollup.config.js", - "size-limit-clean": "rm -rf dist" + "size-limit-clean": "rm -rf artifacts/dist" }, "devDependencies": { "@size-limit/preset-small-lib": "^5.0.3", diff --git a/website/Makefile b/website/Makefile index 6e44339..6b97c34 100644 --- a/website/Makefile +++ b/website/Makefile @@ -1,7 +1,3 @@ -SOURCE_FILES += $(shell find src -type f 2> /dev/null) - -################################################################################ - -include .makefiles/Makefile -include .makefiles/pkg/js/v1/Makefile -include .makefiles/pkg/js/v1/with-yarn.mk @@ -26,7 +22,7 @@ ci:: artifacts/docusaurus/build ################################################################################ -artifacts/docusaurus/build: node_modules $(SOURCE_FILES) $(JS_SOURCE_FILES) +artifacts/docusaurus/build: node_modules $(wildcard *.js) $(shell PATH="$(PATH)" git-find static) $(JS_SOURCE_FILES) @rm -rf "$@" @mkdir -p "$@"