Skip to content

Instantly share code, notes, and snippets.

❤️
Trying to make a living from open source.

EGOIST egoist

❤️
Trying to make a living from open source.
Block or report user

Report or block egoist

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View conpack.js
const Config = require('conpack')
const config = new Config()
module.exports = config
.entry('client')
.add('src/index.js')
.parent()
.entry('vendor')
.add(['vue', 'vuex'])
View replacer.md

given:

{
  dist: /* @@dist */options.dist/* dist@@ */
}
replacer(input, {dist: 'dist'})
@egoist
egoist / vue-dom.js
Last active Feb 17, 2017
Unified way for bootstraping Vue.js app
View vue-dom.js
import {render} from 'vue-dom'
const App = {
template: '<h1>hello world</h1>'
}
render(App, '#app')
// on the server
@egoist
egoist / vbuild.md
Created Feb 16, 2017
vbuild desktop notes
View vbuild.md

vbuild should be a dependency in the desktop app's app folder.

View path-extract.js
const extract = require('path-extract')
const params = extract('/user/:username', '/user/egoist')
console.log(params)
//=>
{
username: 'egoist'
}
View ream.md

server.js:

import ream from 'ream'

const app = ream({
  pageDirectory: 'pages'
})

app.get('/', (req, res) => {
@egoist
egoist / reapi.js
Created Feb 7, 2017
Refined framework for building API service.
View reapi.js
const reapi = require('reapi')
reapi({
view: {
'/': (req, res) => {
res.send
}
}
})
View tooling-future.bash
tooling react build
# resolve tooling-react
tooling build
# resolve tooling/lib/build
tooling dev
# resolve tooling/lib/dev
View adonuxt.sao.js
module.exports = {
template: 'handlebars',
templateOptions: {
helpers: {
raw: function(options) {
return options.fn(this)
}
}
},
prompts: {
You can’t perform that action at this time.