GithubHelp home page GithubHelp logo

kickstart-simple-modules's Introduction

kickstart-simple by thereactivestack

Kickstart a simple project fast!

If you would like a more sophisticated kickstart with code splitting, see the kickstart-hugeapp project.

Clone this project to start a simple project using Meteor, React.js and Webpack.

  1. git clone https://github.com/thereactivestack/kickstart-simple.git
  2. cd kickstart-simple
  3. meteor

The stack & features

  • Include the simple todo app example
  • ES6 modules
  • Meteor
  • React.js
  • react-router with server-rendering (you can disable it by editing server/entry.js)
  • Webpack (bundle your app / assets and send them to Meteor)
  • Hot-reload with no page refresh in development mode
  • Optimize your code in production mode
  • Give access to NPM by using packages.json

How does it work?

Webpack needs one webpack.conf.js file for the client and one webpack.conf.js for the server. It allows you to have a better control over the build process. Every other files are not automatically included by Meteor. Everything is starting from your entry point.

The server entry point in the project is at server/entry.js. Everything that you want to load on your Meteor server, they have to be imported or required in some way.

The client entry point in the project is at client/entry.js and work the same way as on the server, except it is run on the browser or Cordova.

You can use any package coming from NPM by adding it to packages.json.

Go look at them, they are simple!

Production

To run or build in production, you need to set your environment variable NODE_ENV to production.

You can use meteor run, meteor build, mup or anything working with Meteor.

Run in production mode

NODE_ENV=production meteor run --production

Build for production

NODE_ENV=production meteor build .

Then, you can run bundle/main.js without it.

We are going to remove this once we have a fix that detect Meteor production mode in a compiler

Troubleshooting

Module build failed: ReferenceError: Unknown plugin "react-transform"

It seems like the babel plugins are not looking into the correct directory and their is no setting to fix that. However, what you can do is create a symbolic link in your project root to the correct folder:

ln -s packages/npm-container/.npm/package/node_modules

We are going to remove this step once we have a fix

kickstart-simple-modules's People

Contributors

exon avatar jthomaschewski avatar

Watchers

 avatar

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.