Comments (4)
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.
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.
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.
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)
- Examples for integrations missing in the guide HOT 4
- Error: Fractal themes must inherit from the base Theme class. HOT 4
- Make subnavigation for variants configurable
- URL inconsitency dev-server/build HOT 4
- Split react adapter helper components into another package
- Feature: @partial-block for nunjucks engine HOT 5
- Build will not run properly if there is a hidden directory in the path HOT 3
- Twig adapter returns "unable to parse" error depending on include-statements location in DOM HOT 1
- Add option to exclude timestamp from build component files HOT 2
- DeprecationWarning: Invalid 'main' field in package.json HOT 3
- Inefficient Regular Expression Complexity in marked HOT 1
- Sync not working on documentation section HOT 5
- PSA: status of project & looking for maintainers! HOT 6
- Vulnerabilities in Frctl HOT 3
- Search no longer filters results HOT 4
- Require is not defined - new Fractal installation HOT 2
- Is Nodejs v18.12.1 LTS supported? Is this module still maintained? html is escaped HOT 6
- Twig.js new release (1.16.0) dependency breaks the fractal adapter with this error: TwigException: Cannot extend an inline template HOT 1
- Add Mozilla Protocol design system to home page/fractal in the wild HOT 2
- Bug in nav-collapse margin-inline sizing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fractal.