Skip to content

Commit

Permalink
Merge pull request #94 from docknetwork/sdk-imports
Browse files Browse the repository at this point in the history
Refactor SDK import and build process
  • Loading branch information
cykoder authored May 4, 2020
2 parents f9069b0 + bf8efa0 commit 8c333a1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ jobs:
node-version: '10.x'
registry-url: https://registry.npmjs.org/
- run: yarn install
- run: npm publish --access public
- run: yarn build
- run: cp -rf dist/index.cjs.js src
- run: cp -rf dist/index.esm.js src
- run: cp -rf package.json src
- run: cd src && npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@docknetwork/sdk",
"version": "0.0.2",
"main": "dist/sdk.cjs.js",
"module": "dist/sdk.esm.js",
"version": "0.0.3",
"main": "index.cjs.js",
"module": "index.esm.js",
"license": "MIT",
"type": "module",
"repository": {
Expand Down Expand Up @@ -34,7 +34,6 @@
},
"scripts": {
"lint": "eslint \"{src,example}/**/*.js\"",
"prepare": "yarn build",
"build": "rollup -c",
"watch": "rollup -c -w",
"test": "jest --verbose ./tests/unit",
Expand All @@ -53,7 +52,6 @@
"testEnvironment": "node"
},
"files": [
"dist",
"src"
],
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export default [
input: 'src/api.js',
external: [],
output: [
{ file: pkg.main, format: 'cjs' },
{ file: pkg.module, format: 'es' },
{ file: 'dist/' + pkg.main, format: 'cjs' },
{ file: 'dist/' + pkg.module, format: 'es' },
],
},
];

0 comments on commit 8c333a1

Please sign in to comment.