Add webview init
This commit is contained in:
18
doric-js/bundle/doric-web.js
Normal file
18
doric-js/bundle/doric-web.js
Normal file
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
/*
|
||||
* Copyright [2021] [Doric.Pub]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
console.log("Hello,WebView");
|
16
doric-js/index.web.ts
Normal file
16
doric-js/index.web.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright [2021] [Doric.Pub]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
console.log("Hello,WebView")
|
0
doric-js/lib/index.web.d.ts
vendored
Normal file
0
doric-js/lib/index.web.d.ts
vendored
Normal file
17
doric-js/lib/index.web.js
Normal file
17
doric-js/lib/index.web.js
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
/*
|
||||
* Copyright [2021] [Doric.Pub]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
console.log("Hello,WebView");
|
@@ -1,87 +1,105 @@
|
||||
import resolve from '@rollup/plugin-node-resolve'
|
||||
import buble from '@rollup/plugin-buble';
|
||||
import commonjs from '@rollup/plugin-commonjs'
|
||||
import resolve from "@rollup/plugin-node-resolve";
|
||||
import buble from "@rollup/plugin-buble";
|
||||
import commonjs from "@rollup/plugin-commonjs";
|
||||
|
||||
export default [
|
||||
{
|
||||
input: "lib/index.runtime.js",
|
||||
output: {
|
||||
name: "doric",
|
||||
format: "iife",
|
||||
file: "bundle/doric-sandbox.js",
|
||||
},
|
||||
plugins: [
|
||||
resolve({ mainFields: ["jsnext"] }),
|
||||
],
|
||||
onwarn: function (warning) {
|
||||
if (warning.code === 'THIS_IS_UNDEFINED') { return; }
|
||||
console.warn(warning.message);
|
||||
}
|
||||
{
|
||||
input: "lib/index.runtime.js",
|
||||
output: {
|
||||
name: "doric",
|
||||
format: "iife",
|
||||
file: "bundle/doric-sandbox.js",
|
||||
},
|
||||
{
|
||||
input: "lib/index.js",
|
||||
output: {
|
||||
format: "cjs",
|
||||
file: "bundle/doric-lib.js",
|
||||
},
|
||||
plugins: [
|
||||
resolve({ mainFields: ["jsnext"] }),
|
||||
],
|
||||
onwarn: function (warning) {
|
||||
if (warning.code === 'THIS_IS_UNDEFINED') { return; }
|
||||
console.warn(warning.message);
|
||||
}
|
||||
plugins: [resolve({ mainFields: ["jsnext"] })],
|
||||
onwarn: function (warning) {
|
||||
if (warning.code === "THIS_IS_UNDEFINED") {
|
||||
return;
|
||||
}
|
||||
console.warn(warning.message);
|
||||
},
|
||||
{
|
||||
input: "lib/index.debug.js",
|
||||
output: {
|
||||
format: "cjs",
|
||||
file: "bundle/doric-vm.js",
|
||||
},
|
||||
plugins: [
|
||||
resolve({ mainFields: ["jsnext"] }),
|
||||
],
|
||||
external: ['ws'],
|
||||
onwarn: function (warning) {
|
||||
if (warning.code === 'THIS_IS_UNDEFINED') { return; }
|
||||
console.warn(warning.message);
|
||||
}
|
||||
},
|
||||
{
|
||||
input: "lib/index.js",
|
||||
output: {
|
||||
format: "cjs",
|
||||
file: "bundle/doric-lib.js",
|
||||
},
|
||||
|
||||
{
|
||||
input: "lib-es5/index.runtime.es5.js",
|
||||
output: {
|
||||
name: "doric",
|
||||
format: "iife",
|
||||
file: "bundle/doric-sandbox.es5.js",
|
||||
},
|
||||
plugins: [
|
||||
resolve({ mainFields: ["jsnext"] }),
|
||||
commonjs(),
|
||||
buble({
|
||||
transforms: { dangerousForOf: true }
|
||||
}),
|
||||
],
|
||||
onwarn: function (warning) {
|
||||
if (warning.code === 'THIS_IS_UNDEFINED') { return; }
|
||||
console.warn(warning.message);
|
||||
}
|
||||
plugins: [resolve({ mainFields: ["jsnext"] })],
|
||||
onwarn: function (warning) {
|
||||
if (warning.code === "THIS_IS_UNDEFINED") {
|
||||
return;
|
||||
}
|
||||
console.warn(warning.message);
|
||||
},
|
||||
{
|
||||
input: "lib-es5/index.js",
|
||||
output: {
|
||||
format: "cjs",
|
||||
file: "bundle/doric-lib.es5.js",
|
||||
},
|
||||
plugins: [
|
||||
resolve({ mainFields: ["jsnext"] }),
|
||||
buble({
|
||||
transforms: { dangerousForOf: true }
|
||||
}),
|
||||
],
|
||||
onwarn: function (warning) {
|
||||
if (warning.code === 'THIS_IS_UNDEFINED') { return; }
|
||||
console.warn(warning.message);
|
||||
}
|
||||
},
|
||||
{
|
||||
input: "lib/index.debug.js",
|
||||
output: {
|
||||
format: "cjs",
|
||||
file: "bundle/doric-vm.js",
|
||||
},
|
||||
]
|
||||
plugins: [resolve({ mainFields: ["jsnext"] })],
|
||||
external: ["ws"],
|
||||
onwarn: function (warning) {
|
||||
if (warning.code === "THIS_IS_UNDEFINED") {
|
||||
return;
|
||||
}
|
||||
console.warn(warning.message);
|
||||
},
|
||||
},
|
||||
{
|
||||
input: "lib/index.web.js",
|
||||
output: {
|
||||
format: "cjs",
|
||||
file: "bundle/doric-web.js",
|
||||
},
|
||||
plugins: [resolve({ mainFields: ["jsnext"] })],
|
||||
external: ["ws"],
|
||||
onwarn: function (warning) {
|
||||
if (warning.code === "THIS_IS_UNDEFINED") {
|
||||
return;
|
||||
}
|
||||
console.warn(warning.message);
|
||||
},
|
||||
},
|
||||
{
|
||||
input: "lib-es5/index.runtime.es5.js",
|
||||
output: {
|
||||
name: "doric",
|
||||
format: "iife",
|
||||
file: "bundle/doric-sandbox.es5.js",
|
||||
},
|
||||
plugins: [
|
||||
resolve({ mainFields: ["jsnext"] }),
|
||||
commonjs(),
|
||||
buble({
|
||||
transforms: { dangerousForOf: true },
|
||||
}),
|
||||
],
|
||||
onwarn: function (warning) {
|
||||
if (warning.code === "THIS_IS_UNDEFINED") {
|
||||
return;
|
||||
}
|
||||
console.warn(warning.message);
|
||||
},
|
||||
},
|
||||
{
|
||||
input: "lib-es5/index.js",
|
||||
output: {
|
||||
format: "cjs",
|
||||
file: "bundle/doric-lib.es5.js",
|
||||
},
|
||||
plugins: [
|
||||
resolve({ mainFields: ["jsnext"] }),
|
||||
buble({
|
||||
transforms: { dangerousForOf: true },
|
||||
}),
|
||||
],
|
||||
onwarn: function (warning) {
|
||||
if (warning.code === "THIS_IS_UNDEFINED") {
|
||||
return;
|
||||
}
|
||||
console.warn(warning.message);
|
||||
},
|
||||
},
|
||||
];
|
||||
|
Reference in New Issue
Block a user