This is a project to list planets from swapi. The project dependencies are handled by npm (for tools) and bower (for project code)
All code should aim to follow this style guide
All first party code should be in the src folder.
src/components
contains services, directives and filters, registered to the angular module sw-planets.components
src/modules
contains views, controllers and routes, registered to the angular module sw-planets.modules
and sw-planets.routing
Each folder within these two folders should be fairly self contained help picking components out for other projects
Project is built with gulp.
You need Node.js, bower.js and gulp.js to build. It's also helpful to have karma-cli to run the tests
- run
npm install
- run
bower install
- run
gulp
This will put files into the folderdist
this can then be served up by some plain old http server.
Tests are written in jasmine. Test files should sit in the same directory as what is being tested and should have the same name except eith .spec.js
at the end (eg. /components/api/api.service.js
will have a test file /components/api/api.service.spec.js
). This keeps everything together and means tests get moved along with other files.
Styles are written in Sass with a foundation of bootstrap
Styles should try to conform to BEM which sometimes kinda flies in the face of / fights against bootstrap, in these cases a section of bootstrap overrides at the end of the file should suffice.
- There is no minification/release build process
- Needs
ng-annotate
, js uglify,cssnano
- Needs
- Code coverage would be nice
- ESLint setup
gulp-serve
instead of just usingpython -mhttp.server dist
or nodehttp-server dist