Closed bmuenzenmeyer closed 7 years ago
I would probably keep the structure of a project/starterkit
separate from the core/cli
and questionnaire the user to generate the directories and the adjust patternlab-config.json
to the outcome of the user inquiry.
Also: I wouldn't add a --kit
but add it as a step in the inquirer.
existing/project/package.json - a file we supply that supports a local install of PL. this is necessary right? or would it not be if patternlab-node was globally installed. may need to think more about this
What is the idea behind this? Making a patternlab project self-contained? Shouldn't that info sit in the patternlab config itself? Not sure. What if patternlab is just part of a bigger module (that's how I use it anyways) that already has a package.json?
I would probably keep the structure of a project/starterkit separate from the core/cli and questionnaire the user to generate the directories Also: I wouldn't add a --kit but add it as a step in the inquirer.
Sure that would work, where init
could potentially inquire to the user if they wish to see which starterkits are available.
adjust patternlab-config.json to the outcome of the user inquiry.
FWIW: we don't store any starterkit info in the patternlab-config.json
file today. though I believe PHP does. Today, starterkits are installed in node_modules/
and looked for rather crudely.
What is the idea behind this? Making a patternlab project self-contained?
This is and always will be the primary use case we have aimed to support. The current ecosystem is built with this in mind - from the core to the styleguide kits all coming together in an edition. The creation of a CLI presents a wedge in this ecosystem, as you and I have discussed a bit and you well-illustrated above.
So to me, with the CLI:
You are right, with most of the dependencies of the current editions (especially BrowserSync) moving into core, we probably eliminate the need to drop in a package.json
file
Okay … I think you will like the current init
implementation :> I am pushing it in a bit.
You can checkout the current init
here …
Closing this issue- the other repo is the place to be and good discussion is found there
Implement a project init command as described in: https://github.com/pattern-lab/patternlab-node/issues/281
The landscape of the project has changed but the spirit is correct to me. These are just some initial thoughts. All feedback is welcome.
Default
Default Outcome
existing/project/source/
- empty dirs that match a typicalsource/
existing/project/public/
existing/project/package.json
- a file we supply that supports a local install of PL. this is necessary right? or would it not be if patternlab-node was globally installed. may need to think more about thisexisting/project/patternlab-config.json
- a file we supply that matches what is typically insideedition-node-*/patternlab-config.json
Option Starterkit
patternlab init --kit=starterkit-mustache-demo
(as an example)Option Starterkit Outcome
Same as above, but
existing/project/source/
contains the starterkit you specified.