File tree Expand file tree Collapse file tree 4 files changed +4
-6
lines changed Expand file tree Collapse file tree 4 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
1
"use strict" ;
2
2
var validateNpm = require ( 'validate-npm-package-name' ) ;
3
- var lodash_kebabcase_1 = require ( 'lodash.kebabcase' ) ;
4
3
function validatePackageName ( name ) {
5
4
return new Promise ( function ( resolve , reject ) {
6
5
var validated = validateNpm ( name ) ;
@@ -24,7 +23,7 @@ function validatePackageName(name) {
24
23
if ( ! validated . errors && ! validated . warnings ) {
25
24
throw {
26
25
type : 'error' ,
27
- msg : "\nInvalid package name. Try using kebab-case.\n > coderoad create " + lodash_kebabcase_1 . default ( name ) + " \n"
26
+ msg : "\nInvalid package name. Try using kebab-case.\n > coderoad create coderoad-your-package- name\n"
28
27
} ;
29
28
}
30
29
}
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ function createFolder(pathToFolder) {
27
27
}
28
28
var tutorialFolders = [ [ ] , [ '01' ] , [ '02' ] ] ;
29
29
var tutorialDemo = [
30
+ [ '..' , '.gitignore' ] ,
30
31
[ 'tutorial.md' ] ,
31
32
[ '01' , 'index.md' ] ,
32
33
[ '01' , '01.js' ] ,
@@ -37,7 +38,6 @@ var tutorialDemo = [
37
38
] ;
38
39
function createTutorialMd ( dir ) {
39
40
return new Promise ( function ( resolve , reject ) {
40
- createFile ( dir , '.gitignore' ) ;
41
41
var tutorialDir = path_1 . join ( dir , 'tutorial' ) ;
42
42
if ( ! node_file_exists_1 . default ( path_1 . join ( tutorialDir ) ) ) {
43
43
tutorialFolders . forEach ( function ( folder ) { return createFolder ( path_1 . join . apply ( void 0 , [ dir , 'tutorial' ] . concat ( folder ) ) ) ; } ) ;
Original file line number Diff line number Diff line change 1
1
import * as validateNpm from 'validate-npm-package-name' ;
2
- import kebabCase from 'lodash.kebabcase' ;
3
2
4
3
// TODO: use ../validate/name
5
4
@@ -27,7 +26,7 @@ export function validatePackageName(name: string): Promise<boolean> {
27
26
throw {
28
27
type : 'error' ,
29
28
msg : `\nInvalid package name. Try using kebab-case.
30
- > coderoad create ${ kebabCase ( name ) } \n`
29
+ > coderoad create coderoad-your-package- name\n`
31
30
} ;
32
31
}
33
32
}
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ function createFolder(pathToFolder: string): void {
28
28
const tutorialFolders = [ [ ] , [ '01' ] , [ '02' ] ] ;
29
29
30
30
const tutorialDemo = [
31
+ [ '..' , '.gitignore' ] ,
31
32
[ 'tutorial.md' ] ,
32
33
[ '01' , 'index.md' ] ,
33
34
[ '01' , '01.js' ] ,
@@ -39,7 +40,6 @@ const tutorialDemo = [
39
40
40
41
export function createTutorialMd ( dir : string ) : Promise < boolean > {
41
42
return new Promise ( ( resolve , reject ) => {
42
- createFile ( dir , '.gitignore' ) ;
43
43
const tutorialDir = join ( dir , 'tutorial' ) ;
44
44
if ( ! fileExists ( join ( tutorialDir ) ) ) {
45
45
tutorialFolders . forEach (
You can’t perform that action at this time.
0 commit comments