Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
package / gulp: remove debug script, fix package.json error
  • Loading branch information
irvin committed Oct 6, 2018
commit 8bfdafc48a9649f6e6f20a3d3e4d90fdad3ab80f
6 changes: 0 additions & 6 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import sass from 'gulp-sass';
import jade from 'gulp-jade';
import plumber from 'gulp-plumber';
import inlinesource from 'gulp-inline-source';
import debug from 'gulp-debug-streams';
import replace from 'gulp-replace';

const app = express();
Expand Down Expand Up @@ -63,16 +62,11 @@ gulp.task('watch', () => {

gulp.task('inlinesource', function () {
return gulp.src([`${build_path}/index.html`, `${build_path}/404.html`])
// .pipe(debug(path.resolve(`${build_path}`)))
.pipe(replace(/<script type="text\/javascript" src="\/(js\/index.js)"><\/script>/g, '<div id="script"><script inline type="text/javascript" src="$1"></script></div>'))
/* // uncommand to inline all scripts / css
.pipe(replace(/<script type="text\/javascript" src="\/(.*?.js)">/g, '<script inline type="text/javascript" src="$1">'))
.pipe(replace(/<link rel="stylesheet" (type="text\/css" )??href="\/(.*?.css)">/g, '<link inline rel="stylesheet" type="text/css" href="$2">'))
*/
/* // for debug
.pipe(replace(/<link rel="stylesheet" (type="text\/css" )??href="\/(.*?.css)">/g, function(match, p1, offset, string) { console.log(match); }))
.pipe(replace(/<script type="text\/javascript" src="\/(.*?.js)">/g, function(match, p1, offset, string) { console.log(match); }))
*/
.pipe(inlinesource({
compress: false,
rootpath: path.resolve(`${build_path}`)
Expand Down
13 changes: 4 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
"engines": {
"node": "0.10.x"
},
"dependencies": {
"gulp-debug-streams": "^3.0.0"
},
"devDependencies": {
"@babel/core": "^7.1.2",
"@babel/preset-env": "^7.1.0",
Expand All @@ -35,11 +32,9 @@
"gulp-sass": "^2.2.0",
"gulp-util": "^3.0.8"
},
"repository": [
{
"type": "git",
"url": "https://github.com/hackfoldr/hackfoldr-2.0"
}
],
"repository": {
"type": "git",
"url": "https://github.com/hackfoldr/hackfoldr-2.0"
},
"license": "MIT"
}