The Meteor Guide is an official guide meant to give Meteor users a more broad view on what the best practices and conventions in the community are. As Meteor is a non-opinionated framework in terms of architecture, this is a valuable resource every Meteor developer must read.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-var */ | |
var merge = require('webpack-merge'); | |
var baseConfig = require('./webpack.config.base'); | |
var prodConfig = { | |
module: { | |
loaders: [ | |
{ test: /\.svg$/, loaders: ['url-loader?limit=100000', 'image-webpack'] } | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-var */ | |
var merge = require('webpack-merge'); | |
var baseConfig = require('./webpack.config.base'); | |
var Dashboard = require('webpack-dashboard'); | |
var DashboardPlugin = require('webpack-dashboard/plugin'); | |
var dashboard = new Dashboard(); | |
var devConfig = { | |
plugins: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-var */ | |
var webpack = require('webpack'); | |
var cssnano = require('cssnano'); | |
var path = require('path'); | |
var config = { | |
entry: { | |
app: './src/index' | |
}, | |
output: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { shallow, mount } from 'enzyme'; | |
import Checkbox from 'components/Form/Checkbox'; | |
import expect from 'expect'; | |
import 'jsdom-global/register'; | |
describe('<Checkbox />', () => { | |
it('adds checked attribute to input', () => { | |
const wrapper = shallow(<Checkbox checked />); | |
const input = wrapper.find('input'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Post.js | |
export default class Post { | |
constructor(data) { | |
this.id = data.id | |
this.title = data.title | |
this.body = data.body | |
} | |
} | |
// PostCtrl.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
# If an existing asset or directory is requested go to it as it is | |
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR] | |
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d | |
RewriteRule ^ - [L] | |
# If the requested resource doesn't exist, use app.html | |
RewriteRule ^ /app.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local find_access_tag = require("lib/access").find_access_tag | |
local limit = require("lib/maxspeed").limit | |
lua_sql = require "luasql.postgres" -- we will connect to a postgresql database | |
sql_env = assert( lua_sql.postgres() ) | |
sql_con = assert( sql_env:connect("forge:forge") ) -- you can add db user/password here if needed | |
print("PostGIS connection opened") | |
-- Begin of globals | |
barrier_whitelist = { [""] = true, ["cycle_barrier"] = true, ["bollard"] = true, ["entrance"] = true, ["cattle_grid"] = true, ["border_control"] = true, ["toll_booth"] = true, ["sally_port"] = true, ["gate"] = true, ["no"] = true, ["block"] = true } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Go to https://twitter.com/messages and when the DM's modal is loaded, | |
// open the console and run this CSS overwrite rules :) | |
$('.DMInbox')[0].style.maxWidth = '100%' | |
$('.DMInbox')[0].style.width = '100%' | |
$('.DMInbox')[0].style.height = '100%' | |
$('.DMConversation')[0].style.maxWidth = '100%' | |
$('.DMConversation')[0].style.width = '100%' | |
$('.DMConversation')[0].style.height = '100%' | |
$('.DMDock')[0].style.height = '100%' |
To disable the auto save functionality in Sketch, open your terminal and put this
defaults write com.bohemiancoding.sketch3 ApplePersistence -bool no
Restart Sketch. Be happier.