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

gulp task does not work #5

Closed
vertuxx opened this issue May 11, 2016 · 3 comments
Closed

gulp task does not work #5

vertuxx opened this issue May 11, 2016 · 3 comments

Comments

@vertuxx
Copy link

vertuxx commented May 11, 2016

Hello
I have been using a yeoman/generator-chrome-extension.
When I run the build, clean-css related errors will occur.
sourcemap of bootstrap.css seems to cause.

how do I resolve this problem?
regards.

html

<html>
  <head>
    <meta charset="utf-8">
    <!-- build:css styles/popup-vendor.css -->
    <!-- bower:css -->
    <link href="bower_components/bootstrap/dist/css/bootstrap.css" rel="stylesheet">
    <!-- endbower -->
    <!-- endbuild -->
    <!-- build:css styles/main.css -->
    <link href="styles/main.css" rel="stylesheet">
    <!-- endbuild -->
  </head>
  <body>
  .....

gulpfile.babel.js: line 52-61

gulp.task('html',  () => {
  return gulp.src('app/*.html')
    .pipe($.useref({searchPath: ['.tmp', 'app', '.']}))
    .pipe($.sourcemaps.init())
    .pipe($.if('*.js', $.uglify()))
    .pipe($.if('*.css', $.cleanCss({compatibility: '*'}))) // <- this line 
    .pipe($.sourcemaps.write())
    .pipe($.if('*.html', $.htmlmin({removeComments: true, collapseWhitespace: true})))
    .pipe(gulp.dest('dist'));
});

command

$ gulp build
[13:47:48] Requiring external module babel-register
(node:6899) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
[13:47:49] Using gulpfile ~/works/jsworks/extension-example/gulpfile.babel.js
[13:47:49] Starting 'build'...
[13:47:49] Starting 'lint'...
[13:47:49] Finished 'lint' after 254 ms
[13:47:49] Starting 'chromeManifest'...
[13:47:49] Finished 'chromeManifest' after 190 ms
[13:47:49] Starting 'html'...
[13:47:49] Starting 'images'...
[13:47:49] Starting 'extras'...
fs.js:634
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open '/Users/vertuxx/works/jsworks/extension-example/app/styles/bootstrap.css.map'
    at Error (native)
    at Object.fs.openSync (fs.js:634:18)
    at Object.fs.readFileSync (fs.js:502:33)
    at fromSource (/Users/vertuxx/works/jsworks/extension-example/node_modules/clean-css/lib/utils/input-source-map-tracker.js:84:30)
    at InputSourceMapStore.track (/Users/vertuxx/works/jsworks/extension-example/node_modules/clean-css/lib/utils/input-source-map-tracker.js:237:5)
    at Object.whenDone (/Users/vertuxx/works/jsworks/extension-example/node_modules/clean-css/lib/clean.js:145:44)
    at processNext (/Users/vertuxx/works/jsworks/extension-example/node_modules/clean-css/lib/imports/inliner.js:105:13)
    at importFrom (/Users/vertuxx/works/jsworks/extension-example/node_modules/clean-css/lib/imports/inliner.js:79:
$ 

@vertuxx vertuxx changed the title gulp clean task does not work gulp task does not work May 11, 2016
@vertuxx
Copy link
Author

vertuxx commented May 11, 2016

I'm sorry. I made a mistake.

@vertuxx vertuxx closed this as completed May 11, 2016
@vertuxx
Copy link
Author

vertuxx commented May 12, 2016

hi
I asked yeoman/generator-chrome-extension.
issue

Error message occurs that bootstrap.css.map is missing. It may be caused from relative path problem in reference. and it seems that related to cleancss use. Please ask gulp-clean-css of this

regards.

@vertuxx
Copy link
Author

vertuxx commented May 12, 2016

this issue move to jakubpawlowicz/clean-css.
issue

@vertuxx vertuxx closed this as completed May 12, 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