Giter VIP home page Giter VIP logo

nostackapp / ns-flip Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 2.0 1.24 MB

Creation and use of *replaceable" templates from code samples. A user can switch template versions and all of the changes to the code are maintained.

Home Page: https://ns-flip.nostack.net/

JavaScript 0.06% Batchfile 0.01% TypeScript 99.63% Handlebars 0.30%
ns-flip template template-engine templates updates packages versioning version-manager customize handlebars

ns-flip's People

Contributors

yizyah avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

loripam venus713

ns-flip's Issues

Command for Setting Static Type Instances in a Generated Code Base

Is your feature request related to a problem? Please describe.
There is a bit of a learning code for setting up a template. You have to understand

  1. how to modify the ns file
  2. specifically what static types exist and what they require in their specs for the template.
  3. (more trivially) the need to update the generated code with "ns generate".

Currently, the only way to do 2 is by looking at the README for the template. That's not something that will always be uptodate, if done at all, and it can easily have omissions.

Describe the solution you'd like
It would be much nicer if we could instead have a command like ns settings that prompts the user for whatever is needed to customize the instances. That way, they wouldn't need to learn 1 or 2 at all, and could even be prompted for 3. (In fact, regeneration could be done automatically.)

I think that the best solution would be

  1. modify the config (unfortunately, a breaking change) to add specs for each static type. Also description.
  2. create a command that prompts for creation of each thing in the spec. Then the template user will just fill them in and the ns file will be generated from it.

PreCommand Specification

Is your feature request related to a problem? Please describe.
The newtemplate prompts for preCommands are confusing, and also there's no confirmation when you are done.

Describe the solution you'd like
A nice bullet-pointed explanation of types of preCommands, and some sort of confirmation message.

No help for newtemplate

Describe the bug
no help option for newtemplate command

To Reproduce
Steps to reproduce the behavior:
call ns newtemplate -h

Expected behavior
should display help for the command

if no helper folder is failing to generate code

Describe the bug
When a template has no helpers directory the generation fails

To Reproduce
Steps to reproduce the behavior:

  1. create a template with no helpers file
  2. generate.

Expected behavior
Should generate without helpers

Automated nsFile tagging of files

It is very easy to forget to insert a {{nsFile}} at the beginning of a file template, and can really cause problems. It should be automatically generated.

wiki example not complete

the current wiki needs to have a concrete set of steps for how to convert an app insto a template.

Template Generation Not Working

Describe the bug
When a template is installed into npm global, the context there prevents the init file from working.

To Reproduce
install easy oclif cli using npx. Will state that a colon for a parameter type is faulty.

Expected behavior
should properly generate.

Testing Requires the Template Locally

Currently, having a starter and a code base is not sufficient for test, because if you don't have the template locally the config info is not getting copied over.

It seems to me that the best solution is to copy the config over to a starter in newstarter, and then from the starter to the code base in newcode or regenerate. Then test will grab it from the config file directly.

Error running newstarter if no sample ns file

When following the instructions to create a template, you'll get an error:

  ✔ Execute Pre-Commands
  ✔ Install General Packages...
  ✔ Install Dev Packages...
  ✖ Add Meta-Data
    → Cannot set property 'starter' of undefined
    TypeError: Cannot set property 'starter' of undefined

That's because appInfo is undefined.

Prompt to Regenerate when Settings Change

Is your feature request related to a problem? Please describe.
It's very easy to forget to regenerate after updating settings. That is very frustrating.

Describe the solution you'd like
To have a prompt to offer to generate, and then do so. But it shouldn't be the default, because currently generation does not check first.

Custom packages for a template not added

Describe the bug
If you run with a template that contains packages, e.g. for the init.ts file, the packages will not be found unless they happen to belong to ns-flip

To Reproduce
Steps to reproduce the behavior:

  1. run npx easy-oclif-cli $CODE_DIR
  2. See error git-user-info will not be found

Can't Name a Static Instance "add"

Describe the bug
When you select a static instance named "add" in the settings command menu, it instead prompts to add a new instance instead of to edit the add instance.

To Reproduce
Steps to reproduce the behavior:

  1. call ns settings
  2. get to the menu for a specific static type "X"
  3. select Add New Instance of X
  4. call it add
  5. select 'add'

Expected behavior
Should be opening the menu to modify add

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.