extension-create 0.5.2 → 1.0.2

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.
Files changed (64) hide show
  1. package/README.md +27 -30
  2. package/dist/cli.d.ts +1 -0
  3. package/dist/cli.js +252 -0
  4. package/package.json +51 -38
  5. package/LICENSE +0 -21
  6. package/cli.js +0 -40
  7. package/create/CONTRIBUTING.md +0 -47
  8. package/create/README.md +0 -53
  9. package/create/cli.js +0 -58
  10. package/create/cli.test.js +0 -35
  11. package/create/createExtension.js +0 -41
  12. package/create/messages/directoryHasConflicts.js +0 -36
  13. package/create/messages/index.js +0 -16
  14. package/create/messages/programHelp.js +0 -26
  15. package/create/messages/successfullInstall.js +0 -24
  16. package/create/package.json +0 -38
  17. package/create/steps/abortProjectAndClean.js +0 -43
  18. package/create/steps/cleanTemplateFolder.js +0 -26
  19. package/create/steps/createDirectory.js +0 -41
  20. package/create/steps/getTemplatePath.js +0 -23
  21. package/create/steps/importExternalTemplate.js +0 -42
  22. package/create/steps/importLocalTemplate.js +0 -31
  23. package/create/steps/installDependencies.js +0 -58
  24. package/create/steps/writePackageJson.js +0 -64
  25. package/create/templates/standard/.gitignore +0 -21
  26. package/create/templates/standard/README.md +0 -14
  27. package/create/templates/standard/package.json +0 -26
  28. package/create/templates/standard/template/.gitignore +0 -21
  29. package/create/templates/standard/template/README.md +0 -0
  30. package/create/templates/standard/template/manifest.json +0 -27
  31. package/create/templates/standard/template/newtab/newtab.html +0 -27
  32. package/create/templates/standard/template/newtab/newtab.js +0 -1
  33. package/create/templates/standard/template/newtab/styles.css +0 -43
  34. package/create/templates/standard/template/popup/popup.css +0 -26
  35. package/create/templates/standard/template/popup/popup.html +0 -15
  36. package/create/templates/standard/template/popup/popup.js +0 -1
  37. package/create/templates/standard/template/public/icon/test_16.png +0 -0
  38. package/create/templates/standard/template/public/icon/test_32.png +0 -0
  39. package/create/templates/standard/template/public/icon/test_48.png +0 -0
  40. package/create/templates/standard/template/public/icon/test_64.png +0 -0
  41. package/create/templates/standard/template/public/puzzle.png +0 -0
  42. package/create/templates/standard/template.json +0 -5
  43. package/create/yarn.lock +0 -4462
  44. package/develop/CONTRIBUTING.md +0 -47
  45. package/develop/README.md +0 -53
  46. package/develop/module.js +0 -16
  47. package/develop/package-lock.json +0 -7979
  48. package/develop/package.json +0 -37
  49. package/develop/start/cli.js +0 -47
  50. package/develop/start/cli.test.js +0 -43
  51. package/develop/start/config/browserSwitch.js +0 -31
  52. package/develop/start/config/compiler.js +0 -31
  53. package/develop/start/config/server.js +0 -17
  54. package/develop/start/messages/index.js +0 -14
  55. package/develop/start/messages/manifestNotFound.js +0 -22
  56. package/develop/start/messages/programHelp.js +0 -49
  57. package/develop/start/resolve/resolveExtensionPath.js +0 -45
  58. package/develop/start/startExtension.js +0 -72
  59. package/develop/start/steps/resolveManifest.js +0 -44
  60. package/develop/start/steps/startWebpack.js +0 -49
  61. package/develop/yarn.lock +0 -6908
  62. package/messages.js +0 -57
  63. package/preinstall.sh +0 -10
  64. package/reservedKeywords.js +0 -17
package/messages.js DELETED
@@ -1,57 +0,0 @@
1
- const {log} = require('log-md')
2
-
3
- function help () {
4
- log(`
5
- # Help center for the extension-create program
6
-
7
- ## Usage: \`extension-create [command] [options]\`
8
-
9
- **Note:** If you are looking for a specific list of options,
10
- all high-level commands offer their own \`--help\` file with
11
- information about usage and a list of command flags available.
12
-
13
- For example:
14
-
15
- \`extension-create create --help\`
16
- outputs information about the \`create\` command.
17
-
18
- ## Options available
19
-
20
- \`extension-create create <extension-name>\`
21
- Creates a new extension from template. The "create" command
22
- is optional and can be ommitted.
23
-
24
- \`extension-create start <extension-path>\`
25
- Starts a new browser instance with the target extension loaded
26
- and set up as a modern web app including esnext and module support.
27
-
28
- \`extension-create --help\`
29
- This command ;) Outputs a help file with key command options.
30
-
31
- Feels something is wrong? Help by reporting a bug:
32
- https://github.com/cezaraugusto/extension-create/issues/new
33
- `)
34
- }
35
-
36
- function unsupportedNodeVersion () {
37
- log(`
38
- You are using an unsupported Node version (${process.version}).
39
-
40
- Please update to a version higher than 10.
41
- `)
42
- }
43
-
44
- function noURLWithoutStart (argument) {
45
- log(`
46
- The default \`create\` command does not accept URLs.
47
- Are you forgetting a \`start\` command? Maybe:
48
-
49
- npx extension-create \`start\` ${argument}
50
- `)
51
- }
52
-
53
- module.exports = {
54
- help,
55
- unsupportedNodeVersion,
56
- noURLWithoutStart
57
- }
package/preinstall.sh DELETED
@@ -1,10 +0,0 @@
1
- function install {
2
- if ! command -v yarn &> /dev/null
3
- then
4
- npm install
5
- else
6
- yarn install
7
- fi
8
- }
9
- cd create && install && cd ..
10
- cd develop && install && cd ..
@@ -1,17 +0,0 @@
1
- // List of words you can't use as a name for your project
2
- // because they conflict with either current or future program commands
3
- const reservedKeywords = [
4
- 'build',
5
- 'eject',
6
- 'start',
7
- 'test',
8
- 'open',
9
- 'deploy'
10
- ]
11
-
12
- module.exports = function () {
13
- const commands = process.argv
14
-
15
- return reservedKeywords
16
- .some((word, index) => word === commands[index])
17
- }