Hello everyone! It has been some time. I took a little break from coding and decided to get back into it with something familiar that I am fond of e.g. dawn.
I haven't added any new features, or changed the overall architecture of the different modules.
This PR has the following changes:
Added jasmine as a node module instead of using the standalone jasmine.
Updated all modules to a more modern pattern e.g. module.exports = Gait. This was necessary to use Jasmine's CLI. There are plenty of benefits to this but mainly it looks cooler and newer.
Installed browserify to bundle dependencies and permit use of require in the browser. Browserify is much easier to set up than webpack, and we don't need anything too clever as this isn't a full stack app. Browserify should make future deployment much easier.
Relocated the contents of dawn-jquery.js into dawn.js. dawn-jquery.js was relying on global variables existing at the top scope, which did not work with bundling dependencies.
Updated README with new instructions on getting started.
Removed standalone jasmine.
All of the tests are passing and I've run the app and it appears to be working well!
So now you can do:
npm install (as always) to install dependencies.
npm test to run tests. Green dots = passing! Otherwise it will list failures in the command line.
npm run build to bundle dependencies. This is necessary before you open dawn.html. Doing this was necessary in order to use modern modular patterns (e.g. module.exports = Gait).
open dawn.html to run!
Still to do, in future work:
update code to ES6 (e.g. exports default Gait) and use Babel to transpile to ES5.
finish extracting dependencies to specific modules in which they are required. Once this is done, deployment will be much much easier.
I appreciate there is a lot of hectic-looking stuff here. Please don't hesitate to ask if you have questions and feedback is always always welcome!
Closes #142
Hello everyone! It has been some time. I took a little break from coding and decided to get back into it with something familiar that I am fond of e.g. dawn.
I haven't added any new features, or changed the overall architecture of the different modules.
This PR has the following changes:
module.exports = Gait
. This was necessary to use Jasmine's CLI. There are plenty of benefits to this but mainly it looks cooler and newer.require
in the browser. Browserify is much easier to set up than webpack, and we don't need anything too clever as this isn't a full stack app. Browserify should make future deployment much easier.All of the tests are passing and I've run the app and it appears to be working well!
So now you can do:
npm install
(as always) to install dependencies.npm test
to run tests. Green dots = passing! Otherwise it will list failures in the command line.npm run build
to bundle dependencies. This is necessary before you open dawn.html. Doing this was necessary in order to use modern modular patterns (e.g.module.exports = Gait
).open dawn.html
to run!Still to do, in future work:
exports default Gait
) and use Babel to transpile to ES5.I appreciate there is a lot of hectic-looking stuff here. Please don't hesitate to ask if you have questions and feedback is always always welcome!