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

Deleting tmp files #170

Closed
nealoke opened this issue Oct 31, 2016 · 1 comment
Closed

Deleting tmp files #170

nealoke opened this issue Oct 31, 2016 · 1 comment

Comments

@nealoke
Copy link

nealoke commented Oct 31, 2016

Using this module to create above the fold css for a couple of php files in gulp.

Task:

return gulp.src('../app/*.php')
	        .pipe(critical({
	        	base: '../app/',
	        	inline: false,
				dimensions: [
					{
				        width: 320,
				        height: 650
				    }, 
				    {
				        width: 1200,
				        height: 900
				    }
				],
	        	css: ['../app/styles/global.css'],
	        	ignore: [/url\(/, '@font-face'],
	        }))
			.pipe(autoprefixer({cascade: false}))
			.pipe(minifyCss({compatibility: 'ie8'}))
			.pipe(csso({sourceMap: false}))
			.pipe(cssnano({safe: true}))
			.pipe(wrapper({wrapper: '<style type="text/css">{file}</style>'}))
			.pipe(rename({
				suffix: "-ATF",
				extname: ".php"
			}))
	        .pipe(gulp.dest('../export/php/ATF'));

However using this the task also creates tmp files such as
tmp-980GlwutZwYavbs and tmp-9800JKMaeQij1UL which are the html pages created by phantom I guess. Also these tmp files are not in a direcotry listed anywhere in the task, which makes it more of a mystery.

Is there a way to delete these automatically?

@nealoke
Copy link
Author

nealoke commented Oct 31, 2016

This only occurs if the critical({ base }) is different then the gulp.dest() path

@nealoke nealoke closed this as completed Oct 31, 2016
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

No branches or pull requests

1 participant