... or babrowseract.
Proof of using ES6 & CommonJS modules co-existing in development with trans(pilers | forms) to deploy for browsers of today
The .eslintrc files requires the following attributes in order to allow for development with ES6 Modules without warning:
{
"env": {
"es6": true
},
"ecmaFeatures": {
"modules": true
}
}
The following attribute is required to work with React JSX declaration without warning:
{
"ecmaFeatures": {
"jsx": true
}
}
Modules are defined using the ES6 import
syntax. When built, they are run through the proper transforms and transpilers to generate code that can be delivered to browsers of today without ES6 support.
Using Babel, modules can be defined using the ES6 syntax. Upon build of the files for deployment, the modules are run through the Babel transpiler to generate CommonJS compatible modules.
browserify is used in the bundling process of modules for the browser because the default output module syntax for Babel is CommonJS.
ReactJS is used for the component library. It is currently loaded in as a import
ed library and bundled with the build.
A basic Flux design is used as a base "architecture" for the application. The term "architecture" is used in quotes as it is a design that is adhered to rather than a suite of libraries that the application is forced to conform to.
In addition, the only "sanctioned" Flux-y thing - as far as code is concerned - incorporated into the project is the Dispatcher.