Skip to content

Commit

Permalink
style: cleanup formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Swiftwork committed Dec 10, 2019
1 parent e11389e commit 8444d6d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 21 deletions.
1 change: 0 additions & 1 deletion scripts/build.js
Expand Up @@ -27,7 +27,6 @@ module.exports.build = () => {
gulp
.src(['postcss.*.js', 'src/**/*', '!src/**/*.stories.*'])
.pipe(gulpPrint())
//.pipe(gulpIf(/package.json$/, packagePipeline()))
.pipe(gulpIf(/postcss\.(\w+)\.js$/, configPipeline().on('error', reject)))
.pipe(gulpIf(/\.tsx?$/, tsxPipeline().on('error', reject)))
.pipe(gulpIf(/\.css$/, cssPipeline().on('error', reject)))
Expand Down
10 changes: 2 additions & 8 deletions scripts/pipelines/config.js
Expand Up @@ -7,11 +7,5 @@ const gulpIgnore = require('gulp-ignore');
const DIST_DIR = path.resolve(process.cwd(), 'dist', 'config');

module.exports.configPipeline = lazypipe()
.pipe(
gulp.dest,
DIST_DIR,
)
.pipe(
gulpIgnore.exclude,
true,
);
.pipe(gulp.dest, DIST_DIR)
.pipe(gulpIgnore.exclude, true);
9 changes: 3 additions & 6 deletions scripts/pipelines/css.js
Expand Up @@ -4,10 +4,7 @@ const gulpPostcss = require('gulp-postcss');
const gulpStylelint = require('gulp-stylelint');

module.exports.cssPipeline = lazypipe()
.pipe(
gulpStylelint,
{
reporters: [{ formatter: 'verbose', console: true }],
},
)
.pipe(gulpStylelint, {
reporters: [{ formatter: 'verbose', console: true }],
})
.pipe(gulpPostcss);
4 changes: 2 additions & 2 deletions scripts/pipelines/package.js
Expand Up @@ -5,9 +5,9 @@ const lazypipe = require('lazypipe');
module.exports.packagePipe = () => {
// return a `through2` stream for `pipe()` compatibility at the node level
return through.obj((file, encoding, callback) => {
let transformedFile = file.clone();
const transformedFile = file.clone();

let metadata = JSON.parse(transformedFile.contents.toString());
const metadata = JSON.parse(transformedFile.contents.toString());
delete metadata.scripts;
delete metadata.devDepencencies;
delete metadata.optionalDependencies;
Expand Down
5 changes: 1 addition & 4 deletions scripts/pipelines/tsx.js
Expand Up @@ -109,7 +109,4 @@ module.exports.tsxPipeline = lazypipe()
.pipe(function() {
return gulpIf(/\.tsx?$/, tsProject());
})
.pipe(
gulpSourcemaps.write,
'.',
);
.pipe(gulpSourcemaps.write, '.');

0 comments on commit 8444d6d

Please sign in to comment.