Skip to content

Commit

Permalink
fix: tsconfig for elements to build storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
duong-se committed Feb 12, 2020
1 parent 0b92af8 commit 777fc62
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
2 changes: 0 additions & 2 deletions packages/cognito-auth/src/scripts/check-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const { npm_package_version: currentPackageVersion, npm_package_name: npmPackage
const { runCommand } = require('../../../scripts/release/utils')

const remotePackageVersion = runCommand('yarn', ['info', npmPackageName, 'version'])
.toString()
.trim()
const compareVersions = require('compare-versions')

if (remotePackageVersion === '') {
Expand Down
3 changes: 1 addition & 2 deletions packages/elements/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"module": "dist/elements.esm.js",
"typings": "dist/index.d.ts",
"scripts": {
"build-storybook": "build-storybook -o out",
"build:prod": "rimraf dist && rimraf out && cross-env NODE_ENV=production tsdx build --format=cjs,esm,umd && rollup -c && build-storybook",
"build:prod": "rimraf dist && rimraf out && cross-env NODE_ENV=production tsdx build --format=cjs,esm,umd && rollup -c && build-storybook -o out",
"release:prod": "node ../../scripts/release/release-npm.js @reapit/elements && gh-pages -d out",
"start:dev": "start-storybook -p 6006",
"start:prod": "cross-env NODE_ENV=development tsdx watch",
Expand Down
5 changes: 4 additions & 1 deletion packages/elements/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
"moduleResolution": "node",
"types": ["jest", "node", "react"],
"baseUrl": "./",
"paths": {
"@/*": ["src/*"],
"@reapit/cognito-auth": ["../cognito-auth/src"]
},
"lib": ["es2015", "es2017", "dom", "es5", "es6", "esnext"],
"outDir": "public",
"rootDir": "src",
"sourceRoot": "/"
},
"include": ["src"]
Expand Down
5 changes: 1 addition & 4 deletions packages/foundations-ts-definitions/scripts/bump-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ const { npm_package_name } = process.env
const packageJsonPath = path.resolve(__dirname, '../package.json')

module.exports = () => {
const remotePackageVersionStdOut = runCommand('yarn', ['info', npm_package_name, 'version'])
.toString()
.trim()
.split('\n')
const remotePackageVersionStdOut = runCommand('yarn', ['info', npm_package_name, 'version']).split('\n')
let remotePackageVersion = ''

// Ex of remotePackageVersionStdOut: ['0.0.0']
Expand Down
2 changes: 0 additions & 2 deletions packages/foundations-ts-definitions/scripts/check-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const { runCommand } = require('../../../scripts/release/utils')
const { npm_package_version: currentPackageVersion, npm_package_name: npmPackageName } = process.env

const remotePackageVersion = runCommand('yarn', ['info', npmPackageName, 'version'])
.toString()
.trim()
const compareVersions = require('compare-versions')

if (!remotePackageVersion) {
Expand Down

0 comments on commit 777fc62

Please sign in to comment.