9 Commits

Author SHA1 Message Date
Andrey Vlasov
f2209f6708 1.3.0 2020-12-06 19:49:43 +03:00
Andrey Vlasov
753eaada75 add features 2020-12-06 19:49:08 +03:00
fe6d5df006 No test specified 2020-04-04 11:20:21 +03:00
d5e08e4178 1.2.0 2020-03-31 00:16:40 +03:00
14e5c02a03 fireapp 2020-03-31 00:16:30 +03:00
ac1e2a4df3 1.1.0 2020-03-31 00:08:19 +03:00
Andrey Vlasov
0636ce1ff2 fix virtual module 2020-03-29 12:49:07 +03:00
Andrey Vlasov
47839a963c 1.0.5 2020-03-29 10:53:19 +03:00
Andrey Vlasov
3683151cb2 build 2020-03-29 10:52:08 +03:00
5 changed files with 40 additions and 36 deletions

42
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -1,12 +1,11 @@
{
"name": "@ijl/fire.app",
"version": "1.0.4",
"version": "1.3.0",
"description": "",
"main": "dist/index.js",
"scripts": {
"start": "nodemon ./stubs/server.js",
"build": "webpack --mode development",
"test": "echo \"Error: no test specified\" && exit 1"
"build": "webpack --mode development"
},
"author": "innoavvlasov@gmail.com",
"license": "ISC",

View File

@@ -1,4 +1,4 @@
import "systemjs/dist/s";
import "systemjs/dist/system";
import "systemjs/dist/extras/amd";
import "systemjs/dist/extras/named-register";
import "systemjs/dist/extras/named-exports";
@@ -33,8 +33,8 @@ const systemJSImport = async (requestUrl: string) => {
// sections: { version: '1.0.0', name: 'sections' }
// }
export default async ({ apps: rawApps, navigations, config }) => {
defineVirtualModule({navigations, config})
export default async ({ apps: rawApps, navigations, config, features }) => {
defineVirtualModule({ navigations, config, features })
const apps = new Apps(rawApps)

View File

@@ -1,12 +1,17 @@
const createVirtualModule = ({ config, navigations, features }) => ({
getConfig: () => config,
getConfigValue: (pkg: string) => config[pkg],
getNavigations: () => navigations,
getNavigationsValue: (pkg: string) => navigations[pkg],
getAllFeatures: () => features,
getFeatures: (pkg: string) => features[pkg]
})
export const defineVirtualModule = (params) => {
const virtualModule = createVirtualModule(params)
// @ts-ignore
global.define('@ijl/fire.app', [], virtualModule)
System.set('root.scope', {
...virtualModule
});
}
const createVirtualModule = ({config, navigations}) => ({
getConfig: () => config,
getConfigValue: (key) => config[key],
getNavigations: () => navigations,
getNavigationsValue: (key) => navigations[key],
})

View File

@@ -11,10 +11,10 @@ module.exports = {
index: "./src/main.ts"
},
output: {
library: "bootstrap",
library: "fireapp",
path: path.resolve(__dirname, outputDirectory),
libraryExport: "default",
publicPath: `/boorstrap/${pkg.version}/`
publicPath: `/fireapp/${pkg.version}/`
},
plugins: [new CleanWebpackPlugin()],