Giter Club home page Giter Club logo

movies's Introduction

Setup

npm init

npm install --save react
npm install --save react-dom

npm install --save-dev webpack
npm install webpack-dev-server

npm install --save-dev babel-loader 
npm install --save-dev babel-core
npm install --save-dev babel-preset-es2015
npm install --save-dev babel-preset-react

/webpack config/

webpack.config.js

var path = require('path');
var webpack = require('webpack');

module.exports = {
  entry: './index.js',
  output: { path: 'build', filename: 'bundle.js' },
  module: {
    loaders: [
      {
        test: /.jsx?$/,
        loader: 'babel-loader',
        exclude: /node_modules/,
        query: {
          presets: ['es2015', 'react']
        }
      }
    ]
  },
};

add eslint

 npm install -g eslint
 eslint --init

/Run webpack/

server mode

webpack-dev-server --progress --colors

build/normal mode

webpack --progress --colors

Note

always declare static to exported functions

Move to github

  1. Create a new repository on GitHub. To avoid errors, do not initialize the new repository with README, license, or
    gitignore files. You can add these files after your project has been pushed to GitHub. -- In .gitignore .gitignore node_modulesWill ignore node_modules and .gitignore itself--

  2. Open terminal cd to local dir and git init.

  3. git add --all

  4. git commit -m "First commit"

  5. git remote add origin [remote repository URL]

  6. git remote -v - Verifies the new remote URL

  7. git push origin master

  8. If mistakenly added gitignore after git --add

    git rm -r --cached node_modules git commit -m "removing node_modules

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.