Added logging, changed some directory structure

This commit is contained in:
2018-01-13 21:33:40 -05:00
parent f079a5f067
commit 8e72ffb917
73656 changed files with 35284 additions and 53718 deletions

View File

@@ -0,0 +1,8 @@
{
".link": {
"margin": [ 0, 0, "5px", 0 ],
"padding": [ 0, "20px", 0 ],
"border-radius": [ "10px", "20px" ],
"box-shadow": [ "0 0 5px #f00", "0 5px 20px #ff0" ]
}
}

View File

@@ -0,0 +1,8 @@
{
".link": {
"margin": [[ 0, 0, "5px", 0 ]],
"padding": [[ 0, "20px", 0 ]],
"border-radius": [[ "10px", "20px" ]],
"box-shadow": [ "0 0 5px #f00", "0 5px 20px #ff0" ]
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,71 @@
{
".link": {
"background": {
"color": "rgba(0, 0, 0, 0.3)",
"image": "url(test.jpg)",
"repeat": "no-repeat",
"position": [0, 0]
},
"border": {
"width": "1px",
"style": "solid",
"color": "black"
},
"border-left": 0,
"clear": "both",
"margin": [ 0, 0, "5px", 0 ],
"text-decoration": "none",
"display": "block",
"transition": [{
"property": "opacity",
"duration": "0.5s",
"timing-function": "linear"
}, {
"property": "background",
"duration": "1s",
"timing-function": "ease"
}]
},
".element": {
"transition": [{
"property": "opacity",
"duration": "1s",
"timing-function": "linear"
}, {
"property": "background",
"duration": "0.5s",
"timing-function": "ease"
}],
"background": "#fff",
"opacity": 1,
"padding": [ "10px", 0 ],
"font": "bold 16px/30px Helvetica, Arial, sans-serif",
"box-shadow": {
"blur": "25px",
"color": "rgba(0, 0, 0, 0.5)",
"inset": "inset"
},
"text-shadow": {
"x": 0,
"y": "1px",
"blur": 0,
"color": "#fff"
}
},
".container": {
"margin": {
"top": "5px",
"bottom": 0,
"right": "10px",
"left": "5px"
},
"padding": {
"top": "15px",
"bottom": 0,
"right": "15px",
"left": "15px"
},
"max-width": "1180px",
"width": "100%"
}
}

View File

@@ -0,0 +1,30 @@
{
".link": {
"background": "rgba(0, 0, 0, 0.3) url(test.jpg) no-repeat 0 0",
"border": "1px solid black",
"border-left": 0,
"clear": "both",
"margin": [[ 0, 0, "5px", 0 ]],
"text-decoration": "none",
"display": "block",
"transition": ["opacity 0.5s linear", "background 1s ease"]
},
".element": {
"transition": [
[["opacity", "1s", "linear"]],
[["background", "0.5s", "ease"]]
],
"background": "#fff",
"opacity": 1,
"padding": [[ "10px", 0 ]],
"font": "bold 16px/30px Helvetica, Arial, sans-serif",
"box-shadow": "0 0 25px rgba(0, 0, 0, 0.5) inset",
"text-shadow": "0 1px 0 #fff"
},
".container": {
"margin": [[ "5px", "10px", 0, "5px"]],
"margin": [[ "15px", "15px", 0, "15px"]],
"max-width": "1180px",
"width": "100%"
}
}

View File

@@ -0,0 +1,30 @@
import {create} from 'jss'
import jssExpand from './../../src'
import arraysWithoutPlugin from '../fixtures/arrays-without-plugin.json'
import arraysWithPlugin from '../fixtures/arrays-with-plugin.json'
suite('Array with DIFFERENT sheets', () => {
benchmark('Pure JSS', () => {
const jss = create()
jss.createStyleSheet(arraysWithoutPlugin).toString()
})
benchmark('JSS + Plugin', () => {
const jss = create()
jss.use(jssExpand())
jss.createStyleSheet(arraysWithPlugin).toString()
})
})
suite('Array with SAME sheets', () => {
benchmark('Pure JSS', () => {
const jss = create()
jss.createStyleSheet(arraysWithoutPlugin).toString()
})
benchmark('JSS + Plugin', () => {
const jss = create()
jss.use(jssExpand())
jss.createStyleSheet(arraysWithoutPlugin).toString()
})
})

View File

@@ -0,0 +1,16 @@
import {create} from 'jss'
import jssExpand from './../../src'
import styles from '../fixtures/bootstrap.json'
suite('Bootstrap unnamed JSS test', () => {
benchmark('Pure JSS', () => {
const jss = create()
jss.createStyleSheet(styles, {named: false}).toString()
})
benchmark('JSS + Plugin', () => {
const jss = create()
jss.use(jssExpand())
jss.createStyleSheet(styles, {named: false}).toString()
})
})

View File

@@ -0,0 +1,30 @@
import {create} from 'jss'
import jssExpand from '../../src'
import stylesWithoutPlugin from '../fixtures/sheet-without-plugin.json'
import stylesWithPlugin from '../fixtures/sheet-with-plugin.json'
suite('General test with DIFFERENT sheets', () => {
benchmark('Pure JSS', () => {
const jss = create()
jss.createStyleSheet(stylesWithoutPlugin).toString()
})
benchmark('JSS + Plugin', () => {
const jss = create()
jss.use(jssExpand())
jss.createStyleSheet(stylesWithPlugin).toString()
})
})
suite('General test with SAME sheet)', () => {
benchmark('Pure JSS', () => {
const jss = create()
jss.createStyleSheet(stylesWithoutPlugin).toString()
})
benchmark('JSS + Plugin', () => {
const jss = create()
jss.use(jssExpand())
jss.createStyleSheet(stylesWithoutPlugin).toString()
})
})