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

cleanup Gruntfile by extracting executable code #12150

Merged
merged 2 commits into from
Jan 8, 2014

Conversation

cvrebert
Copy link
Collaborator

@cvrebert cvrebert commented Jan 8, 2014

This cleans up the Gruntfile by moving the nontrivial executable code out of it and into separate modules.

@axemclion
Copy link

@cvrebert, I would like to follow a similar pattern for the grunt task in #12112. However, I am not sure if the perf grunt task should be inside docs/perf.js as it is not related to docs.

Is there a reason why you moved the docs grunt task logic into docs. I have seen other projects have a build folder, under which all the special build tasks exist.

What should be the way I should change #12112 so that it is consistent with the pattern in this pull request ?

@cvrebert
Copy link
Collaborator Author

cvrebert commented Jan 8, 2014

Is there a reason why you moved the docs grunt task logic into docs.

Because, ignoring your PR, all the custom grunt tasks are docs-related, and we don't have/use a build folder currently.

What should be the way I should change #12112 so that it is consistent with the pattern in this pull request ?

Move perf.js under /test-infra/.

@cvrebert
Copy link
Collaborator Author

cvrebert commented Jan 8, 2014

It's possible we'll revisit the location of the files at some point; the main thing is that the code is out of the Gruntfile.

cvrebert added a commit that referenced this pull request Jan 8, 2014
cleanup Gruntfile by extracting executable code
@cvrebert cvrebert merged commit 1736bcb into master Jan 8, 2014
@cvrebert cvrebert deleted the extract-from-gruntfile branch January 8, 2014 19:01

fs.writeFileSync('docs/_data/glyphicons.yml', glyphiconsData)
});
grunt.registerTask('build-glyphicons-data', generateGlyphiconsData);

Choose a reason for hiding this comment

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

Is there a reason why you register the generateGlyphiconsData as a function and not load the file as a grunt task instead. I also see that you use readFileSync instead of grunt.file.read, if this was a grunt task. Should I do the same for #12112 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, no particular reason.

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

Successfully merging this pull request may close these issues.

None yet

2 participants