generator-hubble 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,12 +16,6 @@ export default class extends Generator {
16
16
 
17
17
 
18
18
  const prompts = [
19
- {
20
- type: "confirm",
21
- name: "areYouSure",
22
- message: `Would you like to create the project in the current directory?`,
23
- default: true
24
- },
25
19
  {
26
20
  type: "string",
27
21
  name: "packageName",
@@ -47,6 +41,12 @@ export default class extends Generator {
47
41
  name: "gitUserName",
48
42
  message: "What's the author's GitHub username?",
49
43
  },
44
+ {
45
+ type: "confirm",
46
+ name: "areYouSure",
47
+ message: `Would you like to create the project?`,
48
+ default: true
49
+ },
50
50
  ];
51
51
 
52
52
  return this.prompt(prompts).then(props => {
@@ -56,43 +56,16 @@ export default class extends Generator {
56
56
  }
57
57
 
58
58
  writing() {
59
- if(this.props.areYouSure) {
60
-
61
-
62
- const NON_TPLS = [
63
- 'artifacts',
64
- 'build',
65
- 'resources/icon.svg',
66
- 'src/hello-world.ts',
67
- 'src/tailwind.css',
68
- '.gitignore',
69
- 'rollup.config.js',
70
- 'tailwind.config.js',
71
- 'typings.d.ts',
72
- ];
73
-
74
- const TPLS = [
75
- '_index.html',
76
- '_package.json',
77
- '_README.md',
78
- ];
79
-
80
- NON_TPLS.map((n) => {
81
- return this.fs.copy(
82
- this.templatePath(n),
83
- this.destinationPath(n),
84
- this.props);
85
- });
86
-
87
- TPLS.map((n) => {
88
- return this.fs.copyTpl(
89
- this.templatePath(n),
90
- this.destinationPath(n.replace(/(_)/gi, '')),
91
- this.props);
92
- });
59
+ if(this.props.AreYouSure) {
60
+ this.log( chalk.blue(`🎉 Creating ${this.props.packageName} and copying files...`) )
61
+ this.fs.copyTpl(
62
+ this.templatePath(),
63
+ this.destinationPath(this.props.packageName),
64
+ this.props,
65
+ );
93
66
  }
94
67
  else {
95
- this.log( chalk.red(`🔥 Canceling ${this.props.name}...`) )
68
+ this.log( chalk.red(`🔥 Canceling ${this.props.packageName}...`) )
96
69
  }
97
70
  }
98
71
 
@@ -102,17 +75,18 @@ export default class extends Generator {
102
75
 
103
76
  if(!this.props.areYouSure) return undefined;
104
77
 
105
- this.log( chalk.green(`🎉 Created ${this.props.name} and copied files...`) )
78
+ this.log( chalk.green(`🎉 Created ${this.props.packageName} and copied files...`) )
106
79
 
107
80
  this.log( `${chalk.blue(`📚 Installing dependencies...`)}` )
108
81
 
109
- await execute(`cd ${this.props.name} && npm i`);
82
+ await execute(`cd ${this.props.packageName} && npm i`);
110
83
 
111
84
  this.log( `${chalk.green(`📚 Installed dependencies...`)}` )
112
85
 
113
86
  this.log()
114
- this.log(`${chalk.blue(`cd ${this.props.name} && npm start`)}` )
115
- this.log(`🚀 Run above to go to your new project and start it up` )
87
+ this.log(`🚀 Run the below line to go and watch and build your hubble` )
88
+ this.log()
89
+ this.log(`${chalk.blue(`cd ${this.props.packageName} && npm run dev`)}` )
116
90
  this.log()
117
91
  }
118
92
  catch (error) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "generator-hubble",
3
3
  "type": "module",
4
- "version": "0.0.2",
4
+ "version": "0.0.4",
5
5
  "description": "A yeoman generator to easily create a lit-element project with tailwindcss and typescript",
6
6
  "homepage": "https://github.com/jsmithdev/generator-hubble",
7
7
  "author": {