feathers-plus / generator-feathers-plus

A Yeoman generator to (re)generate a FeathersJS application supporting both REST and GraphQL architectural concepts and their query languages.

Home Page:https://generator.feathers-plus.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

options.freeze is not working

MohammedFaragallah opened this issue · comments

I've been trying to exclude some files from the regeneration process using freeze.options in the feathers-gen-specs.json file but nothing seems to work I've tried every form of paths but also nothing even the example in the documentation, how to make this work?

Please post your options.freeze in feathers-gen-specs.js with the paths which are not working.

Note that only full path names are supported, not globs.

Thanks for the fast response, I'm trying for three files, for now, I've tried every kind of paths for them like

"freeze": [
"channels",
"src/channels",
"./src/channels",
"e/server/src/channels"
],

alot like that and the same with ".js"

The paths must be like src/channels.js as shown in the docs https://generator.feathers-plus.com/get-started/#modules-regeneration

I've tried this also and with fresh generated app didn't work

Are you running on Win10 but not using WSL? If so, try using \ instead and let me know the results.

channels.?s should not be generated if the file already exists.

The generator will not change the following modules in zz
  config/default.js  public/favicon.ico, index.html
  src/
    hooks/logger.js
    middleware/ { all files other than index.js)
    refs/common.json
    services/serviceName/serviceName.class.js
    channels.js
  test/*.test.js
  .editorconfig, .eslintrc.json, .gitignore, LICENSE, README.md
  tsconfig.json, tsconfig.test.json, tslint.json

However channels.?s is being regenerated. This will be fixed.

However its important to me to find out if your issue is related to using Win10, so please try regenerating with \ instead of '/'.

Yes you are absolutely right I've tried this

"freeze": [
      "src\\channels.js",
      "src\\index.js",
      "src\\services\\uploads\\uploads.service.js"
    ],

and it works finally, thank you.

#222 resolves the issue with channels.js being regenerated.

#223 makes paths in options.freeze platform independent. You can use src/services\\uploads/uploads.service.js on both Linux and Win10.

@MohammedFaragallah do you have the time to test your freeze paths using '/' in some places? Thanks and let me know.

Published as cli+ v0.8.2 using generator v0.8.2.

i used this
"freeze": [ "src/channels.js", "src/index.js", "src/services/uploads/uploads.service.js" ],

generator version 0.8.1
did't work

ok, i'll download the new version and try again

@eddyystop works with

"freeze": [ "src/channels.js", "src/index.js", "src/services/uploads/uploads.service.js" ]

generator version 0.8.2
win 10 version 1809 build 17763.316
node version 10.15.0

Great job, please let me know if i can help with anything else.

Nice. Thanks for the info.