Skip to content
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.

Convert the build process for creating the WYMeditor archive to use Grunt instead of Make #427

Merged
merged 9 commits into from
Aug 7, 2013

Conversation

NickMcL
Copy link
Contributor

@NickMcL NickMcL commented Aug 6, 2013

Currently, building WYMeditor is done by using make, but we would like to convert these tasks over to using Grunt like the unit tests so that we can centralize the build process tasks.

NickMcL added a commit to NickMcL/wymeditor that referenced this pull request Aug 6, 2013
@NickMcL
Copy link
Contributor Author

NickMcL commented Aug 6, 2013

In this ticket, I added concat, uglify, copy, compress, and clean tasks to Grunt for building the project, and I made a build task for Grunt that does all of the concatenation, minification, copying, and compression needed to build the project. Now, after running the build task with Grunt, the resulting project build in the dist directory is the same as it would be if it were built with the old make task.

Because the make building task is no longer needed, I removed all of the building tasks from the Makefile. The Makefile can't entirely be removed yet because it still has to be used instead of Grunt to run the selenium tests, but Grunt has an unofficial selenium plugin that we could perhaps try to use in the future so that we can completely move away from make to Grunt.

@@ -50,7 +50,7 @@
# The short X.Y version.
version = '1.0.0'
# The full version, including alpha/beta/rc tags.
release = '1.0.0b5'
Copy link
Member

Choose a reason for hiding this comment

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

We should update the pre-release_checklist.md file to remind us to bump the version and release, here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updating this was already in the pre-release_checklist.md file under the "Prepare For the Next Release" section. I just forgot that I hadn't done it until this ticket.

@winhamwr
Copy link
Member

winhamwr commented Aug 7, 2013

Also, what do you think about including both Gruntfile.js and the tests directory in the distribution? Seems like if we give them the README that talks about testing, it wouldn't be bad to also include the tests directory.

@winhamwr
Copy link
Member

winhamwr commented Aug 7, 2013

Not really related to this ticket, but I did some brainstorming about some ways to make our build process even more awesome with Customized Builds. Now that we're all the way on Grunt, we have a lot of awesome options.

@NickMcL
Copy link
Contributor Author

NickMcL commented Aug 7, 2013

I pegged the versions for everything in package.json, I made your suggested changes to the README and removed the notes about running the NPM commands as root, and I added a grunt-replace task to add the version number from package.json to the jquery.wymeditor.js file when building the distribution of the project.

I removed version.txt from the project since it is no longer needed because grunt-replace pulls the version number from package.json when inserting it into the distribution files for the project. I also updated the pre-release_checklist.md file with instructions on bumping the version number in package.json.

Also, what do you think about including both Gruntfile.js and the tests directory in the distribution? Seems like if we give them the README that talks about testing, it wouldn't be bad to also include the tests directory.

That sounds fine to me. I made it so that both the test directory and the Gruntfile.js file are now added to the distribution when building the project, and I tested running the Grunt test task from the distribution directory to ensure that it works. It might be worth noting though that adding the test directory and the Gruntfile.js file to the distribution archive increased the size of the archive by 143kB from 483kB to 626kB.

@winhamwr
Copy link
Member

winhamwr commented Aug 7, 2013

Hooooray Grunt!

winhamwr added a commit that referenced this pull request Aug 7, 2013
Closes #427 Convert the build process for creating the WYMeditor archive to use Grunt instead of Make
@winhamwr winhamwr merged commit 8c74aeb into wymeditor:master Aug 7, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants