apiaryio / attributes-kit Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED Attributes Kit helps you with rendering MSON.
License: MIT License
DEPRECATED Attributes Kit helps you with rendering MSON.
License: MIT License
This value
- address: *street*, city, *state* (array, fixed)
Gets rendered as three array values
"value": {
"element": "array",
"content": [
{
"element": "string",
"attributes": {
"samples": [
"street"
]
}
},
{
"element": "string",
"content": "city"
},
{
"element": "string",
"attributes": {
"samples": [
"state"
]
}
}
]
}
They are three different element.
📇 https://trello.com/c/JmkhvYG8/571-set-up-unit-tests
📇 https://trello.com/c/iQKCJoun/572-set-up-visual-testing
This does not let us use its builtin validation (and furthermore, is throwing a lot of warnings)
import {AttributesKit} from 'attributes-kit';
AttributesKit.render(refractElement, HTMLElement|String)
let myAttributesKit = new AttributesKit({
element: HTMLElement|String
});
myAttributesKit.render(refractElement)
The advantage of the instance is that you can subscribe to it.
myAttributesKit.on('click', Function);
We're passing quite often more data than needed for rendering components.
Example
<div className="attributeObjectMemeberKey">
<KeyComponent data={this.props.data} />
</div>
<div className="attributeObjectMemeberRequirement">
<RequirementComponent data={this.props.data} />
</div>
Both of them do not need the entire data object.
ResourceAttributesComponent
ActionAttributesComponent
PayloadAttributesComponent
I just wanted to discuss built-in NPM tasks as it seems there's no convention and no structure around them.
Below is a list of the current NPM tasks.
build
playground
lint
start
unit-tests
visual-testing
prepublish
generate-fixtures
My proposal would be the following.
npm start
Spins up the development server.
localhost:8080
(or localhost:8080/playground
) you can try the Playground./seed
there's a demonstration of usage of the Seed./examples
you can see a long list of examples, displayed in 3 columns—first column displays MSON, second Refract elements, the last one shows the rendered Attribtues Kit.Questions
/playground
and /seed
require a different Webpack build.test
Run all test.
test:unit
Run all unit tests, optionally you can run them in the watch mode via npm run test:unit --watch
.
test:functional
test:examples
test:coverage
lint
build
Build all.
build:server
build:browser
Raised from this comment
Using stylint, perhaps?
npm WARN package.json [email protected] No license field.
and Author too.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.