starts but delivers empty page
This commit is contained in:
Generated
+3
-3
@@ -9798,9 +9798,9 @@
|
||||
"integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g=="
|
||||
},
|
||||
"typescript": {
|
||||
"version": "3.5.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.2.tgz",
|
||||
"integrity": "sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==",
|
||||
"version": "3.5.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz",
|
||||
"integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==",
|
||||
"dev": true
|
||||
},
|
||||
"typescript-declaration-webpack-plugin": {
|
||||
|
||||
+14
-13
@@ -2,8 +2,9 @@
|
||||
"name": "frontblock-admin",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"start": "webpack-dev-server --config static.webpack.config.dev.js --hot --open",
|
||||
"build": "npm run clean; webpack --display-error-details --config static.webpack.config.prod.js --progress --colors",
|
||||
"tsc": "tsc",
|
||||
"start": "npm run build; node lib/backendsrc/FrontblockAdmin.js",
|
||||
"build": "tsc; webpack --display-error-details --config static.webpack.config.prod.js --progress --colors",
|
||||
"clean": "rm -rf lib",
|
||||
"update-frontblock": "rm -rf node_modules/frontblock*; npm install"
|
||||
},
|
||||
@@ -43,17 +44,8 @@
|
||||
"bsert": "0.0.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^24.0.15",
|
||||
"jest": "^24.7.1",
|
||||
"prettier": "^1.18.2",
|
||||
"terser-webpack-plugin": "^1.3.0",
|
||||
"ts-jest": "^24.0.2",
|
||||
"tslint": "^5.18.0",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"typescript": "^3.5.2",
|
||||
"webpack": "^4.35.2",
|
||||
"webpack-cli": "^3.3.5",
|
||||
"@types/angular": "^1.6.27",
|
||||
"@types/jest": "^24.0.15",
|
||||
"autoprefixer": "^9.4.7",
|
||||
"clean-webpack-plugin": "^1.0.1",
|
||||
"css-loader": "^2.1.0",
|
||||
@@ -61,18 +53,27 @@
|
||||
"file-loader": "^3.0.1",
|
||||
"html-loader": "^0.5.5",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"jest": "^24.7.1",
|
||||
"less": "^3.9.0",
|
||||
"less-loader": "^4.0.5",
|
||||
"mini-css-extract-plugin": "^0.5.0",
|
||||
"node-sass": "^4.5.3",
|
||||
"postcss-loader": "^3.0.0",
|
||||
"prettier": "^1.18.2",
|
||||
"sass-loader": "^7.1.0",
|
||||
"style-loader": "^0.23.1",
|
||||
"terser-webpack-plugin": "^1.3.0",
|
||||
"ts-jest": "^24.0.2",
|
||||
"ts-loader": "^5.3.3",
|
||||
"tslint": "^5.18.0",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"tslint-loader": "^3.5.3",
|
||||
"typescript": "^3.5.3",
|
||||
"typescript-declaration-webpack-plugin": "^0.1.1",
|
||||
"uglifyjs-webpack-plugin": "^2.1.3",
|
||||
"url-loader": "^1.1.2"
|
||||
"url-loader": "^1.1.2",
|
||||
"webpack": "^4.35.2",
|
||||
"webpack-cli": "^3.3.5"
|
||||
},
|
||||
"files": [
|
||||
"lib/**/*"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import html from './index.html'
|
||||
import html from './index'
|
||||
import './index.scss'
|
||||
import rootCtrl from './controller'
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/// <reference path='./type.d.ts'/>
|
||||
|
||||
import './index.scss'
|
||||
import angular = require('angular')
|
||||
import uiRouter from '@uirouter/angularjs'
|
||||
|
||||
Vendored
-8
@@ -1,8 +0,0 @@
|
||||
declare module '*.html' {
|
||||
const content: string
|
||||
export default content
|
||||
}
|
||||
|
||||
declare function require(arg: string): any
|
||||
|
||||
declare var module
|
||||
@@ -1,5 +1,5 @@
|
||||
import ctrl from './controller'
|
||||
import html from './index.html'
|
||||
import html from './index'
|
||||
import './index.scss'
|
||||
|
||||
export default {
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const webpack = require('webpack');
|
||||
const path = require('path');
|
||||
const ROOT_PATH = path.resolve(__dirname);
|
||||
const APP_PATH = path.resolve(ROOT_PATH, 'src');
|
||||
const BUILD_PATH = path.resolve(ROOT_PATH, 'dist');
|
||||
const NODE_MODULES_PATH = path.resolve(ROOT_PATH, 'node_modules');
|
||||
const ENTRY_FILE = path.resolve(APP_PATH, 'index');
|
||||
const TEMPLATE_FILE = path.resolve(APP_PATH, 'index.html'); //html
|
||||
|
||||
module.exports = [
|
||||
{
|
||||
mode: 'development',
|
||||
devtool: 'source-map',
|
||||
entry: {
|
||||
app: ENTRY_FILE,
|
||||
vendor: [
|
||||
"angular",
|
||||
'@uirouter/angularjs'
|
||||
]
|
||||
},
|
||||
output: {
|
||||
path: BUILD_PATH,
|
||||
filename: 'js/[name].[hash:8].js',
|
||||
chunkFilename: '[name].[chunkhash:8].js',
|
||||
publicPath: '/'
|
||||
},
|
||||
devServer: {
|
||||
hot: true,
|
||||
contentBase: BUILD_PATH,
|
||||
port: 3000,
|
||||
publicPath: '/'
|
||||
},
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
filename: path.resolve(BUILD_PATH, 'index.html'),
|
||||
template: TEMPLATE_FILE,
|
||||
hash: false,
|
||||
}),
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
new webpack.NamedModulesPlugin()
|
||||
],
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
common: {
|
||||
chunks: 'all',
|
||||
minChunks: 2,
|
||||
maxInitialRequests: 5,
|
||||
minSize: 0,
|
||||
name: 'common'
|
||||
},
|
||||
vendor: {
|
||||
test: /node_modules/,
|
||||
chunks: 'all',
|
||||
name: 'vendor',
|
||||
priority: 10,
|
||||
enforce: true,
|
||||
minChunks: 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.ts', '.less', '.scss', '.css'],
|
||||
alias: {
|
||||
'@': APP_PATH,
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
mode: 'development',
|
||||
entry: path.resolve(__dirname, 'lib/FrontblockLib.js'),
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'static'),
|
||||
filename: 'FrontblockLib.js',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{ test: /\FrontblockLib.ts/, use: 'ts-loader' }
|
||||
]
|
||||
},
|
||||
optimization: {
|
||||
minimizer: [new TerserPlugin({
|
||||
cache: true,
|
||||
parallel: true,
|
||||
terserOptions:{
|
||||
mangle: false,
|
||||
keep_classnames: true
|
||||
}
|
||||
})],
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
common: {
|
||||
chunks: 'all',
|
||||
minChunks: 2,
|
||||
maxInitialRequests: 5,
|
||||
minSize: 0,
|
||||
name: 'common'
|
||||
},
|
||||
vendor: {
|
||||
test: /node_modules/,
|
||||
chunks: 'all',
|
||||
name: 'vendor',
|
||||
priority: 10,
|
||||
enforce: true,
|
||||
minChunks: 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
@@ -13,8 +13,7 @@ const TEMPLATE_FILE = path.resolve(APP_PATH, 'index.html');
|
||||
|
||||
const BUILD_PATH = path.resolve(ROOT_PATH, './static');
|
||||
|
||||
const staticFiles = [
|
||||
{
|
||||
const angularPage = {
|
||||
mode: 'production',
|
||||
entry: {
|
||||
app: ENTRY_FILE,
|
||||
@@ -134,10 +133,11 @@ const staticFiles = [
|
||||
'@': APP_PATH,
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
}
|
||||
|
||||
const FrontblockLib = {
|
||||
mode: 'production',
|
||||
entry: path.resolve(__dirname, 'lib/FrontblockLib.js'),
|
||||
entry: path.resolve(__dirname, 'lib/backendsrc/FrontblockLib.js'),
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'static'),
|
||||
filename: 'FrontblockLib.js',
|
||||
@@ -177,61 +177,9 @@ const staticFiles = [
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
const plugin = {
|
||||
target: "node",
|
||||
mode: 'production',
|
||||
entry: path.resolve(__dirname, 'Plugin.ts'),
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'static'),
|
||||
filename: 'Plugin.js',
|
||||
libraryTarget: "commonjs2",
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
exclude: path.resolve(__dirname, 'node_modules'),
|
||||
use: 'ts-loader',
|
||||
}
|
||||
]
|
||||
},
|
||||
optimization: {
|
||||
minimizer: [new TerserPlugin({
|
||||
cache: true,
|
||||
parallel: true,
|
||||
terserOptions:{
|
||||
mangle: false,
|
||||
keep_classnames: true
|
||||
}
|
||||
})],
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
common: {
|
||||
chunks: 'all',
|
||||
minChunks: 2,
|
||||
maxInitialRequests: 5,
|
||||
minSize: 0,
|
||||
name: 'common'
|
||||
},
|
||||
vendor: {
|
||||
test: /node_modules/,
|
||||
chunks: 'all',
|
||||
name: 'vendor',
|
||||
priority: 10,
|
||||
enforce: true,
|
||||
minChunks: 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.ts', '.js'],
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = [
|
||||
Object.assign({}, staticFiles),
|
||||
Object.assign({}, plugin),
|
||||
Object.assign({}, angularPage),
|
||||
Object.assign({}, FrontblockLib),
|
||||
];
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
<!doctype html> <html lang=en> <head> <meta charset=UTF-8> <title>Document</title> <link href="css/app.css?v=1cccf4c9" rel="stylesheet"></head> <body> <root></root> <script type="text/javascript" src="js/vendor.ec7aebc2.js"></script><script type="text/javascript" src="js/app.0fe5d117.js"></script></body> </html>
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){function t(t){for(var n,l,i=t[0],c=t[1],s=t[2],a=0,d=[];a<i.length;a++)l=i[a],r[l]&&d.push(r[l][0]),r[l]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(t);d.length;)d.shift()();return u.push.apply(u,s||[]),o()}function o(){for(var e,t=0;t<u.length;t++){for(var o=u[t],n=!0,i=1;i<o.length;i++){var c=o[i];0!==r[c]&&(n=!1)}n&&(u.splice(t--,1),e=l(l.s=o[0]))}return e}var n={},r={0:0},u=[];function l(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,l),o.l=!0,o.exports}l.m=e,l.c=n,l.d=function(e,t,o){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(l.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)l.d(o,n,function(t){return e[t]}.bind(null,n));return o},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="";var i=window.webpackJsonp=window.webpackJsonp||[],c=i.push.bind(i);i.push=t,i=i.slice();for(var s=0;s<i.length;s++)t(i[s]);var f=c;u.push([8,1]),o()}([,,,,,function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=o(5);o(17);const r=o(18);t.default={template:n.default,controller:r.default}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=o(20),r=o(6);o(21),t.default={template:r.default,controller:n.default}},,function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o(9);const n=o(4),r=o(7),u=o(13),l=o(16),i=o(19),c=o(22);n.module("app",[r.default,l.default,i.default,c.default]).config(u.default),n.bootstrap(document,["app"])},function(e,t,o){},,,,function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=[];function r(e,t){e.otherwise("views"),n.forEach(e=>{t.state(e)})}["todo-list"].forEach(e=>{const t=o(14)(`./${e}/route`).default,{children:r}=t;let u=[];r&&r.length>0&&(u=r.map(e=>(e.name=`${t.name}.${e.name}`,e))),delete t.children,u.push(t),n=n.concat(u)}),r.$inject=["$urlRouterProvider","$stateProvider"],t.default=r},function(e,t,o){var n={"./todo-list/route":15};function r(e){var t=u(e);return o(t)}function u(e){if(!o.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}r.keys=function(){return Object.keys(n)},r.resolve=u,e.exports=r,r.id=14},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"todolist",url:"/todolist",component:"todolist"}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=o(4),r=o(5);t.default=n.module("components",[]).component("root",r.default).name},function(e,t,o){},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e){this.$rootScope=e}}n.$inject=["$rootScope"],t.default=n},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=o(4),r=o(6);t.default=n.module("wallets",[]).component("todolist",r.default).name},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e){this.bip32=e,this.todos=[],this.id=0,this.todoTypes=["All","Todo","Done"],this.visibleType="All"}handleSubmit(e){e.keyCode}toggleType(e){this.visibleType=e}}n.$inject=["bip32"],t.default=n},function(e,t,o){},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=o(4),r=o(23);t.default=n.module("filters",[]).filter("todosVisible",()=>r.default).name},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){switch(t){case"All":return e;case"Todo":return e.filter(e=>!e.complete);case"Done":return e.filter(e=>e.complete);default:throw new Error("Unknown type "+t)}}}]);
|
||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -8,6 +8,6 @@
|
||||
"outDir": "./lib",
|
||||
"strict": true
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": ["backendsrc", "src"],
|
||||
"exclude": ["node_modules", "**/__tests__/*"],
|
||||
}
|
||||
Reference in New Issue
Block a user