Skip to content

Conversation

@jfmercer
Copy link

NOMERGE PR.js Build Improvements

Please note

  • This PR does not complete everything that I had in mind for sprucing up PR.js. I'll list below what I've completed & what I haven't.
  • I've been reassigned to JS training & Pixwel. Due to this, I'm very wary of leaving these commits unmerged. I don't want to return to them in 3 or 6 months & have no memory of what I was doing. Worse, I don't want the work to be lost due to accidental deletion. On the other hand, I don't want anything prematurely completed merged into master.

Overall Goal

  1. Create of a build/ dir for development & a dist/ dir where everything works "out of the box"
  2. 100% test coverage.
  3. CI

Completed

  • Modularization of gulp setup
  • gulp serve now has live reload
  • Minified css and img/ go to dist/
  • buildjs task is incomplete
    • It creates build.min.js and build.min.js.maps. If there is other JS that needs minification, it hasn't been done yet.
  • Testing: parsers/ and validators/ are tested, but not UI/
  • Travis CI builds the functionality listed above

Incomplete

  • UI/ tests with PhantomJS
  • html build & minification (this is tricky due to Angular partials)
  • less build & minification
  • ESLint
  • jspm style enforcement
  • npm publication
  • nsp automated security auditing for dependencies
  • test coverage reports (Istanbul?)
  • No live reload yet for css, less, html, etc.
  • Possibly missing 100% test coverage.
  • gulp watch isn't set up
  • Lots and lots of pretty badges 👀

Conclusion

  • I'm not certain how to move forward at this point. Here are some possibilities
    • Merge the existing work, with little to no cleanup, & put the remaining tasks on the back-burner
    • Complete the remaining tasks. However, this would cut into Pixwel/JS time.
    • Just leave everything as is. Write up the situation so that when I return to this in the future, I'll have notes to jog my memory.

@jfmercer jfmercer force-pushed the gulp-novicepiece branch 2 times, most recently from 27efd44 to 84d9ce4 Compare August 28, 2015 01:27
John F. Mercer and others added 5 commits August 27, 2015 21:35
* Adds build script to package.json
* Formatting cleanup, courtesy of jspm
* Adds build.min.js files to gitignore
* Installs require-dir
* Refactors gulp setup
* Activates live reload in gulp serve
* Adds dist/ to gitignore
* Adds buildjs task
* Adds Travis-CI integration
* adds clean task
* Extracts buildjs task into its own file
* Adds build image task
* Adds css build task
* The default task now runs both build and test
* Travis now runs `gulp` instead of `gulp build`
* Adds 'test' to package.json scripts
* Restores jspm's config.js
* Per jspm docs, adds jspm as npm devDependency
* Travis now runs npm & jspm locally, not globally
* TODO: setup PhantomJS testing
  * Currently, the parsers and validators are tested
  * BUT the UI code is NOT tested
  * We must add UI code testing at some point.
* Also, removes cached files which shouldn't be in the index.
@jfmercer jfmercer changed the title NOMERGE NOMERGE PR.js Build Improvements Aug 28, 2015
@jfmercer
Copy link
Author

@nateabele @gavD @ovaska Feedback appreciated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO remove?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Those files current go into root. I'd prefer them to be in build/ and dist/, but I haven't found a way to do so without breaking everything. Wherever they go, they should not be committed to the repo, but rather be generated in the by gulp build. For the time being, they're stuck in root until I find a better solution.

* This implements [these instructions](https://github.com/jspm/jspm-cli/wiki/Registries#travis-ci).
* Security Note: It is safe to commit the encrypted string to version
  control. Only Travis can unlock it.
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.

4 participants