extension-create 0.5.2 → 1.0.0

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 +28 -29
  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
@@ -1,47 +0,0 @@
1
- # Contributing to @webextension/start
2
-
3
- ## Getting started
4
-
5
- ```
6
- git clone git@github.com:cezaraugusto/extension-create.git
7
- cd extension-create/develop/start
8
- yarn install
9
- ```
10
-
11
- ## Creating an extension
12
-
13
- `yarn dev:start my-hello-extension` is equivalent of running `npx @webextension/start my-hello-extension`
14
-
15
- ## Running tests
16
-
17
- `cli.test.js` is an evergrowing list of tests covering functionalities exposed to the client. For file testing, see **unit testing**.
18
-
19
- ```
20
- yarn test
21
- ```
22
-
23
- ### Unit testing
24
-
25
- Unit tests are welcome and should live in the same folder as the file it is testing, having one created in case of no tests, suffixed with `.test.js`.
26
-
27
- For example:
28
-
29
- **Before**
30
-
31
- ```
32
- folder/
33
- method1.js
34
- method2.js
35
- method3.js
36
- ```
37
-
38
- **After**
39
-
40
- ```
41
- folder/
42
- method1/
43
- method1.js
44
- method1.spec.js
45
- method2.js
46
- method3.js
47
- ```
package/develop/README.md DELETED
@@ -1,53 +0,0 @@
1
- # @extension-create/develop
2
-
3
- > The `start` part of `extension-create` available as a standalone package.
4
-
5
- This package stores all logic needed by `extension-create` to start new projects.
6
-
7
- ## Installation
8
-
9
- ```
10
- npm i @extension-create/develop
11
- ```
12
-
13
- ## Usage
14
-
15
- There are two ways of using it:
16
-
17
- ### Standalone Executable
18
-
19
- ```
20
- # Will start a new browser instance with my-extension-hello loaded.
21
- npx @extension-create/start my-extension-hello
22
- ```
23
-
24
- ### Imported CLI
25
-
26
- Alternatively, if you're using [commander](https://github.com/tj/commander.js), you can use `@extension-create/start` to extend you CLI. This is what `extension-create` does.
27
-
28
- ```js
29
- const {program} = require('commander')
30
- const startExtensionCLI = require('@extension-create/start')
31
-
32
- const yourCreateProgram = program
33
-
34
- yourCreateProgram.version(packageJson.version)
35
-
36
- startExtensionCLI(yourCreateProgram)
37
-
38
- yourCreateProgram.parse(process.argv)
39
- ```
40
-
41
- ## Program options table
42
-
43
- | Flag | Argument | What it does |
44
- | -------------- | --------- | --------------------------------------------------------- |
45
- | -m, --manifest | file path | Specify a custom path for your extensions's manifest file |
46
-
47
- ## Contributing
48
-
49
- See [CONTRIBUTING.md](CONTRIBUTING.md)
50
-
51
- ## License
52
-
53
- MIT (c) Cezar Augusto.
package/develop/module.js DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // ██████╗ ███████╗██╗ ██╗███████╗██╗ ██████╗ ██████╗
4
- // ██╔══██╗██╔════╝██║ ██║██╔════╝██║ ██╔═══██╗██╔══██╗
5
- // ██║ ██║█████╗ ██║ ██║█████╗ ██║ ██║ ██║██████╔╝
6
- // ██║ ██║██╔══╝ ╚██╗ ██╔╝██╔══╝ ██║ ██║ ██║██╔═══╝
7
- // ██████╔╝███████╗ ╚████╔╝ ███████╗███████╗╚██████╔╝██║
8
- // ╚═════╝ ╚══════╝ ╚═══╝ ╚══════╝╚══════╝ ╚═════╝ ╚═╝
9
-
10
- const {program} = require('commander')
11
-
12
- const startCLI = require('./start/cli')
13
-
14
- module.exports = function develop(clientProgram = program) {
15
- startCLI(clientProgram)
16
- }