Git Product home page Git Product logo

webpack-bin's Introduction

webpack-bin's People

Contributors

bfitch avatar bogas04 avatar christianalfoni avatar jimthedev avatar marcelaraujo avatar tomhah avatar vitorvrs 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webpack-bin's Issues

Improve displaying errors to users

When I first created a new bin, I couldn't figure out why it wasn't running. However, I couldn't even save it to post here because most of the buttons were disabled
screen shot 2016-03-07 at 9 01 48 pm

I eventually found a linting error re: mixed spaces & tabs
screen shot 2016-03-07 at 9 00 02 pm

and fixing that enabled the buttons
screen shot 2016-03-07 at 9 00 23 pm

This behavior wasn't expected or obvious to me. It was only after scanning the file many times that I found the "error" (it's a style issue, not a language one).

Perhaps these should be displayed in a fixed position on the page (top or bottom) so they're more obvious to the user.

Is there a good reason to prevent running a bin because of a formatting issue?

Is there a way to control the rules & levels for the linter?

Is it a good idea to prevent saving the bin if there's an error? What if the "error" is a stylistic one?

Select/copy from text

It would be nice to be able to select and copy text from the .js and .css sources in the browser.

Add fuzzy file search

Like cmd+T in Atom. This could allow closing file tabs and reopening. Would need to change file deletion behavior too, but wanted to capture this feature request.

Error message wanted if module not found

It would be nice to get an error message if module given in an import line was not found. Both of these lines have errors, but no error message is given:

import React from './react';
import HalloVerden from './HelloWorld';

The error in the first line is the './' before 'react'.

Add HTML source view of output

A view of the html source for the output would be very useful.
Plus link through to css files?

Of course you can use F12 and inspector picker but that is a little fiddly.

Suggest tabs for right hand pane

Planned changes

  • Information about repo and creating issues
  • Describe how the project works in the README
  • Do not create BIN until first save (coming from root url)
  • Implement Live Sharing
  • Better handling of when to show loader, should be time based
  • Add timestamp to bins
  • Add timestamp to in-memory bundles and clean up process
  • Add Cerebral, Redux, CycleJS (Angular2 has a crazy setup of packages)
  • Add Sass loader
  • Add Less loader
  • Display text about bin.log() when no logs
  • Delete files
  • Implement console using global bin.log in javascript to log out values. Want to keep normal console.log behaviour. Will also log out JavaScript errors
  • Change to ts-loader
  • Twitter share
  • Embed bin
  • Add TypeScript linter (https://github.com/basarat/TypeScriptEditor)
  • Download app with package.json, webpack deps and files
  • Google Analytics
  • Increase session duration to 24 hours
  • Improve responsive experience
  • Add loader when launching app
  • Allow log to be shown below preview (http://alexkuz.github.io/react-dock/demo/)
  • Always allow LIVE, just start up a new BIN first, if not currently owner
  • Add HTML highlighting and linter
  • Add raw loader for HTML and TXT
  • Add json loader, highlighter and linter
  • Add better initial boilerplate with css and HTML
  • Bring back decorator

Favicon

Just add a favicon so I can give its respectful place in my bookmarks bar πŸ˜„

Error when running npm run dev

I get this error when running npm run dev. HMR in browser is not working. Seems like a pretty big build fΓΆr 4.5 seconds when only changing an inline style tag. Am I doing something wrong? I cloned the repo. Installed the node modules. I'm on "node":"5.0.0","npm":"3.3.6"

[BABEL] Note: The code generator has deoptimised the styling of "/Users/Mathias/Desktop/webpack-bin/app/components/CodeEditor/eslint.js" as it exceeds the max of "100KB".
[0] [kotatsu] Built in 30.4s.
[0] [kotatsu] Done!
[0] [kotatsu] Serving your app on port 3000...
[0] [kotatsu] ./app/components/CodeEditor/eslint.js
[0] Critical dependencies:
[0] 1:343-350 This seems to be a pre-built javascript file. Though this is possible, it's not recommended. Try to require the original source to get better results.
[0]  @ ./app/components/CodeEditor/eslint.js 1:343-350
[0] 
[0] [kotatsu] Bundle rebuilding...
[0] [kotatsu] Built in 4.5s.
[0] [kotatsu] ./app/components/CodeEditor/eslint.js
[0] Critical dependencies:
[0] 1:343-350 This seems to be a pre-built javascript file. Though this is possible, it's not recommended. Try to require the original source to get better results.
[0]  @ ./app/components/CodeEditor/eslint.js 1:343-350
[0] [kotatsu] Updated modules:
[0] [kotatsu]   - ./app/components/Bin/index.js

Add Docker

In order to make development and deployment easier I think it would be a great idea to add Docker.
This way we don't need to clutter our system with dependencies such as mongodb and we could guarantee that the project will run on any machine as long as Docker is installed.

Keep preview / log pane in view

See http://www.webpackbin.com/N1jDrrvne where preview pane is push nearly off screen entirely because of a long line of text.

The biggest issue is that the split isn't resizable so the only way to get it into view is to wrap your code differently.

It'd be nice to have a reasonable width with overflow: auto or scroll on them so you could always read the output. In this case, the preview pane actually contained a helpful message but I couldn't see it.

Make mobile friendly

By firing off a signal when changing files/code it will be possible to slide in/out the preview window when on mobile. Allowing people to follow a live coding session on a mobile device. Pretty neat :)

Support for jsxPragma in babel

I can't see this option, but I think it will be kinda neat! There are several packages that uses jsx and are drop-in replacement for react (e.g. https://github.com/developit/preact). But they need one tweak for them:

query: {
      presets: ['es2015', 'stage-0'],
      plugins: [
        ['transform-react-jsx', { //this
          'pragma': 'h'
        }]
      ]
    },

Support renaming files

Currently you can only create new files or delete them. Would be great to click an existing tab and then rename an existing file. Not a big deal, as you can currently copy whats in your file, delete the file, and paste code into an new one. But, it would be nicer to just rename it. πŸ˜„

Add scrolling to Bundled Packages results

It's easy for the search results to overflow the menu/viewport height. The container should be scrollable.

Notice the difference between:

The search results as seen on my 13" laptop:
screen shot 2016-03-08 at 11 25 03 am

Versus on my 27" Display
screen shot 2016-03-08 at 11 25 20 am

The laptop version doesn't show results for, say, the react 15.0.0-rc.1, react-dom 15.0.0-rc-1 bundle which means it can't be used in bins.

Support iPad

It should work, but does not? report on iPad mini. Might have been downtime though

What is the keyboard access

From the demo video you seemed to save with a key sequence. There only seems to be 'Run' on the UI

Can you document this and others? Perhaps use a ? key handler like google do?

Mark modified files

For modified files but not yet saved, perhaps a star besides the name just to know what exactly runs. Then, when we save, the star would disappear.

Before:
image

After:
image

Great project thanks !

Run loop on live

Just did a "live" feature test:

  1. Loaded site and hit live.
  2. Loaded cerebral-react booter
  3. Second client connected
  4. First client wrote out something to the bin.log
  5. Clicked Run and looked at the log

It seems to get stuck in a loop. Almost like the run gets called on the second client which calls run on the first client which calls run on the second client etc. Disconnecting the second client fixes the loop issue on the first.

Missing required dependencies?

I cloned the repo, installed deps and wanted to npm start but got a bunch of errors regarding missing dependencies.

$ npm start

> [email protected] start /Users/emmenko/dev/src/webpack-bin
> node start.js

module.js:338
    throw err;
          ^
Error: Cannot find module 'mime'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/emmenko/dev/src/webpack-bin/server/middleware.js:6:12)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)

$ npm i mime
[email protected] node_modules/mime

$ npm start

> [email protected] start /Users/emmenko/dev/src/webpack-bin
> node start.js

module.js:338
    throw err;
    ^
Error: Cannot find module 'request'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/emmenko/dev/src/webpack-bin/server/npm.js:5:15)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)

$ npm i request
[email protected] node_modules/request
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected] ([email protected])
β”œβ”€β”€ [email protected] ([email protected])
β”œβ”€β”€ [email protected] ([email protected])
β”œβ”€β”€ [email protected] ([email protected], [email protected], [email protected], [email protected])
β”œβ”€β”€ [email protected] ([email protected])
β”œβ”€β”€ [email protected] ([email protected])
β”œβ”€β”€ [email protected] ([email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected])

$ npm start

> [email protected] start /Users/emmenko/dev/src/webpack-bin
> node start.js

Running WebpackBin version:  0.6.0
fs.js:565
fs.write = function(fd, buffer, offset, length, position, callback) {
                                                 ^
Error: ENOENT, no such file or directory '/Users/emmenko/dev/src/webpack-bin/node_modules/babel-loader/package.json'
    at Error (native)
    at Object.fs.openSync (fs.js:500:18)
    at Object.fs.readFileSync (fs.js:352:15)
    at null._onTimeout (/Users/emmenko/dev/src/webpack-bin/server/preLoadPackages.js:21:37)
    at Timer.listOnTimeout (timers.js:110:15)

And so on...

Am I missing something here?

Reword "Current Package Bundle" input label

It's not very obvious when using webpack bin for the first time that the "Current Package Bundle" search will search and install packages from the npm registry. I initially thought it would search for existing packages in my current bundle. Perhaps rename it to "Search NPM packages:" and move "Current Package Bundle" underneath the search input (above the installed package list).

screen shot 2016-03-09 at 11 58 35 pm

Ah, just noticed that "Add NPM package..." is set as placeholder text. But, I still missed it the first few times using it...wasn't totally discoverable to me.

Live Preview-Only URL

I'd love to have a live preview URL in edition to the live edit mode. This would allow you to open the preview on a device. This would pair nicely with some boilerplate for React Material UI. The general idea though is make things friendlier for testing/sharing mobile/touch UIs.

A similar request was also recently made in #33.

Add jade loader

webpack-bin looks very promising, but it could really use support for some popular loaders like Jade (pug)! Keep it up!

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.