Remove Gulp
This commit is contained in:
parent
7166986d44
commit
33f2446a2d
6 changed files with 13192 additions and 16865 deletions
|
@ -14,7 +14,7 @@
|
||||||
"selector-type-case": null,
|
"selector-type-case": null,
|
||||||
"selector-list-comma-newline-after": null,
|
"selector-list-comma-newline-after": null,
|
||||||
"no-descending-specificity": null,
|
"no-descending-specificity": null,
|
||||||
"string-quotes": null
|
"string-quotes": "single"
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"stylelint-scss"
|
"stylelint-scss"
|
||||||
|
|
68
gulpfile.js
68
gulpfile.js
|
@ -1,68 +0,0 @@
|
||||||
/**
|
|
||||||
* Nextcloud - Tasks
|
|
||||||
*
|
|
||||||
* This file is licensed under the Affero General Public License version 3 or
|
|
||||||
* later. See the COPYING file.
|
|
||||||
*
|
|
||||||
* @author Bernhard Posselt <dev@bernhard-posselt.com>
|
|
||||||
* @copyright Bernhard Posselt 2012, 2014
|
|
||||||
*
|
|
||||||
* @author Georg Ehrke
|
|
||||||
* @copyright 2017 Georg Ehrke <oc.list@georgehrke.com>
|
|
||||||
*
|
|
||||||
* @author Raimund Schlüßler
|
|
||||||
* @copyright 2018 Raimund Schlüßler <raimund.schluessler@mailbox.org>
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*jslint node: true */
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
// get plugins
|
|
||||||
const gulp = require('gulp'),
|
|
||||||
svgSprite = require('gulp-svg-sprite'),
|
|
||||||
webpackStream = require('webpack-stream'),
|
|
||||||
webpackDevelopmentConfig = require('./webpack.dev.js'),
|
|
||||||
webpackProductionConfig = require('./webpack.prod.js');
|
|
||||||
|
|
||||||
// configure
|
|
||||||
const destinationFolder = __dirname + '/js/';
|
|
||||||
|
|
||||||
const svgConfig = {
|
|
||||||
shape: {
|
|
||||||
transform: []
|
|
||||||
},
|
|
||||||
mode: {
|
|
||||||
css: { // Activate the «css» mode
|
|
||||||
bust: false,
|
|
||||||
common: 'icon',
|
|
||||||
dimensions: '',
|
|
||||||
prefix: '.icon-%s',
|
|
||||||
sprite: '../img/sprites.svg',
|
|
||||||
render: {
|
|
||||||
scss: {
|
|
||||||
dest: 'src/sprites.scss'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// tasks
|
|
||||||
|
|
||||||
gulp.task('default', ['build']);
|
|
||||||
|
|
||||||
gulp.task('build', ['svg_sprite'], function(callback) {
|
|
||||||
return webpackStream(webpackProductionConfig, require('webpack'))
|
|
||||||
.pipe(gulp.dest(destinationFolder));
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('development', ['svg_sprite'], function(callback) {
|
|
||||||
return webpackStream(webpackDevelopmentConfig, require('webpack'))
|
|
||||||
.pipe(gulp.dest(destinationFolder));
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('svg_sprite', () => {
|
|
||||||
return gulp.src('**/*.svg', {cwd: 'img/src'})
|
|
||||||
.pipe(svgSprite(svgConfig))
|
|
||||||
.pipe(gulp.dest('.'));
|
|
||||||
});
|
|
29926
package-lock.json
generated
29926
package-lock.json
generated
File diff suppressed because it is too large
Load diff
20
package.json
20
package.json
|
@ -10,13 +10,13 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": "https://github.com/nextcloud/tasks",
|
"homepage": "https://github.com/nextcloud/tasks",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "jest --verbose",
|
"dev": "npm run svg_sprite && webpack --config webpack.dev.js",
|
||||||
"prebuild": "npm install && npm upgrade",
|
"watch": "webpack --progress --watch --config webpack.dev.js",
|
||||||
"build": "node node_modules/gulp-cli/bin/gulp.js build",
|
"build": "npm run svg_sprite && webpack --progress --hide-modules --config webpack.prod.js",
|
||||||
"lint": "eslint --ext .js,.vue src tests",
|
"lint": "eslint --ext .js,.vue src tests",
|
||||||
"lint:fix": "eslint --ext .js,.vue src tests --fix",
|
"lint:fix": "eslint --ext .js,.vue src tests --fix",
|
||||||
"dev": "node node_modules/gulp-cli/bin/gulp.js development",
|
"test": "jest --verbose",
|
||||||
"watch": "webpack --progress --watch --config webpack.dev.js"
|
"svg_sprite": "svg-sprite --config svg-sprite.json img/src/**/*.svg"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -51,11 +51,7 @@
|
||||||
"eslint-plugin-promise": "^3.8.0",
|
"eslint-plugin-promise": "^3.8.0",
|
||||||
"eslint-plugin-standard": "^3.1.0",
|
"eslint-plugin-standard": "^3.1.0",
|
||||||
"eslint-plugin-vue": "^4.5.0",
|
"eslint-plugin-vue": "^4.5.0",
|
||||||
"expect": "^23.5.0",
|
|
||||||
"file-loader": "^1.1.11",
|
"file-loader": "^1.1.11",
|
||||||
"gulp": "^3.9.1",
|
|
||||||
"gulp-cli": "^2.0.1",
|
|
||||||
"gulp-svg-sprite": "1.4.0",
|
|
||||||
"jest": "^23.5.0",
|
"jest": "^23.5.0",
|
||||||
"jest-serializer-vue": "^2.0.2",
|
"jest-serializer-vue": "^2.0.2",
|
||||||
"prettier-eslint": "^8.8.2",
|
"prettier-eslint": "^8.8.2",
|
||||||
|
@ -65,15 +61,13 @@
|
||||||
"stylelint-config-recommended-scss": "^3.2.0",
|
"stylelint-config-recommended-scss": "^3.2.0",
|
||||||
"stylelint-scss": "^3.1.3",
|
"stylelint-scss": "^3.1.3",
|
||||||
"stylelint-webpack-plugin": "^0.10.5",
|
"stylelint-webpack-plugin": "^0.10.5",
|
||||||
|
"svg-sprite": "^1.4.0",
|
||||||
"vue-jest": "^2.6.0",
|
"vue-jest": "^2.6.0",
|
||||||
"vue-loader": "^15.4.1",
|
"vue-loader": "^15.4.1",
|
||||||
"vue-template-compiler": "^2.5.17",
|
"vue-template-compiler": "^2.5.17",
|
||||||
"webpack": "^4.17.1",
|
"webpack": "^4.17.1",
|
||||||
"webpack-cli": "^3.1.0",
|
"webpack-cli": "^3.1.0",
|
||||||
"webpack-dev-server": "^3.1.7",
|
"webpack-merge": "^4.1.4"
|
||||||
"webpack-merge": "^4.1.4",
|
|
||||||
"webpack-node-externals": "^1.6.0",
|
|
||||||
"webpack-stream": "^5.1.1"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
|
|
22
svg-sprite.json
Normal file
22
svg-sprite.json
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"shape": {
|
||||||
|
"dimension": {
|
||||||
|
"attributes": false
|
||||||
|
},
|
||||||
|
"transform": []
|
||||||
|
},
|
||||||
|
"mode": {
|
||||||
|
"css": {
|
||||||
|
"bust": false,
|
||||||
|
"common": "icon",
|
||||||
|
"prefix": ".icon-%s",
|
||||||
|
"sprite": "../img/sprites.svg",
|
||||||
|
"render": {
|
||||||
|
"scss": {
|
||||||
|
"template": "svg-sprite.tmpl",
|
||||||
|
"dest": "src/sprites.scss"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
19
svg-sprite.tmpl
Normal file
19
svg-sprite.tmpl
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{{#hasMixin}}@mixin {{mixinName}} {
|
||||||
|
background: url('{{{sprite}}}') no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
{{#hasCommon}}.{{commonName}} {
|
||||||
|
@include {{mixinName}};
|
||||||
|
}
|
||||||
|
|
||||||
|
{{/hasCommon}}{{/hasMixin}}{{^hasMixin}}{{#hasCommon}}.{{/hasCommon}}{{^hasCommon}}%{{/hasCommon}}{{commonName}} {
|
||||||
|
background: url('{{{sprite}}}') no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
{{/hasMixin}}{{#shapes}}{{#selector.shape}}{{expression}}{{^last}},
|
||||||
|
{{/last}}{{/selector.shape}} {
|
||||||
|
{{^hasCommon}}{{#hasMixin}}@include {{mixinName}};{{/hasMixin}}{{^hasMixin}}@extend %{{commonName}};{{/hasMixin}}
|
||||||
|
{{/hasCommon}}background-position: {{position.relative.xy}};
|
||||||
|
}
|
||||||
|
|
||||||
|
{{/shapes}}
|
Loading…
Reference in a new issue