Removes gulp dependency
Switches css building from gulp to postcss. Gulp was unnecessary overhead since nothing else is currently using it. Updates other dependencies. Also adjust some of the CI build processes to use less output (aside from errors) to decrease build time.
This commit is contained in:
+2
-2
@@ -14,9 +14,9 @@ install:
|
||||
- npm ci
|
||||
|
||||
script:
|
||||
- npm run lint-prod
|
||||
- npm run test-prod
|
||||
- npm run deploy
|
||||
- npm run test
|
||||
- npm run lint
|
||||
|
||||
before_deploy: "echo 'node_modules' > .gitignore"
|
||||
deploy:
|
||||
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
const gulp = require("gulp");
|
||||
const postcss = require("gulp-postcss");
|
||||
const rename = require("gulp-rename");
|
||||
|
||||
const postcssImport = require("postcss-easy-import");
|
||||
const postcssCSSO = require("postcss-csso");
|
||||
|
||||
gulp.task("build-css", buildCSS);
|
||||
gulp.task("minify-css", minifyCSS);
|
||||
|
||||
gulp.task("watch-css", function() {
|
||||
return gulp.watch(["./src/styles/*.css", "./src/styles/**/*.css"], minifyCSS);
|
||||
});
|
||||
|
||||
function runBuild(minified) {
|
||||
const plugins = [postcssImport];
|
||||
if (minified) plugins.push(postcssCSSO({restructure: false}));
|
||||
return gulp.src("./src/styles/index.css")
|
||||
.pipe(postcss(plugins))
|
||||
.pipe(rename("style.css"))
|
||||
.pipe(gulp.dest("./dist"));
|
||||
}
|
||||
|
||||
function buildCSS() {
|
||||
return runBuild(false);
|
||||
}
|
||||
|
||||
function minifyCSS() {
|
||||
return runBuild(true);
|
||||
}
|
||||
Generated
+1689
-2237
File diff suppressed because it is too large
Load Diff
+17
-17
@@ -6,16 +6,17 @@
|
||||
"scripts": {
|
||||
"build": "webpack --progress --colors",
|
||||
"watch": "webpack --progress --colors --watch",
|
||||
"build-prod": "webpack --progress --colors --mode production -o dist/remote.js --devtool none",
|
||||
"build-prod": "webpack --display errors-only --mode production -o dist/remote.js --devtool none",
|
||||
"lint-js": "eslint --ext .jsx,.js src/",
|
||||
"build-css": "gulp build-css",
|
||||
"watch-css": "gulp watch-css",
|
||||
"build-prod-css": "gulp minify-css",
|
||||
"build-css": "postcss src/styles/index.css -o dist/style.css",
|
||||
"watch-css": "postcss src/styles/index.css -o dist/style.css -w",
|
||||
"build-prod-css": "postcss src/styles/index.css -o dist/style.css --no-map --env production",
|
||||
"lint-css": "stylelint src/styles/*.css && stylelint src/styles/**/*.css",
|
||||
"prod": "npm run build-prod && npm run build-prod-css",
|
||||
"lint": "npm run lint-js && npm run lint-css",
|
||||
"test": "mocha --require @babel/register --recursive \"./tests/*.js\"",
|
||||
"deploy": "npm run prod"
|
||||
"lint-prod": "npm run lint-js -- --quiet && npm run lint-css -- --quiet",
|
||||
"test-prod": "npm run test -- --reporter min",
|
||||
"deploy": "npm run build-prod && npm run build-prod-css"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -27,22 +28,21 @@
|
||||
},
|
||||
"homepage": "https://github.com/rauenzi/BetterDiscordApp",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.10.5",
|
||||
"@babel/preset-env": "^7.10.4",
|
||||
"@babel/preset-react": "^7.10.4",
|
||||
"@babel/register": "^7.10.5",
|
||||
"@babel/core": "^7.12.3",
|
||||
"@babel/preset-env": "^7.12.1",
|
||||
"@babel/preset-react": "^7.12.1",
|
||||
"@babel/register": "^7.12.1",
|
||||
"babel-loader": "^8.1.0",
|
||||
"babel-plugin-module-resolver": "^4.0.0",
|
||||
"circular-dependency-plugin": "^5.2.0",
|
||||
"eslint": "^7.5.0",
|
||||
"eslint-plugin-react": "^7.21.3",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-postcss": "^8.0.0",
|
||||
"gulp-rename": "^2.0.0",
|
||||
"mocha": "^8.1.1",
|
||||
"eslint": "^7.12.0",
|
||||
"eslint-plugin-react": "^7.21.5",
|
||||
"mocha": "^8.2.0",
|
||||
"postcss": "^8.1.4",
|
||||
"postcss-cli": "^8.1.0",
|
||||
"postcss-csso": "^4.0.0",
|
||||
"postcss-easy-import": "^3.0.0",
|
||||
"stylelint": "^13.6.1",
|
||||
"stylelint": "^13.7.2",
|
||||
"stylelint-config-standard": "^20.0.0",
|
||||
"webpack": "^4.43.0",
|
||||
"webpack-cli": "^3.3.12"
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
module.exports = ctx => {
|
||||
return {
|
||||
map: false,
|
||||
plugins: {
|
||||
"postcss-easy-import": {},
|
||||
"postcss-csso": ctx.env === "production" ? {restructure: false} : false
|
||||
}
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user