Skip to content

fix: slug folder#387

Merged
jorgeucano merged 1 commit intoscullyio:masterfrom
jiverson:fix/slug-folder
Mar 18, 2020
Merged

fix: slug folder#387
jorgeucano merged 1 commit intoscullyio:masterfrom
jiverson:fix/slug-folder

Conversation

@jiverson
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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