Skip to content

Commit

Permalink
PackageDetail: install code: fix https config link, add code without …
Browse files Browse the repository at this point in the history
…config
  • Loading branch information
dmstern committed Nov 22, 2018
1 parent 6c96696 commit 3be5280
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/views/PackageDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,11 @@
<v-flex xs12 md5 xl4 order-xs1 order-md2 class="meta-panel">
<v-layout row wrap>
<PackageDetailItem title="install" :bigContent="false" v-if="data.config && data.config.artifactory" :icon="$vuetify.icons.install" :full="true">
<h3>With global npm registry configuration</h3>
<CodeBlock :code="getInstallCode().config" language="bash"></CodeBlock>
<CodeBlock :code="getInstallCode().install" language="bash"></CodeBlock>
<h3>Without changing your global npm configuration</h3>
<CodeBlock :code="`npm i ${data.versionsHistory[data.currentPackage.version].dist.tarball}`" language="bash"></CodeBlock>
<v-btn
color="success"
class="v-btn--standalone"
Expand Down Expand Up @@ -617,9 +620,9 @@ export default class PackageDetail extends Vue {
return {
config: `npm config set ${
this.data.packageDetail.scope ? this.data.packageDetail.scope + ':' : ''
}registry http://${this.data.config.artifactory.host}/artifactory/api/npm/${
this.data.config.artifactory.repoKey
}/`,
}registry http${this.data.config.artifactory.https ? 's' : ''}://${
this.data.config.artifactory.host
}/artifactory/api/npm/${this.data.config.artifactory.repoKey}/`,
install: `npm i ${this.data.packageDetail.name}`,
};
}
Expand Down

0 comments on commit 3be5280

Please sign in to comment.