Skip to content

Commit

Permalink
feat: added examples, updated readme, updated packages
Browse files Browse the repository at this point in the history
BREAKING CHANGE: dev dependencies upgrades
  • Loading branch information
stopyransky committed Jun 5, 2021
1 parent bbd85f5 commit 20b10c2
Show file tree
Hide file tree
Showing 7 changed files with 9,051 additions and 13,927 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ NPM_TOKEN

COVERALLS_REPO_TOKEN (optional)

## Change rollup namespace

edit `rollup.config.js` and change name for the global namaespace in umd bundle from MYLIB to anything else

# Useful links

https://github.com/semantic-release/semantic-release/blob/master/docs/usage/ci-configuration.md#authentication
Expand Down
14 changes: 14 additions & 0 deletions examples/example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Example</title>
<script src="../dist/bundle.umd.js"></script>
</head>
<body>
<script>
const example = MYLIB.Example({ name: "foo", type: "bar" });
</script>
</body>
</html>
22,904 changes: 9,006 additions & 13,898 deletions package-lock.json

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,40 +36,40 @@
},
"peerDependencies": {},
"devDependencies": {
"@babel/core": "7.11.6",
"@babel/preset-env": "7.11.5",
"@rollup/plugin-babel": "5.2.1",
"@rollup/plugin-commonjs": "11.1.0",
"@rollup/plugin-node-resolve": "7.1.3",
"@babel/core": "7.14.3",
"@babel/preset-env": "7.14.4",
"@rollup/plugin-babel": "5.3.0",
"@rollup/plugin-commonjs": "19.0.0",
"@rollup/plugin-node-resolve": "13.0.0",
"@semantic-release/changelog": "5.0.1",
"@semantic-release/commit-analyzer": "8.0.1",
"@semantic-release/git": "9.0.0",
"@semantic-release/npm": "7.0.6",
"@semantic-release/release-notes-generator": "9.0.1",
"@types/jest": "26.0.14",
"@typescript-eslint/eslint-plugin": "4.4.1",
"@typescript-eslint/parser": "4.4.1",
"@semantic-release/npm": "7.1.3",
"@semantic-release/release-notes-generator": "9.0.2",
"@types/jest": "26.0.23",
"@typescript-eslint/eslint-plugin": "4.26.0",
"@typescript-eslint/parser": "4.26.0",
"babel-core": "6.26.3",
"babel-jest": "26.5.2",
"babel-jest": "27.0.2",
"commitizen": "4.2.4",
"coveralls": "3.1.0",
"cz-conventional-changelog": "3.2.0",
"eslint": "^7.10.0",
"eslint-config-prettier": "6.13.0",
"eslint-plugin-jest": "24.1.0",
"cz-conventional-changelog": "3.3.0",
"eslint": "7.28.0",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-jest": "24.3.6",
"eslint-plugin-prettier": "^3.1.4",
"husky": "4.3.0",
"jest": "26.5.3",
"lint-staged": "10.4.0",
"prettier": "^2.1.2",
"prettier-eslint": "^11.0.0",
"husky": "6.0.0",
"jest": "27.0.4",
"lint-staged": "11.0.0",
"prettier": "2.3.1",
"prettier-eslint": "12.0.0",
"prettier-eslint-cli": "^5.0.0",
"rimraf": "3.0.2",
"rollup": "2.30.0",
"rollup": "2.50.6",
"rollup-plugin-terser": "7.0.2",
"rollup-plugin-typescript2": "0.27.3",
"rollup-plugin-typescript2": "0.30.0",
"semantic-release": "^17.4.3",
"ts-jest": "26.4.1",
"ts-jest": "27.0.2",
"typescript": "^4.0.3"
},
"release": {
Expand Down
6 changes: 2 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default {
{
file: 'dist/bundle.umd.js',
format: 'umd',
name: 'FH',
name: 'MYLIB',
globals: {
react: 'React',
'react-dom': 'ReactDOM',
Expand All @@ -36,9 +36,7 @@ export default {
exclude: 'node_modules/**',
}),
resolve(),
commonjs({
namedExports: { react: ['createElement', 'Component'] },
}),
commonjs(),
typescript({ useTsconfigDeclarationDir: true }),
production && terser({ format: { comments: false } }),
],
Expand Down
2 changes: 1 addition & 1 deletion src/example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ function helloWorld(): boolean {
return true;
}

export { Example, helloWorld };
export { Example, helloWorld, IParams };
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { helloWorld } from './example';
export { Example, helloWorld, IParams } from './example';

0 comments on commit 20b10c2

Please sign in to comment.