Comparing version 0.21.2 to 0.21.3
@@ -0,1 +1,13 @@ | ||
## [Version 0.21.3](https://github.com/egoist/sao/releases/tag/v0.21.3) (2017-8-5) | ||
### New features | ||
- support explict npm package name, closed [#35](https://github.com/egoist/sao/issues/35): [`45b1815`](https://github.com/egoist/sao/commit/45b1815) | ||
### Bug fixes | ||
- use actual package version to store prompt answers: [`207f44e`](https://github.com/egoist/sao/commit/207f44e) | ||
[...full changes](https://github.com/egoist/sao/compare/v0.21.2...v0.21.3) | ||
## [Version 0.21.2](https://github.com/egoist/sao/releases/tag/v0.21.2) (2017-8-5) | ||
@@ -2,0 +14,0 @@ |
@@ -33,2 +33,3 @@ 'use strict' | ||
let dest | ||
let templateVersion = parsed.version || '' | ||
@@ -93,5 +94,8 @@ if (parsed.type === 'local') { | ||
const templatePkg = require(path.join(dest, 'package.json')) | ||
templateVersion = templatePkg.version | ||
if (updateNotify) { | ||
// Run update notifier for package template | ||
utils.updateNotify(require(path.join(dest, 'package.json'))) | ||
utils.updateNotify(templatePkg) | ||
} | ||
@@ -107,3 +111,3 @@ } | ||
remove: removeStore, | ||
key: utils.escapeDots(`${dest}-${parsed.version || ''}`), | ||
key: utils.escapeDots(`${dest}-${templateVersion}`), | ||
skipStored: skipStore | ||
@@ -110,0 +114,0 @@ }, |
@@ -5,3 +5,3 @@ const path = require('path') | ||
module.exports = template => { | ||
function parse(template, templatePrefix = true) { | ||
if (/^[./]|(^[a-zA-Z]:)/.test(template)) { | ||
@@ -14,2 +14,7 @@ return { | ||
// Explict npm name | ||
if (/^npm:/.test(template)) { | ||
return parse(template.replace(/^npm:/, ''), false) | ||
} | ||
// npm package | ||
@@ -20,3 +25,3 @@ if (!/\//.test(template)) { | ||
type: 'npm', | ||
name: ensurePackageName(name), | ||
name: templatePrefix ? ensurePackageName(name) : name, | ||
version | ||
@@ -35,3 +40,3 @@ } | ||
user, | ||
name: ensurePackageName(name), | ||
name: templatePrefix ? ensurePackageName(name) : name, | ||
version | ||
@@ -53,1 +58,3 @@ } | ||
} | ||
module.exports = parse |
{ | ||
"name": "sao", | ||
"version": "0.21.2", | ||
"version": "0.21.3", | ||
"description": "Futuristic project generator.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
35477
565