Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish commonjs/esmodules and allow tree shaking #1

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

1 change: 0 additions & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
.*/node_modules/npm
.*/node_modules/eslint-plugin-compat
.*/node_modules/jsonlint
.*/dist/module
[include]
[libs]
flow-typed
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,7 @@ flow-typed
.idea

.DS_Store
package-lock.json
package-lock.json

/es
/lib
2 changes: 0 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ $ npm install

# Run scripts to verify installation
$ npm test
$ npm run-script lint
$ npm run-script cover
Copy link
Author

@christianpv christianpv Apr 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm test runs the lint command. There is not cover command.

```

## Making Changes
Expand Down
23 changes: 23 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// eslint-disable-next-line import/no-commonjs,flowtype/require-valid-file-annotation
module.exports = (api) => {
const modules = api.env() === 'esm' ? false : 'auto';
return {
extends: 'grumbler-scripts/config/.babelrc-browser',
presets: [
[
'@babel/env',
{
modules
}
]
],
plugins: [
[
'@babel/plugin-transform-runtime',
{
'useESModules': !modules
}
]
]
};
};
7 changes: 0 additions & 7 deletions dist/module/button/create.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/module/button/index.js

This file was deleted.

59 changes: 0 additions & 59 deletions dist/module/common.js

This file was deleted.

14 changes: 0 additions & 14 deletions dist/module/constants.js

This file was deleted.

51 changes: 0 additions & 51 deletions dist/module/deserialize.js

This file was deleted.

6 changes: 0 additions & 6 deletions dist/module/index.js

This file was deleted.

114 changes: 0 additions & 114 deletions dist/module/index.js.flow

This file was deleted.

44 changes: 0 additions & 44 deletions dist/module/serialize.js

This file was deleted.

6 changes: 0 additions & 6 deletions dist/module/serializers/array.js

This file was deleted.

6 changes: 0 additions & 6 deletions dist/module/serializers/boolean.js

This file was deleted.

8 changes: 0 additions & 8 deletions dist/module/serializers/date.js

This file was deleted.

Loading