From 5cf76c5f084083273398c76494dad8bbab718b55 Mon Sep 17 00:00:00 2001 From: William Grant Date: Mon, 23 May 2022 16:36:03 +1000 Subject: [PATCH 1/3] feat: build sass files using parcel instead of grunt added sass watch command for auto building sass on file changes, cleaned up IE7 fallback css --- .gitignore | 4 - .prettierignore | 1 - .sassrc.json | 9 + Gruntfile.js | 26 +- about.html | 2 +- background.html | 2 +- debug_log.html | 2 +- package.json | 26 +- password.html | 2 +- stylesheets/_debugLog.scss | 5 +- stylesheets/_emoji.scss | 6 - stylesheets/_session_conversation.scss | 2 +- stylesheets/_variables.scss | 2 +- stylesheets/manifest.scss | 16 +- yarn.lock | 522 ++++++------------------- 15 files changed, 165 insertions(+), 462 deletions(-) create mode 100644 .sassrc.json diff --git a/.gitignore b/.gitignore index 56def5f07..7f27c2f3d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ node_modules .parcel-cache .sass-cache .eslintcache -stylesheets/*.css.map /dist .DS_Store config/local.json @@ -13,9 +12,6 @@ release/ *.sublime* sql/ -# generated files -stylesheets/*.css - # React / TypeScript ts/**/*.js ts/protobuf/*.d.ts diff --git a/.prettierignore b/.prettierignore index c98581d7e..16f836f48 100644 --- a/.prettierignore +++ b/.prettierignore @@ -11,7 +11,6 @@ test/ts/**/*.js ts/**/*.js ts/protobuf/*.d.ts ts/protobuf/*.js -stylesheets/manifest.css ts/util/lint/exceptions.json ts/test/automation/notes diff --git a/.sassrc.json b/.sassrc.json new file mode 100644 index 000000000..952931f22 --- /dev/null +++ b/.sassrc.json @@ -0,0 +1,9 @@ +{ + "includePaths": [ + "node_modules/sanitize.css", + "node_modules/emoji-mart/css", + "node_modules/react-h5-audio-player/lib", + "node_modules/react-contexify/dist", + "node_modules/react-toastify/dist" + ] +} diff --git a/Gruntfile.js b/Gruntfile.js index 85780b473..a853ac101 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,26 +1,8 @@ -const importOnce = require('node-sass-import-once'); -const sass = require('node-sass'); - /* eslint-disable more/no-then, no-console */ module.exports = grunt => { - grunt.loadNpmTasks('grunt-sass'); - grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), - sass: { - options: { - implementation: sass, - sourceMap: true, - importer: importOnce, - }, - - dist: { - files: { - 'stylesheets/manifest.css': 'stylesheets/manifest.scss', - }, - }, - }, exec: { transpile: { cmd: 'yarn transpile', @@ -63,11 +45,5 @@ module.exports = grunt => { }); grunt.registerTask('date', ['gitinfo']); - grunt.registerTask('default', [ - 'exec:build-protobuf', - 'sass', - 'exec:transpile', - 'date', - 'getCommitHash', - ]); + grunt.registerTask('default', ['exec:build-protobuf', 'exec:transpile', 'date', 'getCommitHash']); }; diff --git a/about.html b/about.html index b9f8892cb..75fe0e1b8 100644 --- a/about.html +++ b/about.html @@ -14,7 +14,7 @@ script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline';" /> - +