diff --git a/gulp/sass.js b/gulp/sass.js index 0e44db99b52..79cb4e4ced8 100644 --- a/gulp/sass.js +++ b/gulp/sass.js @@ -53,6 +53,7 @@ module.exports = (gulp, plugins, blueprint) => { const postcssOptions = { to : blueprint.destPath(project, "dist.css"), + map: { inline: false }, }; const postcssPlugins = [ // inline all imports @@ -79,7 +80,7 @@ module.exports = (gulp, plugins, blueprint) => { .pipe(plugins.stripCssComments({ preserve: /^\*/ })) .pipe(plugins.replace(/\n{3,}/g, "\n\n")) // see https://github.com/floridoo/vinyl-sourcemaps-apply/issues/11#issuecomment-231220574 - .pipe(plugins.sourcemaps.write(undefined, { sourceRoot: null })) + .pipe(plugins.sourcemaps.write(".", { sourceRoot: null })) .pipe(blueprint.dest(project)) .pipe(plugins.connect.reload()); }); diff --git a/package.json b/package.json index 9553e3b0deb..913b7745457 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,11 @@ "bootstrap": "lerna bootstrap", "build:landing": "(cd packages/landing; npm run build)", "build:gulp": "NODE_ENV='\"production\"' gulp build", - "build:site": "npm-run-all build:gulp build:landing copy:docs copy:landing", - "copy:docs": "cp -r packages/docs/dist docs/docs", - "copy:landing": "cp -r packages/landing/dist/* docs/.", + "build:site": "npm-run-all build:gulp build:landing clean:docs copy:docs copy:landing delete:doc-source-maps", + "clean:docs": "rm -rf docs && git checkout docs/CNAME", + "copy:docs": "cp -rf packages/docs/dist docs/docs", + "copy:landing": "cp -rf packages/landing/dist/* docs/.", + "delete:doc-source-maps" : "find docs -name '*.map' -type f -delete", "serve": "http-server docs" }, "dependencies": {