choojs / create-choo-app

🚞 - create a fresh choo application
MIT License
181 stars 36 forks source link

Test script isn't working #22

Closed HoverBaum closed 6 years ago

HoverBaum commented 7 years ago

When using create-choo-app and running npm test right after creating a project I first get some standard errors and complains that

'test-deps' is not recognized as an internal or external command, operable program or batch file.

It seems to me it might be worth updating the test script to something similar like choojs/choo uses. We could add dependency-check to our package and use that to test the input file. Turning the test script into:

"test": "standard && dependency-check package.json && dependency-check --unused --no-dev package.json",

I am running on Windows 10 if that makes any difference :)

yoshuawuyts commented 7 years ago

Yeah, we should be using that. Probably include a --ignore tachyons as it only ever exposes CSS. A PR for this would be really helpful, thanks! :D

On Thu, Sep 14, 2017 at 2:51 PM Hendrik notifications@github.com wrote:

When using create-choo-app and running npm test right after creating a project I first get some standard errors and complains that

'test-deps' is not recognized as an internal or external command, operable program or batch file.

It seems to me it might be worth updating the test script to something similar like choojs/choo uses. We could add dependency-check to our package and use that to test the input file. Turning the test script into:

"test": "standard && dependency-check package.json && dependency-check --unused --no-dev package.json",

I am running on Windows 10 if that makes any difference :)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/choojs/create-choo-app/issues/22, or mute the thread https://github.com/notifications/unsubscribe-auth/ACWlekL1ZL4sSAVn-JrEO5HTuvw9pca5ks5siSFYgaJpZM4PXiG8 .

HoverBaum commented 7 years ago

Maybe this is rather an issue with something not being published right?

The scripts section that gets created for me is:

"scripts": {
    "build": "bankai build index.js",
    "inspect": "bankai inspect index.js",
    "start": "bankai start index.js",
    "test": "standard && test-deps",
    "test-deps": "dependency-check . && dependency-check . --extra --no-dev -i tachyons"
  },

While here I see it should create:

"scripts": {
      "build": "bankai build index.js",
      "inspect": "bankai inspect index.js",
      "start": "bankai start index.js",
      "test": "standard && npm run test-deps",
      "test-deps": "dependency-check . && dependency-check . --extra --no-dev -i tachyons"
    }

That might fix my troubles.

On the same note I see a lot of \ns around for the standard files which would fix standard complaining about missing new lines.

I have v1.6.1 installed and package.json on GitHub says that is the current version but somehow the published code seems to be different.

ungoldman commented 7 years ago

re:

On the same note I see a lot of \ns around for the standard files which would fix standard complaining about missing new lines.

we could also lazily run standard --fix after install 🙃

yoshuawuyts commented 7 years ago

@ungoldman lol sure yeah why not, would just be an extra step in index.js, added to the end of bin.js - PR? :D

On Sun, Sep 17, 2017, 20:51 Nate Goldman notifications@github.com wrote:

re:

On the same note I see a lot of \ns around for the standard files which would fix standard complaining about missing new lines.

we could also lazily run standard --fix after install 🙃

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/choojs/create-choo-app/issues/22#issuecomment-330071265, or mute the thread https://github.com/notifications/unsubscribe-auth/ACWlejDXLzQkxiB1ZBfleFrZJxIBbY4_ks5sjWpAgaJpZM4PXiG8 .

HoverBaum commented 7 years ago

@ungoldman on the other hand that is really lazy and we might as well just provide code in the style we suggest to follow ^^

For that we could add things as their own files here and have those checked against the standard ;)

@yoshuawuyts I am unsure what is needed here as I feel the version I got from npm is not what is currently in the repo and some concerns might have already been addressed.

YerkoPalma commented 6 years ago

test script is working now

> tmp@1.0.0 test /home/ubuntu/workspace/tmp
> standard && npm run test-deps

> tmp@1.0.0 test-deps /home/ubuntu/workspace/tmp
> dependency-check . && dependency-check . --extra --no-dev -i tachyons

Success! All dependencies used in the code are listed in package.json
Success! All dependencies in package.json are used in the code

thanks