Browse Source

the only configuration of import / export that works - for helpers

master
Marek Piasecki 2 years ago
parent
commit
98d90af890
  1. 2
      site/src/router.imba
  2. 10
      src/helpers.imba
  3. 2
      src/router.imba

2
site/src/router.imba

@ -1,6 +1,6 @@
import "pro-router/standalone" # standalone operates on "/#/" hash style url; for regular "/" url use: "pro-router/router" import "pro-router/standalone" # standalone operates on "/#/" hash style url; for regular "/" url use: "pro-router/router"
import "pro-router-imba2" import "pro-router-imba2"
import { helpers } from "pro-router-imba2/helpers" import * as helpers from "pro-router-imba2/helpers"
import views from "./views.json" import views from "./views.json"

10
src/helpers.imba

@ -6,12 +6,4 @@ import reject from 'lodash.reject'
import toPairs from 'lodash.topairs' import toPairs from 'lodash.topairs'
import flatten from 'lodash.flatten' import flatten from 'lodash.flatten'
export const helpers = { export { compact, fromPairs, chunk, includes, reject, toPairs, flatten }
compact: compact
fromPairs: fromPairs
chunk: chunk
includes: includes
reject: reject
toPairs: toPairs
flatten: flatten
}

2
src/router.imba

@ -1,6 +1,6 @@
import "pro-router/standalone" # standalone operates on "/#/" hash style url; for regular "/" url use: "pro-router/router" import "pro-router/standalone" # standalone operates on "/#/" hash style url; for regular "/" url use: "pro-router/router"
import "pro-router-imba2" import "pro-router-imba2"
import { helpers } from "pro-router-imba2/helpers" import * as helpers from "pro-router-imba2/helpers"
import views from "./views.json" import views from "./views.json"

Loading…
Cancel
Save