generator-hubble 0.0.6 → 0.0.8

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: `Are you sure you want to create the project?`,
48
+ default: true
49
+ },
50
50
  ];
51
51
 
52
52
  return this.prompt(prompts).then(props => {
@@ -61,7 +61,7 @@ export default class extends Generator {
61
61
  this.log( chalk.blue(`🎉 Copying files...`) )
62
62
  this.fs.copyTpl(
63
63
  this.templatePath(),
64
- this.destinationPath(),
64
+ this.destinationPath(this.props.packageName),
65
65
  this.props,
66
66
  );
67
67
  }
@@ -73,21 +73,25 @@ export default class extends Generator {
73
73
  async install(){
74
74
  try {
75
75
 
76
-
77
76
  if(!this.props.areYouSure) return undefined;
78
77
 
79
- this.log( chalk.green(`🎉 Created ${this.props.packageName}...`) )
80
-
81
78
  this.log( `${chalk.blue(`📚 Installing dependencies...`)}` )
82
79
 
83
- await execute(`npm i`);
84
-
85
- this.log( `${chalk.green(`📚 Installed dependencies...`)}` )
86
-
87
- this.log(`🚀 Happy Hacking` )
80
+ try {
81
+ await execute(`cd ${this.destinationPath(this.props.packageName)} && npm i`);
82
+
83
+ this.log( `${chalk.green(`📚 Installed dependencies...`)}` )
84
+
85
+ this.log( `${chalk.green(`🚀 Successfully created ${this.props.packageName} hubble!`)}` )
86
+ }
87
+ catch (error) {
88
+ this.log( `🔥 ${chalk.red(`Failed to install dependencies:`)} ${error.message}` )
89
+ this.log( `${chalk.blue(`Be sure to install dependencies later (npm install)`)}` )
90
+ this.log( `${chalk.green(`🚀 Successfully created ${this.props.packageName} hubble!`)}` )
91
+ }
88
92
  }
89
93
  catch (error) {
90
- this.log( `🔥 ${chalk.red(`Error Installing: ${error.message}`)}` )
94
+ this.log( `🔥 ${chalk.red(`Error Installing:`)} ${error.message}` )
91
95
  }
92
96
  }
93
97
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "generator-hubble",
3
3
  "type": "module",
4
- "version": "0.0.6",
5
- "description": "A yeoman generator to easily create a lit-element project with tailwindcss and typescript",
4
+ "version": "0.0.8",
5
+ "description": "A yeoman generator to quickly create hubbles with lit, tailwind and typescript.",
6
6
  "homepage": "https://github.com/jsmithdev/generator-hubble",
7
7
  "author": {
8
8
  "name": "jsmithdev",
@@ -21,68 +21,17 @@
21
21
  "generator",
22
22
  "yeoman-generator"
23
23
  ],
24
- "devDependencies": {
25
- "coveralls": "^3.0.7",
26
- "eslint": "^6.6.0",
27
- "eslint-config-prettier": "^6.6.0",
28
- "eslint-config-xo": "^0.27.2",
29
- "eslint-plugin-prettier": "^3.1.1",
30
- "husky": "^3.0.9",
31
- "jest": "^26.1.0",
32
- "lint-staged": "^9.4.3",
33
- "prettier": "^1.19.1",
34
- "yeoman-assert": "^3.1.1",
35
- "yeoman-test": "^6.3.0"
36
- },
37
24
  "engines": {
38
25
  "npm": ">= 4.0.0"
39
26
  },
40
27
  "dependencies": {
41
- "chalk": "^2.1.0",
42
- "yeoman-generator": "^5.6.1",
43
- "yosay": "^2.0.2"
44
- },
45
- "jest": {
46
- "testEnvironment": "node"
47
- },
48
- "lint-staged": {
49
- "*.js": [
50
- "eslint --fix",
51
- "git add"
52
- ],
53
- "*.json": [
54
- "prettier --write",
55
- "git add"
56
- ]
57
- },
58
- "husky": {
59
- "hooks": {
60
- "pre-commit": "lint-staged"
61
- }
62
- },
63
- "eslintConfig": {
64
- "extends": [
65
- "xo",
66
- "prettier"
67
- ],
68
- "env": {
69
- "jest": true,
70
- "node": true
71
- },
72
- "rules": {
73
- "prettier/prettier": "off"
74
- },
75
- "plugins": [
76
- "prettier"
77
- ]
78
- },
79
- "scripts": {
80
- "pretest": "eslint .",
81
- "test": "jest"
28
+ "chalk": "^5.6.2",
29
+ "yeoman-generator": "^7.5.1",
30
+ "yosay": "^3.0.0"
82
31
  },
83
32
  "repository": {
84
33
  "type": "git",
85
- "url": "https://github.com/jsmithdev/generator-hubble"
34
+ "url": "git+https://github.com/jsmithdev/generator-hubble.git"
86
35
  },
87
36
  "license": "MIT"
88
37
  }