Commit 0d3494a35b8bc2c3b6d5677c5ae791293d4a6469
Exists in
master
and in
1 other branch
Merge branch 'master' into 'master'
Master See merge request modulos-npm/foca-directivas!2
Showing
2 changed files
 
Show diff stats
gulpfile.js
| ... | ... | @@ -39,3 +39,8 @@ gulp.task('pre-commit', function() { | 
| 39 | 39 | |
| 40 | 40 | gulp.start('uglify'); | 
| 41 | 41 | }); | 
| 42 | + | |
| 43 | +gulp.task('clean-post-install', function(){ | |
| 44 | + return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js'], {read: false}) | |
| 45 | + .pipe(clean()); | |
| 46 | +}); | 
package.json
| ... | ... | @@ -5,8 +5,8 @@ | 
| 5 | 5 | "main": "index.js", | 
| 6 | 6 | "scripts": { | 
| 7 | 7 | "test": "echo \"Error: no test specified\" && exit 1", | 
| 8 | - "compile": "gulp uglify", | |
| 9 | - "postinstall": "npm run compile && rm -R src && rm -R tmp && rm .jshintrc && rm gulpfile.js" | |
| 8 | + "compile": "gulp uglify", | |
| 9 | + "postinstall": "npm run compile && gulp clean-post-install" | |
| 10 | 10 | }, | 
| 11 | 11 | "pre-commit": [ | 
| 12 | 12 | "gulp-pre-commit" | 
| ... | ... | @@ -32,6 +32,7 @@ | 
| 32 | 32 | "devDependencies": { | 
| 33 | 33 | "angular": "^1.7.4", | 
| 34 | 34 | "gulp": "^3.9.1", | 
| 35 | + "gulp-clean": "^0.4.0", | |
| 35 | 36 | "gulp-concat": "^2.6.1", | 
| 36 | 37 | "gulp-jshint": "^2.1.0", | 
| 37 | 38 | "gulp-rename": "^1.4.0", | 
| ... | ... | @@ -41,4 +42,4 @@ | 
| 41 | 42 | "jshint": "^2.9.6", | 
| 42 | 43 | "pump": "^3.0.0" | 
| 43 | 44 | } | 
| 44 | -} | |
| 45 | 45 | \ No newline at end of file | 
| 46 | +} |