Jonathan Share
97c3a2f16f
Remove storyFormat option from CLI
...
This option doesn't appear to do anything at all anymore and as-such should be removed from the codebase.
Note: This is a breaking change to the CLI, while the parameter might not have done anything useful, it's removal could break scripts that were trying to set it.
I was a little brutal on the test cases here, I think I need to re-add one after some sleep
2021-10-03 21:13:07 +00:00
Jon Palmer
5b91fd206d
Simplification and fix bug with preview getting overwritten
2021-04-20 21:26:45 -04:00
Jon Palmer
7d1d55f965
Add example components
2021-04-20 08:42:50 -04:00
Blaine Bublitz
ac121521df
chore: change console -> logger
2021-02-01 12:46:11 -07:00
Andre Farzat
f70f316bfa
console.error to lib/cli/src/helpers -> readFileAsJson
2021-01-29 11:30:43 -03:00
Andre Farzat
5b0a816818
Adding try/catch on readFileAsJson to improve error message
2021-01-26 10:08:37 -03:00
tooppaaa
e8e37ac7ad
CLI: add common welcome and cleanup
2020-07-05 11:03:01 +02:00
tooppaaa
4905904bd2
CLI: move mutualise scripts
2020-06-11 23:25:04 +02:00
Gaëtan Maisse
9dc7c554f4
refactor: ensure dep
and devDeps
are always defined when retrieving package.json
...
Doing this just after having read the file enable us to remove duplication and unneeded calls to `writePackageJson`.
2020-06-09 08:19:12 +02:00
Gaëtan Maisse
26dd11bf60
refactor: move readPackageJson
and writePackageJson
in their own helper
2020-06-09 08:19:11 +02:00
Gaëtan Maisse
41dc95791b
refactor: move PackageJson.ts inside js-package-manager
directory
2020-06-08 20:08:15 +02:00
Gaëtan Maisse
2912bcbefe
refactor: remove unneeded params and variables
...
All this variables were used to check if user was running Yarn and do this accordingly.
Now we use the factory to get the "right" version of JsPackageManager instance so there is no need to worry anywhere about that.
2020-06-08 20:08:15 +02:00
Gaëtan Maisse
a23e4a0846
refactor: move latestVersion
to JsPackageManager and split specific behavior in NPM, Yarn 1 and Yarn 2 classes.
2020-06-08 20:08:15 +02:00
Gaëtan Maisse
126e7e2ea8
refactor: move getVersion
to JsPackageManager
2020-06-08 17:25:45 +02:00
Gaëtan Maisse
2760021aa1
refactor: move getVersions
to JsPackageManager
2020-06-08 17:25:45 +02:00
Gaëtan Maisse
b6497c2fec
refactor: move getVersionedPackages
to JsPackageManager
2020-06-08 17:25:44 +02:00
Gaëtan Maisse
c714aca145
refactor: move installDependencies
to JsPackageManager
...
Also rename it to `addDependencies` (a.k.a. `yarn add`) to avoid confusion with `installDepsFromPackageJson` (a.k.a. `yarn install`).
2020-06-08 17:25:44 +02:00
Gaëtan Maisse
56de607807
refactor: move retrievePackageJson
to JsPackageManager
2020-06-08 17:25:44 +02:00
Gaëtan Maisse
a858990fa6
refactor: move installDepsFromPackageJson
function to JsPackageManager class and subclasses
2020-06-08 17:25:43 +02:00
Gaëtan Maisse
7225ebb710
fix(cli): do not use --ignore-workspace-root-check
with Yarn 2
...
This option is not handled by Yarn 2.
2020-06-03 21:13:48 +02:00
Gaëtan Maisse
d7687ade18
refactor: replace semver
by @storybook/semver
...
`@storybook/semver` is a browser friendly fork of `semver`.
We use it to avoid issue with IE11 as classic "compiled" `semver` is now compatible with it.
If we just recompile `semver` from `node_modules` it ends with a package that `require('core-js')` but `core-js` is not listed in the dependency. And so Yarn 2 throw an error.
So to avoid that we need to use a "proper" dependency which is `semver` recompile and with all needed dependencies in its package.json.
2020-06-03 20:07:07 +02:00
Gaëtan Maisse
10b34eea56
fix(cli): fix init
command when run in a Yarn workspace env
...
Add `--ignore-workspace-root-check` to avoid Yarn error when adding dependencies to the workspace root.
2020-05-29 20:44:09 +02:00
Yann Braga
5f4eee1278
refactor(cli): improve typings for story format
2020-05-16 18:01:59 +02:00
Gaëtan Maisse
66e077b2bc
refactor(cli): migrate initiate
file to TS
2020-05-15 21:49:30 +02:00
Gaëtan Maisse
8e0e02f900
refactor(cli): migrate Angular generator to TS
2020-05-15 21:49:19 +02:00
Gaëtan Maisse
9e49f813a3
refactor(cli): move NpmOptions and PackageJson in their own files
2020-05-15 21:49:19 +02:00
Gaëtan Maisse
e5c39984a6
refactor(cli): migrate detect
file and its tests to TS
2020-05-15 21:49:18 +02:00
Gaëtan Maisse
f923d9a5b7
refactor(cli): migrate add
file and its tests to TS
2020-05-15 21:49:18 +02:00
Gaëtan Maisse
924686a441
refactor(cli): migrate helpers and its tests to TS
2020-05-15 21:49:17 +02:00