TLDR; A babel plugin to namespace your components to package/version combinations. There is an associated css plugin.
At Craftsy, we use a monorepo: each React component is in it's own npm package.
| var detective = require('detective'); | |
| var fs = require('fs'); | |
| var _ = require('lodash'); | |
| var path = require('path'); | |
| var resolve = require('resolve'); | |
| var toProcess = [{name: './index.js', basedir: __dirname}]; | |
| var entries = {}; | |
| while (toProcess.length) { |
| // This Page Component would normally be auto-generated from a template | |
| class TodoPage extends Component { | |
| render() { | |
| let bootstrap = ` | |
| var Todos = require('Todos'); | |
| // really, we use redux for injecting/setting up initialProps and tying in action handlers | |
| var element = React.createElement(Todos, {}); | |
| React.render(element, getElementById('app')); | |
| `; |
| use std::collections::HashMap; | |
| use std::io; | |
| use std::io::prelude::*; | |
| use std::io::BufReader; | |
| use std::fs::File; | |
| use std::error::Error; | |
| use std::mem; | |
| use std::str; | |
| type Something<'a> = HashMap<&'a str, &'a str>; |
| use std::collections::HashMap; | |
| use std::io; | |
| use std::io::prelude::*; | |
| use std::io::BufReader; | |
| use std::fs::File; | |
| use std::error::Error; | |
| use std::mem; | |
| use std::str; | |
| type Something = HashMap<String, String>; |
| use std::io; | |
| use std::io::prelude::*; | |
| use std::io::BufReader; | |
| use std::fs::File; | |
| fn main(){ | |
| match get_line_vec("yay.txt") { | |
| Ok(vec) => { | |
| let mut mut_vec = vec; | |
| let a = mut_vec.pop().unwrap(); |
| fn main() { | |
| let mut p = get_mut(); | |
| while let Some(x) = p.pop() { | |
| print!("{} ", x); | |
| } | |
| println!(""); | |
| } | |
| fn get_mut<'s>() -> Vec<i16> { |
TLDR; A babel plugin to namespace your components to package/version combinations. There is an associated css plugin.
At Craftsy, we use a monorepo: each React component is in it's own npm package.
| let obj = checkin | |
| do { | |
| console.log(Object.getOwnPropertyNames(obj)) | |
| } while ((obj = Object.getPrototypeOf(obj)) !== null) |
| # The next command will install a [raring] based ubuntu | |
| # chroot, named [cinnamon] into the default directory | |
| # with the targets [core], [cli-extra], [touch], and [keyboard] | |
| sudo crouton -n cinnamon -r xenial -t core,cli-extra,touch,keyboard | |
| # Supply your new username and password like normal, and | |
| # once that finishes, enter the chroot with: | |
| sudo enter-chroot -n cinnamon |
| import {createStore} from 'redux'; | |
| import {interceptingAction} from 'redux-intercepting-action'; | |
| import {createAction} from 'redux-actions'; | |
| import reducer from './reducers' | |
| const getInterceptingAction = (state)=> { | |
| if (state.good) { | |
| return { | |
| type: 'YAY' | |
| } |