Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit ac941fe

Browse files
committed
2.6.0
2.6.0 - 2017-05-30 ------------------------------------------------------------ * Bumps to kit v1.5.0 * Adds `--js` and `--ts` option for specifying Javascript/Typescript version respectively (closes #41)
1 parent a67b822 commit ac941fe

File tree

4 files changed

+40
-20
lines changed

4 files changed

+40
-20
lines changed

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2.6.0 - 2017-05-30
2+
------------------------------------------------------------
3+
* Bumps to kit v1.5.0
4+
* Adds `--js` and `--ts` option for specifying Javascript/Typescript version respectively (closes #41)
5+
16
2.5.1 - 2017-05-30
27
------------------------------------------------------------
38
* Bumps to kit v1.4.1

bin/reactql

100644100755
File mode changed.

cli/index.js

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ const pkg = require('../package.json');
3333

3434
const versions = {
3535
'kit': {
36-
version: '1.4.1',
37-
date: '2017-05-30',
36+
version: '1.5.0',
37+
date: '2017-06-01',
3838
},
3939
'kit.ts': {
4040
version: '1.1.2',
@@ -243,21 +243,27 @@ const args = yargs
243243
name: `Typescript - v${versions['kit.ts'].version} (${versions['kit.ts'].date})`,
244244
value: 'kit.ts',
245245
},
246-
]
246+
],
247+
when() {
248+
return !(args.js || args.ts);
249+
},
247250
}
248251
];
249252

250253
// Once questions have been answered, we'll have an `answers` object
251254
// containing the responses
252255
inquirer.prompt(questions).then(answers => {
253-
254256
// Inject answers to our `args`, so that we've got a complete set
255257
// of options to use
256258
Object.assign(args, answers);
257259

258260
// Modify path to be absolute
259261
args.path = path.resolve(process.cwd(), args.path);
260262

263+
// Modify repo based on kit flavour
264+
if (args.js) args.repo = 'kit';
265+
else if (args.ts) args.repo = 'kit.ts';
266+
261267
// Create a tmp file stream to save the file locally
262268
const file = temp.createWriteStream();
263269

@@ -397,22 +403,31 @@ const args = yargs
397403
console.log(pkg.version);
398404
},
399405
})
400-
.option('name', {
401-
alias: 'n',
402-
describe: 'New project name',
403-
})
404-
.option('desc', {
405-
alias: 'd',
406-
describe: 'Project description',
407-
})
408-
.option('path', {
409-
alias: 'p',
410-
describe: 'Path to install the starter kit',
411-
})
412-
.option('license', {
413-
alias: 'l',
414-
describe: 'License for pkg.json',
406+
.options({
407+
name: {
408+
alias: 'n',
409+
describe: 'New project name',
410+
},
411+
desc: {
412+
alias: 'd',
413+
describe: 'Project description',
414+
},
415+
path: {
416+
alias: 'p',
417+
describe: 'Path to install the starter kit',
418+
},
419+
license: {
420+
alias: 'l',
421+
describe: 'License for pkg.json',
422+
},
423+
js: {
424+
describe: 'Install Javascript (ES6) version',
425+
},
426+
ts: {
427+
describe: 'Install Typescript version',
428+
}
415429
})
430+
.boolean(['js', 'ts'])
416431
.help()
417432
.argv;
418433

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "reactql",
3-
"version": "2.5.1",
3+
"version": "2.6.0",
44
"description": "Universal React+GraphQL starter kit: React, Apollo, Webpack 2, React Router 4, PostCSS, SSR",
55
"main": "cli/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)