Skip to content

Commit

Permalink
Merge pull request #57 from ufabc-next/chore/manifest-v3-master
Browse files Browse the repository at this point in the history
Chore/manifest v3 master
  • Loading branch information
Joabesv authored Feb 5, 2024
2 parents 9b8f5a6 + 1d59b28 commit aebde7e
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 64 deletions.
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 20.10.0
57 changes: 30 additions & 27 deletions app/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,30 @@
"name": "UFABC Next",
"short_name": "UFABC Next",
"description": "Adiciona funcionalidades novas ao sistema de matricula da UFABC",
"version": "1.1.8",
"manifest_version": 2,
"version": "1.2.0",
"manifest_version": 3,
"minimum_chrome_version": "55.0.0",
"default_locale": "en",
"icons": {
"16": "images/icon-16.png",
"128": "images/icon-128.png"
},
"background": {
"scripts": [
"scripts/background.js"
]
"service_worker": "scripts/background.js"
},
"permissions": [
"storage",
"http://*.ufabc.edu.br/*",
"https://*.ufabc.edu.br/*",
"http://localhost:8000/*",
"http://*.ufabcnext.com/*",
"https://*.ufabcnext.com/*"
],
"permissions": ["storage"],
"host_permissions": ["*://*/*"],
"content_scripts": [
{
"all_frames": true,
"js": ["scripts/contentscript.js"],
"matches": [
"http://*.ufabc.edu.br/*",
"https://*.ufabc.edu.br/*",
"http://localhost:8000/*",
"http://*.ufabcnext.com/*",
"https://*.ufabcnext.com/*"
],
"js": [
"scripts/contentscript.js"
],
"run_at": "document_end",
"all_frames": true
"run_at": "document_end"
}
],
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlg7ae7OuGQW9cQU3/qbuewZ6DdTjc1yDXtiwdwoOwgF/CByfjX+yf4addlXcxnLjXVBWwSvRj78mv03lLBjkeh63ia4t/BIzzzvciZyZAKEasC5rt0M6+MKVbkKQS9JGGVFsBiBQcQ6kUP8R4cpWX1G9uEhnshdF+u4Nrs7gq9uXIPZ4pf9PhI/IsPyAsv0m5uO4EHhIMtAp8pFyJfECWWSLchlBoGlaaCyf+fT6SYDsWaw53AcwT5jOJfxdQsoGRKGI5UW8V9+Mw+EDdpTpi7f8E5k604EMqZwmzhYLiXcuUqxeXbNZkyTsUNHXTQFcpNUdmisfjiT50kcxVZVc9wIDAQAB",
Expand All @@ -49,21 +38,35 @@
"https://*.ufabcnext.com/*"
]
},
"browser_action": {
"action": {
"default_icon": {
"19": "images/icon-19.png",
"38": "images/icon-38.png"
},
"default_title": "UFABC Matricula",
"default_popup": "pages/popup.html"
},
"content_security_policy": "script-src 'self'; object-src 'self'",
"content_security_policy": {
"extension_pages": "script-src 'self'; object-src 'self'"
},
"options_page": "src/options/index.html",
"web_accessible_resources": [
"fonts/*",
"scripts/*",
"images/*",
"html/*",
"styles/*",
"pages/*"
{
"resources": [
"fonts/*",
"scripts/*",
"images/*",
"html/*",
"styles/*",
"pages/*"
],
"matches": [
"http://*.ufabc.edu.br/*",
"https://*.ufabc.edu.br/*",
"http://localhost:8000/*",
"http://*.ufabcnext.com/*",
"https://*.ufabcnext.com/*"
]
}
]
}
81 changes: 44 additions & 37 deletions tasks/styles.js
Original file line number Diff line number Diff line change
@@ -1,57 +1,64 @@
import gulp from 'gulp'
import gulpif from 'gulp-if'
import gutil from 'gulp-util'
import sourcemaps from 'gulp-sourcemaps'
import less from 'gulp-less'
import gulp from "gulp";
import gulpif from "gulp-if";
import gutil from "gulp-util";
import sourcemaps from "gulp-sourcemaps";
import less from "gulp-less";

import dartSass from 'sass';
import gulpSass from 'gulp-sass';
import dartSass from "sass";
import gulpSass from "gulp-sass";
const sass = gulpSass(dartSass);

import cleanCSS from 'gulp-clean-css'
import livereload from 'gulp-livereload'
import cssimport from 'gulp-cssimport'
import args from './lib/args'
import gulpWebpack from 'webpack-stream'
import cleanCSS from "gulp-clean-css";
import livereload from "gulp-livereload";
import cssimport from "gulp-cssimport";
import args from "./lib/args";
import gulpWebpack from "webpack-stream";

gulp.task('styles:css', function () {
return gulp.src('app/styles/*.css')
gulp.task("styles:css", function () {
return gulp
.src("app/styles/*.css")
.pipe(cssimport())
.pipe(gulpif(args.sourcemaps, sourcemaps.init()))
.pipe(gulpif(args.production, cleanCSS()))
.pipe(gulpif(args.sourcemaps, sourcemaps.write()))
.pipe(gulp.dest(`dist/${args.vendor}/styles`))
.pipe(gulpif(args.watch, livereload()))
})
.pipe(gulpif(args.watch, livereload()));
});

gulp.task('styles:less', function () {
return gulp.src('app/styles/*.less')
gulp.task("styles:less", function () {
return gulp
.src("app/styles/*.less")
.pipe(gulpif(args.sourcemaps, sourcemaps.init()))
.pipe(less({ paths: ['./app'] }).on('error', function (error) {
gutil.log(gutil.colors.red('Error (' + error.plugin + '): ' + error.message))
this.emit('end')
}))
.pipe(
less({ paths: ["./app"] }).on("error", function (error) {
gutil.log(
gutil.colors.red("Error (" + error.plugin + "): " + error.message),
);
this.emit("end");
}),
)
.pipe(gulpif(args.production, cleanCSS()))
.pipe(gulpif(args.sourcemaps, sourcemaps.write()))
.pipe(gulp.dest(`dist/${args.vendor}/styles`))
.pipe(gulpif(args.watch, livereload()))
})
.pipe(gulpif(args.watch, livereload()));
});

gulp.task('styles:sass', function () {
return gulp.src('app/styles/*.scss')
gulp.task("styles:sass", function () {
return gulp
.src("app/styles/*.scss")
.pipe(gulpif(args.sourcemaps, sourcemaps.init()))
.pipe(sass({ includePaths: ['./app'] }).on('error', function (error) {
gutil.log(gutil.colors.red('Error (' + error.plugin + '): ' + error.message))
this.emit('end')
}))
.pipe(
sass({ includePaths: ["./app"] }).on("error", function (error) {
gutil.log(
gutil.colors.red("Error (" + error.plugin + "): " + error.message),
);
this.emit("end");
}),
)
.pipe(gulpif(args.production, cleanCSS()))
.pipe(gulpif(args.sourcemaps, sourcemaps.write()))
.pipe(gulp.dest(`dist/${args.vendor}/styles`))
.pipe(gulpif(args.watch, livereload()))
})
.pipe(gulpif(args.watch, livereload()));
});

gulp.task('styles', gulp.series(
'styles:css',
'styles:less',
'styles:sass'
))
gulp.task("styles", gulp.series("styles:css", "styles:sass"));

0 comments on commit aebde7e

Please sign in to comment.