Comments (14)
@Bjornnyborg I think that's splendid
from novicell-frontend.
i guess this can be closed due to @Bjornnyborg 's commit?
from novicell-frontend.
@hesselberg also suggested to remove the default markup from the component. Maybe we should just make a div, with the class ".component-name" and render the component name as the only thing inside the div. What do you think @hesselberg and @Dan9boi ?
from novicell-frontend.
I think thats much better.
I've modified the script in our most recent project to do the following:
.config.json:
{
"title": "Organism",
"status": "backlog",
"context": {}
}
.css:
/* Insert css here */
.hbs:
<div></div>
The only thing thats changing is the title in the config file to either Atom/Molecule/Organism/Page, and of course where it puts the files
from novicell-frontend.
@tbb2 what do you say?
from novicell-frontend.
What I think would be really awesome is if you can use the component name inside the files like this:
.config.json:
{
"title": "my-organism-name",
"status": "backlog",
"context": {}
}
.css:
/* Insert css here */
.my-organism-name{
}
.hbs:
If not, the suggestion from @hesselberg is fine
from novicell-frontend.
I guess I don't know how to do line-breaks inside code in this text-editor - the line-breaks should of course be as hesselberg's
from novicell-frontend.
I guess I don't know how to do line-breaks inside code in this text-editor - the line-breaks should of course be as hesselberg's
I've fixed your markdown now - just added the tripple backticks ```.
You can see here how to do code with syntax highlighting and more...
from novicell-frontend.
I reworked the generator according to your comments: https://github.com/Novicell/novicell-frontend/tree/feature/component-generator-cleaning, feedback is appreciated! :)
from novicell-frontend.
createComponent -t a -n "My Component"
generates:
{
"title": "My Component",
"status": "prototype",
"context": {
}
}
.css:
.my-component {
}
.hbs:
from novicell-frontend.
It's nice! I think it would be nicer though, if you write the class name when you create the component
´´´createComponent -t a -n "my-component"´´´
since that is the most important name for the developer - actually you only see the title from the json file if you're working in fractal.
Whether you want to leave the dashes in the title in the json file or replace them with spaces and capitalize first letter in each word - I don't have an opinion on that...
from novicell-frontend.
The title in the JSON file is just as important, as it generates the title in Fractal. Loving everything else!
from novicell-frontend.
The title in the JSON file only generates the title that is shown above the preview iframe in fractal. The title in the navigation in fractal is generated from the folder name instead
from novicell-frontend.
I updated the generator, now the name argument is used directly as file/folder name, and a capitalized version with spaces instead of dashes, is used as the title. :)
from novicell-frontend.
Related Issues (20)
- Best practice code examples
- Refactor existing patterns HOT 1
- Don't render cookie info in _preview.hbs HOT 2
- Test slack integration HOT 1
- Make intelligent import function HOT 1
- Support for screens on bigger resolutions HOT 7
- Search field in Fractal HOT 1
- Logo download page in Fractal under "Design Guidelines" HOT 1
- @ sign is no recognized as path HOT 1
- CreateComponent failing with mkdir HOT 5
- Suggestion: Code styling HOT 3
- Feature request: sprites script to handle multi coloured, multi layered svgs HOT 4
- Sprites task Linux is returning only first file in the GLOB HOT 2
- CSS for backoffice HOT 11
- Use production Vue HOT 1
- Fix security vulnerabilities
- Duplicated config key
- Video: Autoplay not playing with fullscreen video HOT 1
- Replace uglify with terser HOT 4
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 novicell-frontend.