Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: slug folder #387

Merged
merged 1 commit into from
Mar 18, 2020
Merged

fix: slug folder #387

merged 1 commit into from
Mar 18, 2020

Conversation

jiverson
Copy link
Contributor

@jiverson jiverson commented Mar 18, 2020

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Other... Please describe:

What is the current behavior?

In watch mode the folder location should point to the variable "slug" not the explicit folder "slug".

For example with a config settings:

exports.config = {
  projectRoot: "./src",
  projectName: "my-scully-blog",
  outDir: "./dist/static",
  routes: {
    "/blog/:postId": {
      type: "contentFolder",
      postId: {
        folder: "./blog"
      }
    }
  }
};

and after npm run scully you will receive the following error:

error into read the config TypeError: Cannot read property 'folder' of undefined
    at Object.checkStaticFolder (/Users/jiverson/dev/my-scully-blog/node_modules/@scullyio/scully/utils/fsFolder.js:24:64)
    at Object.watchMode (/Users/jiverson/dev/my-scully-blog/node_modules/@scullyio/scully/watchMode.js:37:22)
    at /Users/jiverson/dev/my-scully-blog/node_modules/@scullyio/scully/scully.js:84:25
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

If you run in npm run scully --nw everything works.

@jiverson
Copy link
Contributor Author

FYI: I am having issues running scully locally for example I can't get the tests to pass but they pass in the ci. Is there a development document available so I am able to double check my settings and verify the npm scripts I need to run?

@jorgeucano
Copy link
Contributor

Hey @jiverson thanks for fix this mistake...
About the question, we run this

      - run: npm install
      - run: npm run compile:prod
      - run: node ./dist/scully/scully --tds --host='0.0.0.0' --nw --project=sampleBlog
      - run: npm run test
      - run: npm run e2e:server

So, in my computer i run something similar:

      - run: npm install
      - run: npm run compile:prod
      - run: node ./dist/scully/scully --tds --nw --project=sampleBlog
      - run: npm run test
      - run: npm run e2e:server

Thats all ... can you confirm me if this work for you?

@jorgeucano jorgeucano self-requested a review March 18, 2020 13:40
@jorgeucano jorgeucano merged commit 26e816a into scullyio:master Mar 18, 2020
@jiverson
Copy link
Contributor Author

@jorgeucano Perfect thanks yes that all worked.

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

Successfully merging this pull request may close these issues.

2 participants