Skip to content

Commit

Permalink
Update makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
ezzatron committed Oct 28, 2021
1 parent 1259d5c commit e53bdf5
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 23 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/artifacts/
/dist/
/node_modules/
/website/
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: dist
path: dist
path: artifacts/dist
2 changes: 1 addition & 1 deletion .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: dist
path: dist
path: artifacts/dist
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/.makefiles/
/artifacts/
/dist/
/node_modules/
/yarn-error.log
/yarn.lock
4 changes: 2 additions & 2 deletions .size-limit.js
Original file line number Diff line number Diff line change
@@ -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',
},
]
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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

################################################################################

Expand All @@ -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 "$@"
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,24 @@
"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"
},
"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",
Expand Down
6 changes: 1 addition & 5 deletions website/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 "$@"

Expand Down

0 comments on commit e53bdf5

Please sign in to comment.