(Full description and list of commands at - https://npmjs.org/doc/index.html)
##List of less common (however useful) NPM commands
######Prepand ./bin to your $PATH Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
Например: | |
var data = { | |
name: 'Jack', | |
items: { | |
dog: 1, | |
car: 1, | |
phone: 2, | |
}, | |
}; |
The commands are similar to NPM’s: | |
• Install all packages: npm install or yarn | |
• Install a certain package: npm install --save <package> or yarn add <package> | |
• Start the development server: npm start or yarn start | |
• Run the tests: npm test or yarn test | |
• Install something globally: yarn global add <package> or npm install -g <package> | |
yarn global add create-react-app |
<div id="root"> | |
</div> | |
.box { | |
display: block; | |
width: 200px; | |
height: 200px; | |
background-color: gray; | |
color: white; |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
class AppComponent extends React.Component { | |
state = { | |
numChildren: 0 | |
} | |
render () { |
// Load plugins | |
var gulp = require('gulp'), | |
sass = require('gulp-ruby-sass'), | |
autoprefixer = require('gulp-autoprefixer'), | |
minifycss = require('gulp-minify-css'), | |
jshint = require('gulp-jshint'), | |
uglify = require('gulp-uglify'), | |
imagemin = require('gulp-imagemin'), | |
rename = require('gulp-rename'), | |
clean = require('gulp-clean'), |
/* ******************************************************************************************* | |
* THE UPDATED VERSION IS AVAILABLE AT | |
* https://github.com/LeCoupa/awesome-cheatsheets | |
* ******************************************************************************************* */ | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html |
(Full description and list of commands at - https://npmjs.org/doc/index.html)
##List of less common (however useful) NPM commands
######Prepand ./bin to your $PATH Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
The git command-line utility has plenty of inconsistencies http://steveko.wordpress.com/2012/02/24/10-things-i-hate-about-git/
A GUI like http://sourcetreeapp.com is often helpful, but staying on the command line usually quicker. This is a list of the commands I use most frequently, listed by funcional category:
git status
list which (unstaged) files have changed