Giter Site home page Giter Site logo

Comments (4)

allmarkedup avatar allmarkedup commented on May 20, 2024

I have to say I disagree - I think it's useful to think of it as an 'application bootstrap' file rather than a config file, as for doing anything slightly more complex (like adding custom handlebars helpers, as you did) it really needs to be JS.

What are you adding to the file that you find laborious? If you need to set default context or other things like that you can actually do this in a JSON/YML/JS config file in the root of your components directory too.

from fractal.

paulrobertlloyd avatar paulrobertlloyd commented on May 20, 2024

Okay… can the contents of fractal.js be stored in another file…for example an index.js file (perhaps one which is part of broader application bootstrap file)?

from fractal.

allmarkedup avatar allmarkedup commented on May 20, 2024

Unfortunately, if you want to run fractal from the command line, then it needs to be called fractal.js. The reason is exactly the same for why your gulp file must be called gulpfile.js and the same for grunt - the global CLI helper needs to look for a file with a specific name so it knows what to use to run commands against.

However in theory you could do the actual configuration in any JS file you like and then just require that file into an otherwise empty fractal.js file - but the fractal.js file would still need to be there. For example something like this: https://gist.github.com/allmarkedup/67a71e49b6f6cc083466

What is the use case for changing the name? Is there something specific or is it just in the name of flexibility?

from fractal.

paulrobertlloyd avatar paulrobertlloyd commented on May 20, 2024

More in the name of project hygiene really, i.e. reducing the number of config files, runners etc. etc. in a root folder. Not a big deal, just wanted to make sure files aren’t being mandated if other options available. Closing.

from fractal.

Related Issues (20)

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.