Open yellowled opened 8 years ago
I ran into this as well; even after extensive debug I couldn't make it work. The docs definitely don't reflect actual setup. In the end, I had to give up.
Yes this definitely looks wrong. I loaded that same starterkit this morning in the gulp version with success, however, time is restricting me from giving grunt the full attention it deserves. I will try to look into this and https://github.com/pattern-lab/edition-node-grunt/issues/11 today or tomorrow.
Please try again with this set of instructions: https://github.com/pattern-lab/edition-node-grunt#getting-started
There is also a --clean=true flag that attempts to delete the contents of source/
first.
I'm afraid grunt patternlab:loadstarterkit --kit=starterkit-mustache-demo
still doesn't do anything for me (but emits the help), however, grunt patternlab:starterkit-load --kit=starterkit-mustache-demo
now gives me an error:
$ grunt patternlab:starterkit-load --kit=starterkit-mustache-demo
Loading engines...
...scanning for engines in the core...
...scanning for engines in the edition or test directory...
- mustache engine: good to go
...done loading engines.
Running "patternlab:starterkit-load" (patternlab) task
[TypeError: Path must be a string. Received undefined]
Done
(This is now Patternlab v2.4.0 on otherwise the same config.)
Still the same for me with 2.4.4 on node 4.5.0.
Well, the TypeError is gone, but grunt patternlab:loadstarterkit --kit=starterkit-mustache-demo
still doesn't do anything (but emit the help) and grunt patternlab:starterkit-load --kit=starterkit-mustache-demo
emits a message that suggests everything was copied, but the files are not in ./source/
.
@bmuenzenmeyer - in regards to the clean flag, it seems that the grunt task is not taking that argument into account in the function call. The code in the repo seems to look like this:
if (arg && arg === "starterkit-load") {
pl.loadstarterkit(argv.kit);
}
But it would seem that is should look like the following:
if (arg && arg === "starterkit-load") {
pl.loadstarterkit(argv.kit, argv.clean);
}
The addition of the clean argument does trigger the cleaning of the directory, but does not do anything to resolve the installation of the starter kit (as far as I am able to tell).
@jcarpe I merged your changes and can confirm that it still does not work as expected.
A temporary fix to this is to follow the debugging instructions in pattern-lab/patternlab-node#629:
grunt.registerTask('patternlab', 'create design systems with atomic design', function (arg) {
const done = this.async();
...
setTimeout( () => done(), 10000);
}
I am using Edition Node Grunt
v2.3.0
onMac
, with Nodev4.4.7
.Expected Behavior
grunt patternlab:starterkit-load --kit=[starterkit-name]
should copy the files fromnode_modules/[starterkit-name]/dist
to./source/
.Actual Behavior
Task runs with proper output/path names etc., but does not actually copy any files (tested with
starterkit-mustache-demo
inmaster
anddev
).Steps to Reproduce
npm install starterkit-mustache-demo
grunt patternlab:starterkit-load --kit=starterkit-mustache-demo
Here's a gist of the output that I get for this.
./source/_patterns/
remains empty.