Skip to content

Instantly share code, notes, and snippets.

$ npm run lint
> @ lint
> npm run lint:js && npm run lint:css
> @ lint:js
> eslint src tools
npm run test -- --reporter min --watch
@stujo
stujo / rsk_layout_test.js
Last active October 20, 2016 00:13
Example test from the ReactStarterKit
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
/* eslint-env mocha */
mocha "src/**/*.test.js" --require test/setup.js --compilers js:babel-register
@stujo
stujo / rsk_git_clone_start.txt
Last active October 19, 2016 23:15
Cloning the ReactStarterKit via git
# Given the app name that you want as MyApp...
$ git clone -o react-starter-kit -b master --single-branch https://github.com/kriasoft/react-starter-kit.git MyApp
$ cd MyApp
$ git remote -v
react-starter-kit https://github.com/kriasoft/react-starter-kit.git (fetch)
react-starter-kit https://github.com/kriasoft/react-starter-kit.git (push)
@stujo
stujo / rsk_npm_start_output.txt
Created October 19, 2016 21:33
Output from npm start in ReactStarterKit
hello-world-rsk (master)$ npm start
> @ start /work/stujo/hello-world-rsk
> babel-node tools/run start
Starting 'start'...
Starting 'clean'...
Finished 'clean' after 115 ms
Starting 'bound copy'...
build/package.json
"scripts": {
"lint:js": "eslint src tools",
"lint:css": "stylelint \"src/**/*.{css,less,scss,sss}\"",
"lint": "npm run lint:js && npm run lint:css",
"test": "mocha \"src/**/*.test.js\" --require test/setup.js --compilers js:babel-register",
"test:watch": "npm run test -- --reporter min --watch",
"clean": "babel-node tools/run clean",
"copy": "babel-node tools/run copy",
"bundle": "babel-node tools/run bundle",
"build": "babel-node tools/run build",
@stujo
stujo / rsk_npm_scripts.txt
Last active October 19, 2016 23:17
Available npm run scripts in the ReactStarterKit
$ npm run
Lifecycle scripts included in :
test
mocha "src/**/*.test.js" --require test/setup.js --compilers js:babel-register
start
babel-node tools/run start
available via `npm run-script`:
lint:js
eslint src tools
# Get the generator version number for our git commit message
$ npm -v generator-react-fullstack
# Exclude node_modules from git
$ echo "node_modules" > .gitignore
# Set up git
$ git init
# Add the files
# Install Yeoman globally
$ npm install -g yo
# Install RSK Yeoman Generator globally
$ npm install -g generator-react-fullstack
# Make a project directory
$ mkdir hello-world-rsk
$ cd hello-world-rsk