Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

Loading starterkit does not copy files #12

Open
yellowled opened this issue Aug 9, 2016 · 9 comments
Open

Loading starterkit does not copy files #12

yellowled opened this issue Aug 9, 2016 · 9 comments
Assignees
Labels
Milestone

Comments

@yellowled
Copy link

I am using Edition Node Grunt v2.3.0 on Mac, with Node v4.4.7.

Expected Behavior

grunt patternlab:starterkit-load --kit=[starterkit-name] should copy the files from node_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 in master and dev).

Steps to Reproduce
  1. npm install starterkit-mustache-demo
  2. grunt patternlab:starterkit-load --kit=starterkit-mustache-demo

Here's a gist of the output that I get for this. ./source/_patterns/ remains empty.

@ivana-mcconnell
Copy link

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.

@bmuenzenmeyer
Copy link
Member

bmuenzenmeyer commented Aug 11, 2016

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 #11 today or tomorrow.

@bmuenzenmeyer
Copy link
Member

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.

@yellowled
Copy link
Author

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.)

@bmuenzenmeyer
Copy link
Member

@yellowled
Copy link
Author

yellowled commented Aug 29, 2016

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/.

@jcarpe
Copy link
Contributor

jcarpe commented Nov 7, 2016

@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).

@tburny
Copy link
Contributor

tburny commented Feb 23, 2017

@jcarpe I merged your changes and can confirm that it still does not work as expected.

@tburny
Copy link
Contributor

tburny commented Feb 24, 2017

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);
  }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants