Skip to content

Commit

Permalink
Rework build
Browse files Browse the repository at this point in the history
  • Loading branch information
kossnocorp committed Jun 28, 2022
1 parent 7730ba3 commit 59e017d
Show file tree
Hide file tree
Showing 9 changed files with 2,058 additions and 59 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
node_modules
index.js
index.d.ts
/lib
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.PHONY: build
build:
@rm -rf lib
@env npx babel src --source-root src --out-dir lib --extensions .mjs --out-file-extension .js --ignore "src/**/test.ts" --quiet
@rsync --archive --prune-empty-dirs --exclude 'test.ts' --relative src/./ lib

publish: build
@npm publish --access public

publish-next: build
@npm publish --access public --tag next
10 changes: 10 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
// presets: [["@babel/preset-env", { modules: "commonjs", loose: true }]],
plugins: [
[
"@babel/plugin-transform-modules-commonjs",
{ importInterop: "node", loose: true, strict: true },
],
["babel-plugin-add-import-extension", { extension: "js" }],
],
};
Loading

0 comments on commit 59e017d

Please sign in to comment.