Skip to content

Commit

Permalink
feat(template): publish dist/ instead of root dir to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
phatpham9 committed Mar 25, 2020
1 parent 05a716d commit fe6fc83
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion generators/app/templates/.github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Build source
run: yarn build
- name: Publish package
run: yarn publish --access public
run: yarn publish dist --access public
env:
# Create your own token at https://github.com/organization/repository/settings/secrets
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
9 changes: 4 additions & 5 deletions generators/app/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@
"license": "MIT",
"author": "<%- elementAuthor %>",
"repository": "<%= elementRepository %>",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"files": [
"dist"
],
"main": "index.js",
"typings": "index.d.ts",
"scripts": {
"purge": "rm -rf node_modules",
"clean": "rm -rf dist",
Expand All @@ -21,13 +18,15 @@
"lint": "tslint --project tsconfig.json --config tslint.json",
"prebuild": "yarn clean",
"build": "rollup -c",
"postbuild": "copyfiles CHANGELOG.md LICENSE package.json README.md dist",
"release": "standard-version --no-verify",
"release:major": "yarn release --release-as major",
"release:minor": "yarn release --release-as minor",
"release:patch": "yarn release --release-as patch"
},
"devDependencies": {
"@boringcodes/prettier-config": "*",
"copyfiles": "^2.2.0",
"husky": "^2.3.0",
"prettier": "^2.0.2",
"pretty-quick": "^2.0.1",
Expand Down

0 comments on commit fe6fc83

Please sign in to comment.