mozilla / neo Goto Github PK
View Code? Open in Web Editor NEWINACTIVE - http://mzl.la/ghe-archive - DEPRECATED: See https://neutrino.js.org for alternative
Home Page: https://neutrino.js.org
License: Mozilla Public License 2.0
INACTIVE - http://mzl.la/ghe-archive - DEPRECATED: See https://neutrino.js.org for alternative
Home Page: https://neutrino.js.org
License: Mozilla Public License 2.0
Formidable just came out with this awesome tool:
https://github.com/FormidableLabs/webpack-dashboard
I think we should integrate this as the default npm start
view.
i'd like to do this before we make our first release
hi, is there a way to hide the right side state panel so that playing with css would result the way it should without dragging to hide?
i need this for relenapi work and will probably work on this first thing tomorrow morning
it is also important to test that release was sucessfull. this means that we should be able to run our tests against released version.
@eliperelman thoughts?
Currently, all imports in the code need to be relative to the current path, making it harder to refactor the code base as it's a pain to have to change all import paths, figuring out how many ../..
are needed.
Adding the src/
directory to webpack's resolve.root
config allows developers to go from something like this:
import Header from '../../components/Header';
import TransactionForm from '../TransactionForm';
import * as AppActions from '../../actions';
to something like this:
import Header from 'components/Header';
import TransactionForm from 'containers/TransactionForm';
import * as AppActions from 'actions';
This change is also backwards compatible, so relative imports still work.
When I created Neo, it was meant highly React-Redux-boilerplate specific. I have since been working on development of neutrino, which splits Neo out into two pieces: a wrapped Webpack build system, and a way to have pre-configured presets.
Right now Neo is all-in-one; installing it comes with the build system and all the configuration needed to build. Neutrino is slightly different; you use 2 development dependencies: neutrino and a build preset. For example, if I wanted to build a baseline React project, I could install neutrino
and neutrino-preset-react
.
Neo does more than just a baseline React project by including Sass building, but anything more than that either comes from scaffolding, or project-specific includes.
Both tools support project-based configuration overrides, but neutrino makes management of these simpler by easily installing from npm a pre-configured preset.
Leaving this open to discuss possibilities.
After creating a new project using neo v2.2.0, running "neo test" results in build errors related to loading JSON files. Running dev mode works fine.
ERROR in .//cheerio/package.json/cheerio/index.js 11:18-38
Module build failed: SyntaxError: Unexpected token m in JSON at position 0
at Object.parse (native)
at Object.module.exports (/home/derekho/LikeMindNetworks/prototypes/react-proto/node_modules/json-loader/index.js:7:48)
@ ./
ERROR in .//css-select/lib/procedure.json/css-select/lib/compile.js 17:18-45
Module build failed: SyntaxError: Unexpected token m in JSON at position 0
at Object.parse (native)
at Object.module.exports (/home/derekho/LikeMindNetworks/prototypes/react-proto/node_modules/json-loader/index.js:7:48)
@ ./
ERROR in .//entities/maps/xml.json/htmlparser2/lib/Tokenizer.js 6:16-49
Module build failed: SyntaxError: Unexpected token m in JSON at position 0
at Object.parse (native)
at Object.module.exports (/home/derekho/LikeMindNetworks/prototypes/react-proto/node_modules/json-loader/index.js:7:48)
@ ./
ERROR in .//entities/maps/entities.json/htmlparser2/lib/Tokenizer.js 4:16-54
Module build failed: SyntaxError: Unexpected token m in JSON at position 0
at Object.parse (native)
at Object.module.exports (/home/derekho/LikeMindNetworks/prototypes/react-proto/node_modules/json-loader/index.js:7:48)
@ ./
ERROR in .//entities/maps/legacy.json/htmlparser2/lib/Tokenizer.js 5:16-52
Module build failed: SyntaxError: Unexpected token m in JSON at position 0
at Object.parse (native)
at Object.module.exports (/home/derekho/LikeMindNetworks/prototypes/react-proto/node_modules/json-loader/index.js:7:48)
@ ./
ERROR in .//entities/maps/decode.json/entities/lib/decode_codepoint.js 1:16-46
Module build failed: SyntaxError: Unexpected token m in JSON at position 0
at Object.parse (native)
at Object.module.exports (/home/derekho/LikeMindNetworks/prototypes/react-proto/node_modules/json-loader/index.js:7:48)
@ ./
Any plans to add support for server side rendering? After all, it seems like SSR is one of the best reasons to use Redux.
would it be possible to bundle configuration for Jest tests?
I was following the flow setup described in the Create and build React web applications with zero initial configuration and minimal fuss post:
node_modules/.bin/flow init
.flowconfig
filepackage.json
to add --config dev.config.js
argument to neo start
dev.config.js
:const dev = require('mozilla-neo/config/webpack.dev');
const FlowStatusPlugin = require('flow-status-webpack-plugin/index');
dev.plugins.push(new FlowStatusPlugin({binaryPath: 'node_modules/.bin/flow'}));
module.exports = dev
I've added a sample function which breaks type, to one of the sources:
function display(x: string): string {
return x.length;
}
When running npm start
I don't see flow status after modifying any file, though my editor displays nice notification that return type is incompatybile.
Is there something wrong with my setup or FlowStatusPlugin
doesn't display status?
Hi guys, @eliperelman,
The dev server can't serve static assets (images...), I tried to put them at the root level and /src but it's not working.
That would be nice to have a /public or /assets folder in the default config configured to serve a root URL like /my-logo.png
Thanks ;)
to run tests in continuous mode
const { commands } = require('../package.json');
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:414:25)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Function.Module.runMain (module.js:467:10)
at startup (node.js:134:18)
at node.js:961:3
Currently src/app.js provides a skeleton that can't be extended is almost always not what someone will be completely happy with. Someone most certainly always wants to change it. We should do one of the following:
Hi @eliperelman , sorry to bother you again, I found out the dev tools embeded in the production build bring 1.1Mo so here is a webpack config line I think you should include in the default production config:
new webpack.NormalModuleReplacementPlugin(/^(redux-slider-monitor|redux-devtools-log-monitor|redux-devtools-dock-monitor|redux-devtools-chart-monitor|react-hot-loader|redux-devtools|redux-logger|react-hot-loader)$/, join(process.cwd(), './shim.js'))
with shim.js
as en empty file
for example: redux-devtools-chart-monitor
brings he whole D3 as a dependency
Hi, awesome project. Congrats!
After building the example project and placing the folder (index + 2 js files) in webserver (apache) does not open any html element. However console in chrome tools does show the show output as when the project is run in dev mode (npm start). What is I'm missing?
Thanks in advance
here's a logtalk though I think this is the important part
126406 warn enzyme@2.4.1 requires a peer of react@0.13.x || 0.14.x || ^15.0.0-0 but none was installed.
126407 verbose If you need help, you may report this error at:
126407 verbose <https://github.com/npm/npm/issues>
126408 warn react-element-to-jsx-string@3.2.0 requires a peer of react@^0.14.8 || ^15.0.1 but none was installed.
126409 verbose If you need help, you may report this error at:
126409 verbose <https://github.com/npm/npm/issues>
126410 warn react-addons-test-utils@15.4.1 requires a peer of react-dom@^15.4.1 but none was installed.
126411 verbose If you need help, you may report this error at:
126411 verbose <https://github.com/npm/npm/issues>
126412 warn react-hot-api@0.4.7 requires a peer of react@>=0.11.0 || ^0.14.0-rc but none was installed.
126413 verbose If you need help, you may report this error at:
126413 verbose <https://github.com/npm/npm/issues>
126414 verbose stack Error: node-sass@3.10.0 postinstall: `node scripts/build.js`
126414 verbose stack Exit status 1
126414 verbose stack at EventEmitter.<anonymous> (C:\Users\MOSHMA~1\AppData\Roaming\nvm\v7.2.0\node_modules\npm\lib\utils\lifecycle.js:255:16)
126414 verbose stack at emitTwo (events.js:106:13)
126414 verbose stack at EventEmitter.emit (events.js:191:7)
126414 verbose stack at ChildProcess.<anonymous> (C:\Users\MOSHMA~1\AppData\Roaming\nvm\v7.2.0\node_modules\npm\lib\utils\spawn.js:40:14)
126414 verbose stack at emitTwo (events.js:106:13)
126414 verbose stack at ChildProcess.emit (events.js:191:7)
126414 verbose stack at maybeClose (internal/child_process.js:885:16)
126414 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
126415 verbose pkgid node-sass@3.10.0
NEO does not require on react? (as in, do I have to install react by hand and then install neo?)
Hi @eliperelman , when importing moment-timezone into my project I get the following error:
ERROR in ./~/moment-timezone/data/packed/latest.json
Module parse failed: /my-project/node_modules/moment-timezone/data/packed/latest.json Unexpected token (2:10)
You may need an appropriate loader to handle this file type.
After playing around with the json loader in the webpack I still can't get rid of it, do you know how to solve this please?
Thanks!
Hi!
I'd like to use the Redux Devtools by using the browser plugin. Is it possible to turn the bundled devtools off?
Also, the browser plugin version gives me the error: No store found. Make sure to follow the instructions.
As of January 1 2019, Mozilla requires that all GitHub projects include this CODE_OF_CONDUCT.md file in the project root. The file has two parts:
If you have any questions about this file, or Code of Conduct policies and procedures, please see Mozilla-GitHub-Standards or email [email protected].
(Message COC001)
Right now we use destructuring in Neo code, which can't run natively prior to v6. I think with a few changes we could support earlier versions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.