Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUILD SYSTEM] Preparations for Milestone 2 #205

Merged
merged 37 commits into from
Sep 8, 2016

Conversation

thatkookooguy
Copy link
Member

@thatkookooguy thatkookooguy commented Sep 6, 2016

Change Summary

More info

here are some of the changes here:

  • jscs was announced to merge with eslint. we need to start and move as well. I activated most of the same rules. we'll add the missing ones once eslint will implement them
  • change livereload to browser-sync

browser-sync is much more robust than livereload. It actually doesn't reload the page at all, just injects the new css files. Also, it can sync multiple devices together and monitor them.
With javascript, it does reload since the code needs to run

  • started adding a distribution task in our gulp!

This means we can now create a dist folder of our front-end that have the following things (all things un-checked still need to happen):

  • combine all css dependencies into a single file to load faster
  • combine all of the fonts css into a single fonts.css file, with the font files in the right relative location
  • combine all javascript dependencies into a single file to load faster
  • combine our css and our javascript, each to a single file
  • minify and unglify css (combine rules, remove all unneeded characters)
  • minify and uglify javascript
  • replace all libraries with min version of them
  • copy all image assets to the new dist folder

That's it for now :-)

  • Make server load the dist folder instead of the development folder if it exists

simpy run node server.js --dist to serve the distribution files or gulp serve:dist

  • Created our own eslint plugin and 2 rules. We can add more to that plugin later

The current rules are:

  • sort function declarations in angular's modules (controllers, providers, services, filters, directives, etc.) and keep them at the end of the file
  • prefer lodash's is* functions than angular's is* functions
  • Start implementing some docs to our build system.

The jsdoc in our gulp is just a placeholder since it throughs an error. But it isn't written in the help file since it doesn't have a description so I'm leaving it there.
The sc5-styleguide almost works. Once we start writing some general css components, we'll add them there. And after that, I'll try to implement our angular directives as well

Before you submit a PR, make sure you did the following things:

  • did you link this PR to an issue?
  • did you lint your changes to both javascript and scss?
  • "I'm pretty sure I'll be able to read and understand this PR, even if I wasn't the author." - _said the PR author_

this way, dist always runs everything, and the tasks it depends on will be listed in the help file
- replace `gulp-filesize` with `gulp-size` to show only total
- remove accidently installed `flatten` (meant to install `gulp-flatten`)
- install `gulp-assets` to calculate only the files that are in our html
@thatkookooguy thatkookooguy temporarily deployed to kibibit-demo-pr-205 September 6, 2016 15:56 Inactive
@thatkookooguy thatkookooguy temporarily deployed to kibibit-demo-pr-205 September 6, 2016 16:46 Inactive
@thatkookooguy thatkookooguy temporarily deployed to kibibit-demo-pr-205 September 6, 2016 19:45 Inactive
@thatkookooguy thatkookooguy temporarily deployed to kibibit-demo-pr-205 September 6, 2016 20:26 Inactive
we can still use angular's console if we really want to log something
@thatkookooguy thatkookooguy temporarily deployed to kibibit-demo-pr-205 September 6, 2016 21:25 Inactive
@thatkookooguy thatkookooguy temporarily deployed to kibibit-demo-pr-205 September 6, 2016 22:39 Inactive
@thatkookooguy thatkookooguy temporarily deployed to kibibit-demo-pr-205 September 6, 2016 22:57 Inactive
@thatkookooguy
Copy link
Member Author

https://github.com/SC5/sc5-styleguide#build-options

can actually load our app's directives inside the styleguide. need to check it out

@thatkookooguy thatkookooguy temporarily deployed to kibibit-demo-pr-205 September 7, 2016 00:52 Inactive
@thatkookooguy
Copy link
Member Author

@ortichon - This thing is ready for a CR. Talk to me if you want some further explanations since this is a pretty big one

@ortichon ortichon changed the title [BUID SYSTEM] Preparations for Milestone 2 [BUILD SYSTEM] Preparations for Milestone 2 Sep 8, 2016
@thatkookooguy thatkookooguy temporarily deployed to kibibit-demo-pr-205 September 8, 2016 07:31 Inactive
@ortichon
Copy link
Member

ortichon commented Sep 8, 2016

LGTM

Approved with PullApprove

@thatkookooguy
Copy link
Member Author

@ortichon Thx or!

@ortichon
Copy link
Member

ortichon commented Sep 8, 2016

@thatkookooguy no no, thank YOU

@thatkookooguy thatkookooguy merged commit 87a0352 into master Sep 8, 2016
@thatkookooguy thatkookooguy deleted the Build-System-major-changes branch September 8, 2016 08:36
@thatkookooguy
Copy link
Member Author

now, once hound will fix the bug on their part, we'll be ready to go. But notice! now that our watch checks your files as well, we need to try and make hound work easier by fixing things locally first :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IMPROVE BUILD SYSTEM BEFORE WE START PHASE II
2 participants