s1eepercat
10/12/2019 - 7:23 AM

npm

npm init - creates json package

nice npm packages:

npm-run-all = allows us to run scripts in terminal regardless of operating system, 
create one script that runs multiple scripts

node-sass = sass compiler ("compile": "node-sass sass/main.scss css/style.css -w") -w will watch for changes
concat = concatinates code files

autoprefixer = adds browser prefixes to your code
postcss-cli = needed for autoprefixer to work


live-server = run server (react doesn't really need it)
tachyons = like bootstrap
react-tilt = making nice tilting logos
lodash = ?? some functionality. In short, Lodash is a JS helper library for arrays, strings and objects.
browserify = will turn your messy script file into browser compatible one bundle.js
react-particles-js = cool sifi bg


npm install -g live-server - installs live-server GLOBALLY
type in 'live-server' when in project folder (for fire fox)
for chrome: 
1) In package.json under scripts section create a key value as "chrome": "live-server --browser=Chrome".
2) In terminal run "npm run chrome"


npm install lodash - installs lodash LOCALLY
Lodash makes JavaScript easier by taking the hassle out of working with arrays, numbers, objects, strings, etc. Lodash�s modular methods are great for:

    Iterating arrays, objects, & strings
    Manipulating & testing values
    Creating composite functions


npm install -g browserify
browserify script.js > bundle.js - turns script into bundle file that has out script + all of the lodash? so that browsers understand it
cd b
npm run test - runs a script that is in JSON > "scripts" > "test", so we can do:
"sripts" > "build": "browserify script.js > bundle.js" and run "npm run build" to bundle our js file



npm install - updates all dependency files or outdated files based on existing json

npm install tachyons - adds some predefined class names to react (like bootstrap for react)