mirror of
https://github.com/kognise/water.css.git
synced 2025-08-10 23:24:08 +02:00
Update browserlist and fix repl.it
This commit is contained in:
2
dist/dark.css
vendored
2
dist/dark.css
vendored
@@ -1,2 +1,2 @@
|
|||||||
body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;line-height:1.4;max-width:800px;margin:20px auto;padding:0 10px;color:#dbdbdb;background:#202b38;text-rendering:optimizeLegibility}button,input,textarea{transition:background-color .1s linear,border-color .1s linear,color .1s linear,box-shadow .1s linear,transform .1s ease}h1{font-size:2.2em;margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:12px}h1,h2,h3,h4,h5,h6,strong{color:#fff}b,h1,h2,h3,h4,h5,h6,strong,th{font-weight:600}button,input[type=button],input[type=checkbox],input[type=submit]{cursor:pointer}input:not([type=checkbox]),select{display:block}button,input,select,textarea{color:#fff;background-color:#161f27;font-family:inherit;font-size:inherit;margin-right:6px;margin-bottom:6px;padding:10px;border:none;border-radius:6px;outline:none}button,input:not([type=checkbox]),select,textarea{-webkit-appearance:none}textarea{margin-right:0;width:100%;box-sizing:border-box;resize:vertical}button,input[type=button],input[type=submit]{padding-right:30px;padding-left:30px}button:hover,input[type=button]:hover,input[type=submit]:hover{background:#324759}button:focus,input:focus,select:focus,textarea:focus{box-shadow:0 0 0 2px rgba(0,150,191,.67)}button:active,input[type=button]:active,input[type=checkbox]:active,input[type=submit]:active{transform:translateY(2px)}input:disabled{cursor:not-allowed;opacity:.5}::placeholder{color:#a9a9a9}a{text-decoration:none;color:#41adff}a:hover{text-decoration:underline}code,kbd{background:#161f27;color:#ffbe85;padding:5px;border-radius:6px}pre>code{padding:10px;display:block;overflow-x:auto}img{max-width:100%}hr{border:none;border-top:1px solid #dbdbdb}table{border-collapse:collapse;margin-bottom:10px;width:100%}td,th{padding:6px}table,td,th{border:1px solid #dbdbdb}
|
body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;line-height:1.4;max-width:800px;margin:20px auto;padding:0 10px;color:#dbdbdb;background:#202b38;text-rendering:optimizeLegibility}button,input,textarea{transition:background-color .1s linear,border-color .1s linear,color .1s linear,box-shadow .1s linear,transform .1s ease}h1{font-size:2.2em;margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:12px}h1,h2,h3,h4,h5,h6,strong{color:#fff}b,h1,h2,h3,h4,h5,h6,strong,th{font-weight:600}button,input[type=button],input[type=checkbox],input[type=submit]{cursor:pointer}input:not([type=checkbox]),select{display:block}button,input,select,textarea{color:#fff;background-color:#161f27;font-family:inherit;font-size:inherit;margin-right:6px;margin-bottom:6px;padding:10px;border:none;border-radius:6px;outline:none}button,input:not([type=checkbox]),select,textarea{-webkit-appearance:none}textarea{margin-right:0;width:100%;box-sizing:border-box;resize:vertical}button,input[type=button],input[type=submit]{padding-right:30px;padding-left:30px}button:hover,input[type=button]:hover,input[type=submit]:hover{background:#324759}button:focus,input:focus,select:focus,textarea:focus{box-shadow:0 0 0 2px rgba(0,150,191,.67)}button:active,input[type=button]:active,input[type=checkbox]:active,input[type=submit]:active{transform:translateY(2px)}input:disabled{cursor:not-allowed;opacity:.5}::-webkit-input-placeholder{color:#a9a9a9}:-ms-input-placeholder{color:#a9a9a9}::-ms-input-placeholder{color:#a9a9a9}::placeholder{color:#a9a9a9}a{text-decoration:none;color:#41adff}a:hover{text-decoration:underline}code,kbd{background:#161f27;color:#ffbe85;padding:5px;border-radius:6px}pre>code{padding:10px;display:block;overflow-x:auto}img{max-width:100%}hr{border:none;border-top:1px solid #dbdbdb}table{border-collapse:collapse;margin-bottom:10px;width:100%}td,th{padding:6px}table,td,th{border:1px solid #dbdbdb}
|
||||||
/*# sourceMappingURL=dark.css.map */
|
/*# sourceMappingURL=dark.css.map */
|
||||||
|
2
dist/dark.css.map
vendored
2
dist/dark.css.map
vendored
File diff suppressed because one or more lines are too long
2
dist/light.css
vendored
2
dist/light.css
vendored
@@ -1,2 +1,2 @@
|
|||||||
body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;line-height:1.4;max-width:800px;margin:20px auto;padding:0 10px;color:#363636;background:#fff;text-rendering:optimizeLegibility}button,input,textarea{transition:background-color .1s linear,border-color .1s linear,color .1s linear,box-shadow .1s linear,transform .1s ease}h1{font-size:2.2em;margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:12px}h1,h2,h3,h4,h5,h6,strong{color:#000}b,h1,h2,h3,h4,h5,h6,strong,th{font-weight:600}button,input[type=button],input[type=checkbox],input[type=submit]{cursor:pointer}input:not([type=checkbox]),select{display:block}button,input,select,textarea{color:#000;background-color:#efefef;font-family:inherit;font-size:inherit;margin-right:6px;margin-bottom:6px;padding:10px;border:none;border-radius:6px;outline:none}button,input:not([type=checkbox]),select,textarea{-webkit-appearance:none}textarea{margin-right:0;width:100%;box-sizing:border-box;resize:vertical}button,input[type=button],input[type=submit]{padding-right:30px;padding-left:30px}button:hover,input[type=button]:hover,input[type=submit]:hover{background:#ddd}button:focus,input:focus,select:focus,textarea:focus{box-shadow:0 0 0 2px rgba(0,150,191,.67)}button:active,input[type=button]:active,input[type=checkbox]:active,input[type=submit]:active{transform:translateY(2px)}input:disabled{cursor:not-allowed;opacity:.5}::placeholder{color:#949494}a{text-decoration:none;color:#0076d1}a:hover{text-decoration:underline}code,kbd{background:#efefef;color:#000;padding:5px;border-radius:6px}pre>code{padding:10px;display:block;overflow-x:auto}img{max-width:100%}hr{border:none;border-top:1px solid #dbdbdb}table{border-collapse:collapse;margin-bottom:10px;width:100%}td,th{padding:6px}table,td,th{border:1px solid #dbdbdb}
|
body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;line-height:1.4;max-width:800px;margin:20px auto;padding:0 10px;color:#363636;background:#fff;text-rendering:optimizeLegibility}button,input,textarea{transition:background-color .1s linear,border-color .1s linear,color .1s linear,box-shadow .1s linear,transform .1s ease}h1{font-size:2.2em;margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:12px}h1,h2,h3,h4,h5,h6,strong{color:#000}b,h1,h2,h3,h4,h5,h6,strong,th{font-weight:600}button,input[type=button],input[type=checkbox],input[type=submit]{cursor:pointer}input:not([type=checkbox]),select{display:block}button,input,select,textarea{color:#000;background-color:#efefef;font-family:inherit;font-size:inherit;margin-right:6px;margin-bottom:6px;padding:10px;border:none;border-radius:6px;outline:none}button,input:not([type=checkbox]),select,textarea{-webkit-appearance:none}textarea{margin-right:0;width:100%;box-sizing:border-box;resize:vertical}button,input[type=button],input[type=submit]{padding-right:30px;padding-left:30px}button:hover,input[type=button]:hover,input[type=submit]:hover{background:#ddd}button:focus,input:focus,select:focus,textarea:focus{box-shadow:0 0 0 2px rgba(0,150,191,.67)}button:active,input[type=button]:active,input[type=checkbox]:active,input[type=submit]:active{transform:translateY(2px)}input:disabled{cursor:not-allowed;opacity:.5}::-webkit-input-placeholder{color:#949494}:-ms-input-placeholder{color:#949494}::-ms-input-placeholder{color:#949494}::placeholder{color:#949494}a{text-decoration:none;color:#0076d1}a:hover{text-decoration:underline}code,kbd{background:#efefef;color:#000;padding:5px;border-radius:6px}pre>code{padding:10px;display:block;overflow-x:auto}img{max-width:100%}hr{border:none;border-top:1px solid #dbdbdb}table{border-collapse:collapse;margin-bottom:10px;width:100%}td,th{padding:6px}table,td,th{border:1px solid #dbdbdb}
|
||||||
/*# sourceMappingURL=light.css.map */
|
/*# sourceMappingURL=light.css.map */
|
||||||
|
2
dist/light.css.map
vendored
2
dist/light.css.map
vendored
File diff suppressed because one or more lines are too long
@@ -24,7 +24,7 @@ function style() {
|
|||||||
.pipe(sass())
|
.pipe(sass())
|
||||||
.on('error', sass.logError)
|
.on('error', sass.logError)
|
||||||
.pipe(bytediff.start())
|
.pipe(bytediff.start())
|
||||||
.pipe(postcss([ cssnano() ]))
|
.pipe(postcss([ autoprefixer(), cssnano() ]))
|
||||||
.pipe(bytediff.stop())
|
.pipe(bytediff.stop())
|
||||||
.pipe(sourcemaps.write('.'))
|
.pipe(sourcemaps.write('.'))
|
||||||
.pipe(gulp.dest(paths.styles.dest))
|
.pipe(gulp.dest(paths.styles.dest))
|
||||||
|
77
index.js
77
index.js
@@ -1,75 +1,2 @@
|
|||||||
const express = require('express')
|
const gulpfile = require('./gulpfile')
|
||||||
const app = express()
|
gulpfile.watch()
|
||||||
const http = require('http').Server(app)
|
|
||||||
const io = require('socket.io')(http)
|
|
||||||
const fs = require('fs-extra')
|
|
||||||
const chokidar = require('chokidar')
|
|
||||||
const sass = require('node-sass')
|
|
||||||
|
|
||||||
const script = `
|
|
||||||
const socket = io()
|
|
||||||
socket.on('reload', () => location.reload())
|
|
||||||
`
|
|
||||||
|
|
||||||
app.get('/', async (req, res) => {
|
|
||||||
console.log('> Serving index')
|
|
||||||
const html = await fs.readFile('index.html')
|
|
||||||
const injected = html.toString().replace('</body>', `<script src='/socket.io/socket.io.js'></script><script>${script}</script></body>`)
|
|
||||||
res.send(injected)
|
|
||||||
})
|
|
||||||
|
|
||||||
app.get('/script.js', async (req, res) => {
|
|
||||||
console.log('> Serving script')
|
|
||||||
const script = await fs.readFile('script.js')
|
|
||||||
res.contentType('javascript')
|
|
||||||
res.send(script)
|
|
||||||
})
|
|
||||||
|
|
||||||
app.use('/dist', (req, res, next) => {
|
|
||||||
console.log('> Serving a stylesheet')
|
|
||||||
next()
|
|
||||||
}, express.static('dist'))
|
|
||||||
|
|
||||||
function reload() {
|
|
||||||
console.log('> Reloading')
|
|
||||||
io.emit('reload')
|
|
||||||
}
|
|
||||||
|
|
||||||
chokidar.watch('index.html', { ignoreInitial: true }).on('all', () => {
|
|
||||||
console.log('> Index changed')
|
|
||||||
reload()
|
|
||||||
})
|
|
||||||
|
|
||||||
chokidar.watch('script.js', { ignoreInitial: true }).on('all', () => {
|
|
||||||
console.log('> Script changed')
|
|
||||||
reload()
|
|
||||||
})
|
|
||||||
|
|
||||||
function buildSass(file) {
|
|
||||||
sass.render({ file, outputStyle: 'compressed' }, async (errors, result) => {
|
|
||||||
if (errors) {
|
|
||||||
console.log('> Sass errors!')
|
|
||||||
console.log(errors)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const outFile = file.replace('src', 'dist').replace('.scss', '.css')
|
|
||||||
await fs.outputFile(outFile, result.css)
|
|
||||||
reload()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
chokidar.watch('src/*.scss', { ignoreInitial: true }).on('all', (event, file) => {
|
|
||||||
console.log('> Stylesheet changed')
|
|
||||||
buildSass(file)
|
|
||||||
})
|
|
||||||
|
|
||||||
chokidar.watch('src/parts/*.scss', { ignoreInitial: true }).on('all', async () => {
|
|
||||||
console.log('> Stylesheet part changed')
|
|
||||||
const src = await fs.readdir('src')
|
|
||||||
const files = src.filter(file => file !== 'parts').map(file => `src/${file}`)
|
|
||||||
for (let file of files) {
|
|
||||||
buildSass(file)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
http.listen(3000, () => console.log('> Ready at http://localhost:3000/'))
|
|
@@ -36,6 +36,6 @@
|
|||||||
"browserslist": [
|
"browserslist": [
|
||||||
"last 1 version",
|
"last 1 version",
|
||||||
"not dead",
|
"not dead",
|
||||||
"> 0.2%"
|
"> 5%"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user