Commit f1891fe
Remote Templates (#329)
* install `gittar`
* remove flags: css,sass,less,dest,type
* purge *css flag-related stuffs
* extract yarn-vs-npm logic before printing
* replace ansi-codes with `chalk.green`
* extract `pkgFile` path
* use `argv.name` within pkg & manifest (Closes #326)
- declare `log-symbols` as a dependency
- it is already a direct dependency of `ora`
* extract an `error` helper
- with nice symbol & formatting
* uninstall `recursive-copy`
* extract `isDir` helper
- uses *sync versions, but oh well
* replace `copy` with `gittar.extract` - with filter
* move `target` + `exists` + `force` logic first;
- will need to verify a destination before extracting/downloading
- will prompt (TODO) if incomplete
- will abort if unsafe
* use `argv.dest` for final instructions
* fix typo
* export `setup` functions directly
* remove debug-type stdout from `initGit`
* move common helpers to `util` file;
- use more partial import statements
* move `commandExists` —> `util.hasCommand`;
- uses which.sync 🙊
- update function calls
- remove `async` from `pkgScripts`
* check if `yarn` bin exists on flag parsing;
- instead of checking 5x per `setup` function
- return `async` function directly from `initialize`
* consolidate `setup.pkgScripts` function
* do not write a `gitignore` file
- template concern
* minor cleanup, warn if no `git` binary found
* oops, fix regex tester
* don’t assume exit within `util.error`
* use `warn` within watch command
* use `util.isDir` within serve command
* remove `init` command publicly
* Merge `master` into `templates`
* alias “official” preact-cli templates by name
- only `default` & `full` for now
* simplify `install` — install template deps
* move `trimLeft` —> `util.trim`
* remove `initialize` from setup;
- assumed template ships own `package.json` already
* simplify package-related `create`
- change `pkg.name` & `mani.name` if set
- set default `pkg.scripts` if none provided
- will dynamically install `if-env` for `start` script
* only extract `/template/` filepaths
- strip:2 to remove “template” from dest name
* add extra TODO note
* define `done` handler before export
* update `test/subjects` names
- fixes test? /shrug
* [MAJOR] tests refactor
- supports new `create` command
- refactor utility methods
- change snapshot handling
— comparison & taking
- rename `WITH_INSTALL` —> `SKIP_INSTALL`
- remove `setup` step; not needed
* move `serve.snapshot` —>`images/serve`
* add `deprecated` notice on `build.snapshot` file
* remove unused `exists` helper
* Fix tests/image/create.js test error
* Revert "Fix tests/image/create.js test error"
This reverts commit ca3b235.
* [Travis] only build `master` branch
- PRs are still built
* remove `commands/init` file
- somehow `recursive-copy` was picked up?
* add console statement for debug
- WTF HAPPENING
* remove `dependency-install-loader`
- no need anymore!
- templates responsible own dependecies
- and style-* flags removed
* update scripts path
- OCD strikes again
* exit early if run `build` w/o installing deps;
- tell user to run `npm install` first
* always install deps for build subjects
* remove `SKIP_INSTALL` global for Travis (temp)
* assume any template without `/` is official lookup
- print `info` message about the assumption
* update tests, remove `full` alias1 parent e1fc593 commit f1891fe
File tree
35 files changed
+467
-969
lines changed- src
- commands
- lib
- webpack
- tests
- images
- lib
- subjects
- custom-babelrc
- custom-webpack
- multiple-prerendering
- sass
35 files changed
+467
-969
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| |||
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
21 | | - | |
| 25 | + | |
| 26 | + | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | 98 | | |
105 | 99 | | |
106 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | 93 | | |
95 | 94 | | |
96 | 95 | | |
| |||
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| |||
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
147 | | - | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
| 2 | + | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
51 | 59 | | |
52 | | - | |
| 60 | + | |
53 | 61 | | |
54 | 62 | | |
55 | 63 | | |
| |||
0 commit comments