Skip to content
This repository has been archived by the owner on Mar 23, 2020. It is now read-only.

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
idleberg committed Aug 29, 2018
1 parent 440dd37 commit 88c8fa9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const updateNotifier = require('update-notifier');
const spdxCodes = Object.getOwnPropertyNames(spdxLicenseList).sort();
const licenseChoices = spdxCodes.map(obj =>{
const licenses = {};
licenses['value'] = terminalLink(obj, `https://spdx.org/licenses/${obj}.html`);
licenses['name'] = terminalLink(obj, `https://spdx.org/licenses/${obj}.html`);
licenses['value'] = obj;

return licenses;
})
Expand Down Expand Up @@ -172,7 +173,8 @@ module.exports = class extends Generator {

props.licenseURL = spdxLicenseList[props.license].url;
props.licenseName = spdxLicenseList[props.license].name;
props.licenseText = spdxLicenseList[props.license].licenseText.replace(/\n/g, '\n\n');
props.licenseText = spdxLicenseList[props.license].licenseText.replace(/\n{3,}/g, '\n\n');
props.repositoryName = (props.name.startsWith('atom-')) ? props.name : `atom-${props.name}`;

// Copying files
props.features.forEach( feature => {
Expand Down
6 changes: 3 additions & 3 deletions generators/app/templates/README.md.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
[![apm](https://flat.badgen.net/apm/license/<%= pkg.name %>)](https://atom.io/packages/<%= pkg.name %>)
[![apm](https://flat.badgen.net/apm/v/<%= pkg.name %>)](https://atom.io/packages/<%= pkg.name %>)
[![apm](https://flat.badgen.net/apm/dl/<%= pkg.name %>)](https://atom.io/packages/<%= pkg.name %>)<% if (pkg.addConfig.includes('circleCI')) { %>
[![CircleCI](https://flat.badgen.net/circleci/github/<%= pkg.author %>/atom-<%= pkg.name %>)](https://circleci.com/gh/<%= pkg.author %>/atom-<%= pkg.name %>)<% } %><% if (pkg.addConfig.includes('travisCI')) { %>
[![Travis](https://flat.badgen.net/travis/<%= pkg.author %>/atom-<%= pkg.name %>)](https://travis-ci.org/<%= pkg.author %>/atom-<%= pkg.name %>)<% } %>
[![CircleCI](https://flat.badgen.net/circleci/github/<%= pkg.author %>/<%= pkg.repositoryName %>)](https://circleci.com/gh/<%= pkg.author %>/<%= pkg.repositoryName %>)<% } %><% if (pkg.addConfig.includes('travisCI')) { %>
[![Travis](https://flat.badgen.net/travis/<%= pkg.author %>/<%= pkg.repositoryName %>)](https://travis-ci.org/<%= pkg.author %>/<%= pkg.repositoryName %>)<% } %>
<% if (pkg.description) { %>
# Description
Expand Down Expand Up @@ -37,7 +37,7 @@ $ cd ~/.atom/packages/
Clone the repository as `<%= pkg.name %>`:
```bash
$ git clone /~https://github.com/<%= pkg.author %>/atom-<%= pkg.name %> <%= pkg.name %>
$ git clone /~https://github.com/<%= pkg.author %>/<%= pkg.repositoryName %> <%= pkg.name %>
```
Install dependencies:
Expand Down
6 changes: 5 additions & 1 deletion generators/app/templates/package.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
],
"repository": {
"type": "git",
"url": "/~https://github.com/<%= pkg.author %>/atom-<%= pkg.name %>"
"url": "/~https://github.com/<%= pkg.author %>/<%= pkg.repositoryName %>"
},
"homepage": "https://atom.io/packages/<%= pkg.name %>",
"bugs": {
"url": "/~https://github.com/<%= pkg.author %>/<%= pkg.repositoryName %>/issues"
},
"license": "<%= pkg.license %>",
"engines": {
Expand Down

0 comments on commit 88c8fa9

Please sign in to comment.