mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-12 02:29:59 +00:00
Simplify build scripts and implement preliminary tests
This commit is contained in:
5512
ext/package-lock.json
generated
5512
ext/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"scripts": {
|
||||
"build": "webpack",
|
||||
"build": "webpack && web-ext build --overwrite-dest --source-dir ../dist/unpacked --artifacts-dir ../dist && mv ../dist/*.zip ../dist/ext.xpi",
|
||||
"watch": "webpack -d --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -14,6 +14,7 @@
|
||||
"copy-webpack-plugin": "^4.3.1",
|
||||
"react": "^16.2.0",
|
||||
"react-dom": "^16.2.0",
|
||||
"web-ext": "^2.7.0",
|
||||
"webpack": "^3.10.0"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
"use strict";
|
||||
|
||||
import { AutoJoinPolicy
|
||||
, DefaultActionPolicy } from "../enums";
|
||||
|
||||
export default class ApiConfig {
|
||||
constructor (
|
||||
sessionRequest
|
||||
, sessionListener
|
||||
, receiverListener
|
||||
, opt_autoJoinPolicy
|
||||
, opt_defaultActionPolicy) {
|
||||
, opt_autoJoinPolicy = AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED
|
||||
, opt_defaultActionPolicy = DefaultActionPolicy.CREATE_SESSION) {
|
||||
|
||||
this.autoJoinPolicy
|
||||
this.autoJoinPolicy = opt_autoJoinPolicy;
|
||||
this.defaultActionPolicy = opt_defaultActionPolicy;
|
||||
this.receiverListener = receiverListener;
|
||||
this.sessionListener = sessionListener;
|
||||
this.sessionRequest = sessionRequest;
|
||||
|
||||
@@ -4,6 +4,7 @@ export const AutoJoinPolicy = {
|
||||
TAB_AND_ORIGIN_SCOPED: "tab_and_origin_scoped"
|
||||
, ORIGIN_SCOPED: "origin_scoped"
|
||||
, PAGE_SCOPED: "page_scoped"
|
||||
, CUSTOM_CONTROLLER_SCOPED: "custom_controller_scoped"
|
||||
};
|
||||
|
||||
export const Capability = {
|
||||
|
||||
@@ -6,7 +6,7 @@ const webpack_copy = require("copy-webpack-plugin");
|
||||
|
||||
|
||||
const include_path = path.resolve(__dirname, "src");
|
||||
const output_path = path.resolve(__dirname, "dist");
|
||||
const output_path = path.resolve(__dirname, "../dist/unpacked");
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
@@ -22,9 +22,8 @@ module.exports = {
|
||||
, path: `${output_path}`
|
||||
}
|
||||
, plugins: [
|
||||
new webpack.optimize.UglifyJsPlugin()
|
||||
//, new webpack.optimize.CommonsChunkPlugin("lib/init.bundle")
|
||||
, new webpack.DefinePlugin({
|
||||
new webpack.DefinePlugin({
|
||||
"process.env.NODE_ENV": `"production"`
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user