showcar-gulp
Shared build steps for projects using the ShowCar UI Library
Last updated 2 months ago by autoscout24 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install showcar-gulp 
SYNC missed versions from official npm registry.

showcar-gulp

Unified frontend build pipeline for projects using the ShowCar UI Library

Install

npm install showcar-gulp -D

Before starting

Install gulp

npm install gulp -D

Publishing showcar-gulp to NPM

Once a new build is ready to be published to NPM as a new package version, you'll first need to login to NPM with the AS24 account. You can get the information from LastPass.

Then update the semver for the showcar-gulp package:

# 0.0.1
npm version patch
# 0.1.0
npm version minor
# 1.0.0
npm version major

Lastly, publish the updated package to NPM:

npm publish

Usage

Install showcar-gulp in your project.

npm install -d showcar-gulp

Create your own gulpfile.js with the following structure

// gulpfile.js

const gulp = require('gulp');
const scgulp = require('showcar-gulp')(gulp);

// gulp tasks alliases
gulp.task('set-dev', () => {
  scgulp.config.devmode = true;
});

gulp.task('build', ['scss', 'js']);

gulp.task('dev', ['set-dev', 'scss:watch', 'js:watch', 'serve']);
gulp.task('default', ['build']);

Build tasks

JS Build and minify your js files

gulp.task(
  'js',
  scgulp.js({
    entry: 'src/main.js',
    out: 'dist/main.min.js'
  })
);

SCSS Build and minify css from sass files

gulp.task('scss', scgulp.scss({
    entry: 'src/main.scss',
    out: 'dist/showcar.min.css'
});

TypeScript Build and minify your ts files

gulp.task(
  'ts',
  scgulp.ts({
    entry: 'src/main.ts',
    out: 'dist/tsmain.min.js'
  })
);

Linter tasks

Tasks for linting JS and CSS code style

JS

gulp.task('eslint', scgulp.eslint({
    files: 'src/**/*.js'
});

TypeScript

gulp.task(
  'tslint',
  scgulp.tslint({
    files: 'src/**/*.ts'
  })
);

CSS

gulp.task('stylelint', scgulp.stylelint({
    files: 'src/**/*.scss'
});

For running linter tasks you will also need to create configuration files in your project.

.eslintrc.js for eslint task

.stylelintrc.js for stylelint task

Serve task

Runs a local server on localhost:3000 by default

gulp.task('serve', scgulp.serve({
    dir: 'dist'
});

Clean task

Removes files according to the files pattern

gulp.task('clean', scgulp.clean({
    files: ['dist/**/*']
});

Karma task

Runs karma tests

gulp.task('jstest' scgulp.js({
    entry: 'src/main.spec.js',
    out: 'dist/main.min.spec.js',
    watch: ['test-src/**/*.js', 'js-src/**/*.js'],
});

gulp.task('karma', ['jstest'], scgulp.karma({
    files: ['dist/index.spec.js']
});

gulp.task('jstest:watch', () => {
    gulp.watch(['test-src/**/*.js', 'js-src/**/*.js'], ['karma']);
});

Usage example

Please see our gulpfile

Current Tags

  • 3.2.9                                ...           latest (2 months ago)

89 Versions

  • 3.2.9                                ...           2 months ago
  • 3.2.8                                ...           2 months ago
  • 3.2.7                                ...           2 months ago
  • 3.2.6                                ...           2 months ago
  • 3.2.5                                ...           2 months ago
  • 3.2.4                                ...           2 months ago
  • 3.2.3                                ...           2 months ago
  • 3.2.2                                ...           2 months ago
  • 3.2.1                                ...           2 months ago
  • 3.2.0                                ...           2 months ago
  • 3.1.7                                ...           3 months ago
  • 3.1.6                                ...           3 months ago
  • 3.1.5                                ...           3 months ago
  • 3.1.4                                ...           3 months ago
  • 3.1.3                                ...           3 months ago
  • 3.1.2                                ...           6 months ago
  • 3.1.1                                ...           6 months ago
  • 3.1.0                                ...           6 months ago
  • 3.0.2                                ...           6 months ago
  • 2.10.2                                ...           a year ago
  • 2.10.1                                ...           a year ago
  • 2.10.0                                ...           2 years ago
  • 2.9.10                                ...           2 years ago
  • 2.9.8                                ...           2 years ago
  • 2.9.6                                ...           2 years ago
  • 2.9.5                                ...           3 years ago
  • 2.9.4                                ...           3 years ago
  • 2.9.3                                ...           3 years ago
  • 2.9.2                                ...           3 years ago
  • 2.9.1                                ...           3 years ago
  • 2.9.0                                ...           3 years ago
  • 2.8.4                                ...           3 years ago
  • 2.8.3                                ...           3 years ago
  • 2.8.2                                ...           3 years ago
  • 2.8.1                                ...           3 years ago
  • 2.8.0                                ...           3 years ago
  • 2.7.0                                ...           3 years ago
  • 2.6.7                                ...           3 years ago
  • 2.6.6                                ...           3 years ago
  • 2.6.5                                ...           3 years ago
  • 2.6.4                                ...           3 years ago
  • 2.6.3                                ...           3 years ago
  • 2.6.2                                ...           3 years ago
  • 2.6.1                                ...           3 years ago
  • 2.6.0                                ...           3 years ago
  • 2.5.5                                ...           3 years ago
  • 2.5.4                                ...           3 years ago
  • 2.5.3                                ...           3 years ago
  • 2.5.2                                ...           3 years ago
  • 2.5.1                                ...           3 years ago
  • 2.5.0                                ...           3 years ago
  • 2.4.1                                ...           3 years ago
  • 2.4.0                                ...           3 years ago
  • 2.3.2                                ...           3 years ago
  • 2.3.1                                ...           3 years ago
  • 2.3.0                                ...           3 years ago
  • 2.2.4                                ...           3 years ago
  • 2.2.3                                ...           3 years ago
  • 2.2.2                                ...           3 years ago
  • 2.2.1                                ...           3 years ago
  • 2.2.0                                ...           3 years ago
  • 2.1.3                                ...           3 years ago
  • 2.1.2                                ...           3 years ago
  • 2.1.1                                ...           3 years ago
  • 2.1.0                                ...           3 years ago
  • 2.0.5                                ...           3 years ago
  • 2.0.4                                ...           3 years ago
  • 2.0.3                                ...           3 years ago
  • 2.0.2                                ...           3 years ago
  • 2.0.1                                ...           3 years ago
  • 2.0.0                                ...           3 years ago
  • 0.11.1                                ...           3 years ago
  • 0.11.0                                ...           3 years ago
  • 0.10.1                                ...           3 years ago
  • 0.10.0                                ...           3 years ago
  • 0.9.1                                ...           3 years ago
  • 0.9.0                                ...           3 years ago
  • 0.8.4                                ...           3 years ago
  • 0.8.3                                ...           3 years ago
  • 0.8.2                                ...           3 years ago
  • 0.8.1                                ...           3 years ago
  • 0.7.1                                ...           3 years ago
  • 0.7.0                                ...           3 years ago
  • 0.6.0                                ...           3 years ago
  • 0.5.0                                ...           3 years ago
  • 0.4.0                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
  • 0.2.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 92
Last Day 0
Last Week 1
Last Month 1
Dependencies (61)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |