Giter Club home page Giter Club logo

babel-react-rollup-starter's Introduction

Hello folks 👋

I'm Davy (he/him), a senior software engineer | hacker | maker | thinker.

These days I'm mostly doing #Rustlang 🦀 and #TypeScript 🛠️.

I ❤️ to learn on a daily basis, to face new challenges and to contribute to open-source. Github is a playground for my experiments.

Enough about me! You can find me on Mastodon and on Linkedin.

babel-react-rollup-starter's People

Contributors

callahanchris avatar dawsbot avatar exarus avatar greenkeeper[bot] avatar mwozniczak avatar yamafaktory avatar zwhitchcox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

babel-react-rollup-starter's Issues

broswser-sync --index option invalid

In browser (Chrome http://localhost:3000/) I see only : Cannot GET/

  • WIN7
  • browser-sync 2.18.12

change

    "browse": "browser-sync start --s --index 'html/index-dev.html' --files 'html/**/*.html, build/**/*.js' --no-notify",

to

    "browse": "browser-sync start --s --index html/index-dev.html --files 'html/**/*.html, build/**/*.js' --no-notify",

solve the problem

babel has error

// Rollup plugins.
import babel from 'rollup-plugin-babel'
import cjs from 'rollup-plugin-commonjs'
import globals from 'rollup-plugin-node-globals'
import replace from 'rollup-plugin-replace'
import resolve from 'rollup-plugin-node-resolve'
import uglify from 'rollup-plugin-uglify'

export default {
  dest: 'build/ReactCdPlayer.js',
  entry: 'src/containers/ReactCdPlayer.js',
  format: 'iife',
  plugins: [
    babel({
      babelrc: false,
      exclude: 'node_modules/**',
      presets: [ [ 'es2015', { modules: false } ], 'stage-0', 'react' ],
      plugins: [ 'external-helpers' ]
    }),
    cjs({
      exclude: 'node_modules/process-es6/**',
      include: [
        'node_modules/fbjs/**',
        'node_modules/object-assign/**',
        'node_modules/react/**',
        'node_modules/react-dom/**',
        'node_modules/prop-types/**'
      ]
    }),
    globals(),
    replace({ 'process.env.NODE_ENV': JSON.stringify('production') }),
    resolve({
      browser: true,
      main: true
    }),
    uglify()
  ],
  sourceMap: true
}
{
  "name": "react-cd-player",
  "homepage": "http://zhangwei900808.github.io/react-cd-player",
  "version": "0.3.0",
  "main": "index.js",
  "dependencies": {
    "classnames": "^2.2.5",
    "material-ui": "next",
    "material-ui-icons": "^1.0.0-alpha.19",
    "node-sass-chokidar": "^0.0.3",
    "npm-run-all": "^4.0.2",
    "react": "^15.6.1",
    "react-dom": "^15.6.1"
  },
  "devDependencies": {
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-es2015-rollup": "^3.0.0",
    "babel-preset-latest": "^6.24.1",
    "babel-preset-react": "^6.24.1",
    "babel-preset-stage-0": "^6.24.1",
    "babel-preset-stage-1": "^6.24.1",
    "gh-pages": "^1.0.0",
    "react-scripts": "1.0.11",
    "rollup": "^0.45.2",
    "rollup-plugin-babel": "^3.0.1",
    "rollup-plugin-commonjs": "^8.1.0",
    "rollup-plugin-node-globals": "^1.1.0",
    "rollup-plugin-node-resolve": "^3.0.0",
    "rollup-plugin-replace": "^1.1.1",
    "rollup-plugin-uglify": "^2.0.1"
  },
  "scripts": {
    "build-css": "node-sass-chokidar src/assets/css/ -o src/assets/css/",
    "watch-css": "npm run build-css && node-sass-chokidar src/assets/css/ -o src/assets/css/ --watch --recursive",
    "start-js": "react-scripts start",
    "start": "npm-run-all -p watch-css start-js",
    "build": "npm run build-css && react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject",
    "predeploy": "npm run build",
    "deploy": "gh-pages -d build",
    "rollup-build": "rollup -c",
    "rollup-production-build": "NODE_ENV=production rollup -c"
  }
}

$ rollup -c
🚨   Error: 'default' is not exported by node_modules/material-ui-icons/FastRewind.js
https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
src/containers/ReactCdPlayer.js (6:7)
4: import PropTypes from 'prop-types';
5: import FastForward from 'material-ui-icons/FastForward';
6: import FastRewind from 'material-ui-icons/FastRewind';
          ^
7: import { LinearProgress } from 'material-ui/Progress';

error Command failed with exit code 1.

image

Documentation for usage is lacking

Documentation for what to do right after the installation is missing. What do I do with this? Do I copy the contents over from the npm dir (since Installation section wants me to install it --globally)? If so, do I copy the whole thing over, or just part of it? Which part?

babel with es2015-rollup is broken

This is what I see when I try to build it

It looks like your Babel configuration specifies a module transformer. Please disable it. If you're using the "es2015" preset, consider using "es2015-rollup" instead.

I am using:

  • node v5.2.0
  • npm v3.3.12
  • Windows 10

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml
  • The new Node.js version is in-range for the engines in 1 of your package.json files, so that was left alone

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Some (?) libraries shipped as CommonJS modules refuse to build with default rollup configs

I wanted to use this starter as a jumping off point for learning the react-diagrams library. Unfortunately, it appears that it being a commonJS module is breaking the build resulting with either 'CanvasWidget' is not exported by node_modules\storm-react-diagrams\src\main.js or 'default' is not exported by node_modules\storm-react-diagrams\src\main.js depending on how I try to import it. I suspect some fiddling with cjs's settings would resolve that, but so far my attempts to do so have failed. Will re-attempt tomorrow.

I've already opened an issue with the library in question, but perhaps it might be worthwhile to use it as a test-case for ensuring that libraries shipped in that way can be imported easily?

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.