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

Fix #12603: add build-raw-files log #12672

Closed
wants to merge 1 commit into from
Closed

Fix #12603: add build-raw-files log #12672

wants to merge 1 commit into from

Conversation

zlatanvasovic
Copy link
Contributor

Fix #12603.

fs.writeFileSync(rawFilesJs, files);
if (fs.existsSync(rawFilesJs)) {
console.log('File ' + rawFilesJs.cyan + ' created');
}
Copy link
Member

Choose a reason for hiding this comment

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

I don't suppose this could fail? If so maybe we should show an message in that case too.

@zlatanvasovic
Copy link
Contributor Author

@XhmikosR @cvrebert All fixed.

grunt.log.write('File ' + rawFilesJs.cyan + ' created.');
}
else {
grunt.log.error('File ' + rawFilesJs + ' doesn\'t exist.');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe "Error creating file ."? Current error message is kinda misleading.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm hm. But we already have raw-files pre-built, so 'not created' can't
happen.

2014-02-10 8:08 GMT+01:00 Chris Rebert [email protected]:

In grunt/bs-raw-files-generator.js:

@@ -28,5 +29,12 @@ module.exports = function generateRawFilesJs(banner) {
banner = ''
}
var files = banner + getFiles('js') + getFiles('less') + getFiles('fonts')

  • fs.writeFileSync('docs/assets/js/raw-files.min.js', files)
  • var rawFilesJs = 'docs/assets/js/raw-files.min.js';
  • fs.writeFileSync(rawFilesJs, files);
  • if (fs.existsSync(rawFilesJs)) {
  • grunt.log.write('File ' + rawFilesJs.cyan + ' created.');
  • }
  • else {
  • grunt.log.error('File ' + rawFilesJs + ' doesn't exist.');

Maybe "Error creating file ."? Current error message is kinda misleading.


Reply to this email directly or view it on GitHubhttps://github.com//pull/12672/files#r9575465
.

Zlatan Vasović - ZDroid

Copy link
Member

Choose a reason for hiding this comment

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

That's a valid point @zdroid :P

LGTM. Ideally I'd like to skip creating that file since it just gets minified later on.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yay. In that case we should just make raw-files as a string, nothing more.

2014-02-10 8:38 GMT+01:00 XhmikosR [email protected]:

In grunt/bs-raw-files-generator.js:

@@ -28,5 +29,12 @@ module.exports = function generateRawFilesJs(banner) {
banner = ''
}
var files = banner + getFiles('js') + getFiles('less') + getFiles('fonts')

  • fs.writeFileSync('docs/assets/js/raw-files.min.js', files)
  • var rawFilesJs = 'docs/assets/js/raw-files.min.js';
  • fs.writeFileSync(rawFilesJs, files);
  • if (fs.existsSync(rawFilesJs)) {
  • grunt.log.write('File ' + rawFilesJs.cyan + ' created.');
  • }
  • else {
  • grunt.log.error('File ' + rawFilesJs + ' doesn't exist.');

That's a valid point @zdroid https://github.com/ZDroid :P

LGTM. Ideally I'd like to skip creating that file since it just gets
minified later on.


Reply to this email directly or view it on GitHubhttps://github.com//pull/12672/files#r9575730
.

Zlatan Vasović - ZDroid

@mdo mdo added this to the v3.2.0 milestone Feb 10, 2014
@mdo mdo mentioned this pull request Feb 11, 2014
1 task
@cvrebert cvrebert added the grunt label Feb 11, 2014
@XhmikosR
Copy link
Member

@zdroid: can you rebase this against the latest master?

@zlatanvasovic
Copy link
Contributor Author

@XhmikosR Yes, just a sec.

@cvrebert cvrebert closed this in 7100e3a Feb 13, 2014
@mdo mdo mentioned this pull request Feb 14, 2014
@zlatanvasovic zlatanvasovic deleted the raw-files-log branch February 14, 2014 14:15
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.

build-raw-files task should return log
4 participants