This is the example project used for the Mike.Works Modern JavaScript course.
Course outline and slides
What are the pieces?
- Webpack 3
- React v16
- Babel 7.x, setup with the stage-2 plugins, compiling to ES5 JavaScript
- ESLint for linting, setup with a strict set of rules derived from Airbnb's ESLint Config
- sass-loader for traditional management of styles
- extract-text-webpack-plugin so compiled styles are external stylesheets instead of inline style blocks
- Jest as a testing platform
How to use it
Start the Development Server
npm start <exercise-name>
/dist
folder
Build Development Assets in the This will be an un-minified version of an exercise, and will include some webpack-specific tooling, intended only for development use
npm run build:dev <exercise-name>
/dist
folder
Build Production Assets in the This will be an optimized version of the exercise
npm run build:dist <exercise-name>
The Exercise Folder
Exercises are standalone mini-projects with the following folder structure.
index.html # HTML served for exercise
./src # Scripts (js and jsx)
â index.js - # Entry point for the mini-project
./styles # Styles
â app.scss # (optional) Entry point for styles
./tests # Tests
â myfile.test.js # Tests must have *.test.js
Global stuff
Global styles can be placed in public/styles/app.scss
. These are available across all examples
License
While the general license for this project is the BSD 3-clause, the exercises themselves are proprietary and are licensed on a per-individual basis, usually as a result of purchasing a ticket to a public workshop, or being a participant in a private training.
Here are some guidelines for things that are OK and NOT OK, based on our understanding of how these licenses work:
OK
- Using everything in this project other than the exercises (or accompanying tests) to build a project used for your own free or commercial training material
- Copying code from build scripts, configuration files, tests and development harnesses that are not part of the exercises specifically, for your own projects
- As an owner of an individual license, using code from tests, exercises, or exercise solutions for your own non-training-related project.
NOT OK (without express written consent)
- Using this project, or any subset of exercises contained within this project to run your own workshops
- Writing a book that uses the code for these exercises
- Recording a screencast that contains one or more of this project's exercises
Copyright
Š 2018 Mike.Works, All Rights Reserved